2017-02-18 23:17:07 +03:00
|
|
|
filetype: tex
|
|
|
|
|
2024-03-22 19:56:09 +03:00
|
|
|
detect:
|
2018-01-30 02:02:43 +03:00
|
|
|
filename: "\\.tex$|\\.bib$|\\.cls$"
|
2017-02-18 23:17:07 +03:00
|
|
|
|
|
|
|
rules:
|
2017-03-21 22:07:39 +03:00
|
|
|
# colorize the identifiers of {<identifier>} and [<identifier>]
|
2017-02-18 23:17:07 +03:00
|
|
|
- identifier:
|
|
|
|
start: "\\{"
|
|
|
|
end: "\\}"
|
|
|
|
- identifier:
|
|
|
|
start: "\\["
|
|
|
|
end: "\\]"
|
2017-03-21 22:07:39 +03:00
|
|
|
# numbers
|
2017-02-18 23:17:07 +03:00
|
|
|
- constant.number: "\\b[0-9]+(\\.[0-9]+)?([[:space:]](pt|mm|cm|in|ex|em|bp|pc|dd|cc|nd|nc|sp))?\\b"
|
2017-03-21 22:07:39 +03:00
|
|
|
# let brackets have the default color again
|
|
|
|
- default: "[{}\\[\\]]"
|
2017-02-18 23:17:07 +03:00
|
|
|
- special: "[&\\\\]"
|
2017-03-21 22:07:39 +03:00
|
|
|
# macros
|
|
|
|
- statement: "\\\\@?[a-zA-Z_]+"
|
2019-11-29 14:05:54 +03:00
|
|
|
- statement: "\\\\%"
|
2017-03-21 22:07:39 +03:00
|
|
|
# comments
|
|
|
|
- comment:
|
2023-04-21 01:21:59 +03:00
|
|
|
start: "[^\\\\]%|^%"
|
2017-03-21 22:07:39 +03:00
|
|
|
end: "$"
|
2017-02-18 23:17:07 +03:00
|
|
|
- comment:
|
|
|
|
start: "\\\\begin\\{comment\\}"
|
|
|
|
end: "\\\\end\\{comment\\}"
|