[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Underline fontification

From: Hendrik Rommeswinkel
Subject: Underline fontification
Date: Mon, 13 Jun 2022 15:45:41 +0000

Dear auctex developers,

I would like to suggest introducing fontification of the \underline command and variations thereof from the ulem and soul packages. Unless emacs does not improve its overline face, I currently do not recommend fontification of \overline. Right now an overline is pretty much indistinguishable from an underline in the row above. Below is the git diff for overline fontification.


git diff origin/master master
diff --git a/font-latex.el b/font-latex.el
index 92b6047a..93ae9bb0 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -431,6 +431,10 @@ variable `font-latex-fontify-sectioning'." ',num)
      (("emph" "{") ("textit" "{") ("textsl" "{") ("mathit" "{"))
      font-latex-italic-face 1 command)
+    ("underline-command"
+     (("underline" "{") ("ul" "{") ("uuline" "{") ("uwave" "{") ("dotuline" "{")
+      ("dashuline" "{"))
+     font-latex-underline-face 1 command)
      (("ensuremath" "|{\\"))
      font-latex-math-face 1 command)

@@ -1143,6 +1147,20 @@ have changed."
   "Face used to highlight text to be typeset in italic."
   :group 'font-latex-highlighting-faces)

+(defface font-latex-underline-face
+  (let ((font '(:inherit underline)))
+    `((((class grayscale) (background light))
+       (:foreground "DimGray" ,@font))
+      (((class grayscale) (background dark))
+       (:foreground "LightGray" ,@font))
+      (((class color) (background light))
+       (:foreground "DarkOliveGreen" ,@font))
+      (((class color) (background dark))
+       (:foreground "OliveDrab" ,@font))
+      (t (,@font))))
+  "Face used to highlight text to be underlined."
+  :group 'font-latex-highlighting-faces)
 (defface font-latex-math-face
   (let ((font '(:inherit underline)))
     `((((class grayscale) (background light))

Attachment: publickey - - 0xA02357C6.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]