Variable: tex-font-lock-keywords-2
tex-font-lock-keywords-2 is a variable defined in tex-font.el.
Value
(("\\\\\\(begin\\|chapter\\|end\\|new\\(?:command\\|environment\\|theorem\\)\\|par\\(?:agraph\\|t\\)\\|renewcommand\\|s\\(?:ection\\|ub\\(?:paragraph\\|s\\(?:ection\\|ub\\(?:paragraph\\|section\\)\\)\\)\\)\\|title\\)\\*? *\\(\\[[^]]*\\] *\\)*{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"
3 font-lock-function-name-face keep)
("\\\\\\(re\\)?newcommand\\** *\\(\\\\[A-Za-z@]+\\)" 2
font-lock-function-name-face keep)
("\\\\\\(addto\\(?:counter\\|length\\)\\|newcounter\\*?\\|set\\(?:counter\\|\\(?:leng\\|towid\\)th\\)\\) *{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"
2 font-lock-variable-name-face)
("\\\\\\(bibliography\\|document\\(?:class\\|style\\)\\|epsf\\(?:ig\\)?\\|in\\(?:clude\\(?:graphics\\*?\\|only\\)?\\|put\\)\\|nofiles\\|psfig\\|usepackage\\|verbatiminput\\) *\\(\\[[^]]*\\] *\\)*{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"
3 font-lock-builtin-face)
("^[ ]*\\\\def *\\\\\\(\\(\\w\\|@\\)+\\)" 1
font-lock-function-name-face)
("\\\\\\(bibitem\\|cite\\|eqref\\|glossary\\|index\\|label\\|nocite\\|\\(?:page\\|v\\)?ref\\) *\\(\\[[^]]*\\] *\\)*{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"
3 font-lock-constant-face)
("\\(\"[<`]\\|<<\\|``\\|«\\)[^'\">»]+\\(\"['>]\\|''\\|>>\\|»\\)"
. font-lock-string-face)
("\\\\\\(\\\\\\*?\\|allowdisplaybreaks\\|clear\\(?:\\(?:double\\)?page\\)\\|displaybreak\\|enlargethispage\\|linebreak\\|n\\(?:ew\\(?:\\(?:lin\\|pag\\)e\\)\\|o\\(?:\\(?:lin\\|pag\\)ebreak\\)\\)\\|pagebreak\\)"
. font-lock-warning-face)
"\\\\\\([a-zA-Z@]+\\**\\|[^ \n]\\)"
("\\\\\\(boldsymbol\\|pmb\\|text\\(?:bf\\|sc\\|up\\)\\) *{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"
2 'bold append)
("\\\\\\(emph\\|text\\(?:it\\|sl\\)\\) *{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"
2 'italic append)
("\\\\\\(\\(bf\\)\\|em\\|it\\|sl\\)\\>\\(\\([^}&\\]\\|\\\\[^\\]\\)+\\)"
3 (if (match-beginning 2) 'bold 'italic) append))
Documentation
Gaudy expressions to highlight in TeX modes.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex-font.el
(defconst tex-font-lock-keywords-2
(append tex-font-lock-keywords-1
(eval-when-compile
(let* (;;
;; Names of commands whose arg should be fontified with fonts.
(bold (regexp-opt '("textbf" "textsc" "textup"
"boldsymbol" "pmb")
t))
(italic (regexp-opt '("textit" "textsl" "emph") t))
;; (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") t))
;;
;; Names of commands whose arg should be fontified as a citation.
(citations (regexp-opt
'("label" "ref" "pageref" "vref" "eqref"
"cite" "nocite" "index" "glossary" "bibitem"
;; These are text, rather than citations.
;; "caption" "footnote" "footnotemark" "footnotetext"
)
t))
;;
;; Names of commands that should be fontified.
(specials (regexp-opt
'("\\" "\\*" ;; "-"
"linebreak" "nolinebreak" "pagebreak" "nopagebreak"
"newline" "newpage" "clearpage" "cleardoublepage"
"displaybreak" "allowdisplaybreaks" "enlargethispage")
t))
(general "\\([a-zA-Z@]+\\**\\|[^ \t\n]\\)")
;;
;; Miscellany.
(slash "\\\\")
(opt " *\\(\\[[^]]*\\] *\\)*")
(arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
(list
;;
;; Citation args.
(list (concat slash citations opt arg) 3 'font-lock-constant-face)
;;
;; Text between `` quotes ''.
(cons (concat (regexp-opt `("``" "\"<" "\"`" "<<" "«") t)
"[^'\">»]+" ;a bit pessimistic
(regexp-opt `("''" "\">" "\"'" ">>" "»") t))
'font-lock-string-face)
;;
;; Command names, special and general.
(cons (concat slash specials) 'font-lock-warning-face)
(concat slash general)
;;
;; Font environments. It seems a bit dubious to use `bold' etc. faces
;; since we might not be able to display those fonts.
(list (concat slash bold " *" arg) 2 '(quote bold) 'append)
(list (concat slash italic " *" arg) 2 '(quote italic) 'append)
;; (list (concat slash type arg) 2 '(quote bold-italic) 'append)
;;
;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables.
(list (concat "\\\\\\(\\(bf\\)\\|em\\|it\\|sl\\)\\>"
"\\(\\([^}&\\]\\|\\\\[^\\]\\)+\\)")
3 '(if (match-beginning 2) 'bold 'italic) 'append)))))
"Gaudy expressions to highlight in TeX modes.")