Skip to content

Commit

Permalink
refactor(latex): move fontification tweaks to me-latex
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 1, 2023
1 parent de449e3 commit 22fe929
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 98 deletions.
97 changes: 0 additions & 97 deletions modules/extras/me-latex-fonts.el

This file was deleted.

87 changes: 86 additions & 1 deletion modules/me-latex.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,92 @@
;; Electric pairs in auctex
(customize-set-variable 'TeX-electric-sub-and-superscript t)
(customize-set-variable 'LaTeX-electric-left-right-brace t)
(customize-set-variable 'TeX-electric-math (cons "$" "$")))
(customize-set-variable 'TeX-electric-math (cons "$" "$"))

;; Fontification taken from: tex.stackexchange.com/a/86119/81279
(setq font-latex-match-reference-keywords
'(;; BibLaTeX.
("printbibliography" "[{")
("addbibresource" "[{")
;; Standard commands.
("cite" "[{")
("citep" "[{")
("citet" "[{")
("Cite" "[{")
("parencite" "[{")
("Parencite" "[{")
("footcite" "[{")
("footcitetext" "[{")
;; Style-specific commands.
("textcite" "[{")
("Textcite" "[{")
("smartcite" "[{")
("Smartcite" "[{")
("cite*" "[{")
("parencite*" "[{")
("supercite" "[{")
;; Qualified citation lists.
("cites" "[{")
("Cites" "[{")
("parencites" "[{")
("Parencites" "[{")
("footcites" "[{")
("footcitetexts" "[{")
("smartcites" "[{")
("Smartcites" "[{")
("textcites" "[{")
("Textcites" "[{")
("supercites" "[{")
;; Style-independent commands.
("autocite" "[{")
("Autocite" "[{")
("autocite*" "[{")
("Autocite*" "[{")
("autocites" "[{")
("Autocites" "[{")
;; Text commands.
("citeauthor" "[{")
("Citeauthor" "[{")
("citetitle" "[{")
("citetitle*" "[{")
("citeyear" "[{")
("citedate" "[{")
("citeurl" "[{")
;; Special commands.
("fullcite" "[{")
;; Cleveref.
("cref" "{")
("Cref" "{")
("cpageref" "{")
("Cpageref" "{")
("cpagerefrange" "{")
("Cpagerefrange" "{")
("crefrange" "{")
("Crefrange" "{")
("labelcref" "{"))
font-latex-match-textual-keywords
'(;; BibLaTeX brackets.
("parentext" "{")
("brackettext" "{")
("hybridblockquote" "[{")
;; Auxiliary commands.
("textelp" "{")
("textelp*" "{")
("textins" "{")
("textins*" "{")
;; Subcaption.
("subcaption" "[{"))
font-latex-match-variable-keywords
'(;; Amsmath.
("numberwithin" "{")
;; Enumitem.
("setlist" "[{")
("setlist*" "[{")
("newlist" "{")
("renewlist" "{")
("setlistdepth" "{")
("restartlist" "{")
("crefname" "{"))))

;; Adapted from Doom Emacs
(use-package auctex-latexmk
Expand Down

0 comments on commit 22fe929

Please sign in to comment.