I'm having trouble defining bold and underline combinations that do not conflict with each other. A single underline trumps part of the bold and underline. Any ideas regarding how to distinguish them so that they do not conflict? I'd like to keep each of the LaTeX commands as separate colors.
Bold & Underline: {\bf\uline{insert-text}}
Underline: \uline{insert-text}
[NOTE 1: I don't use \underline because it cannot wrap multiple lines correctly.]
[NOTE 2: The variable code for insert-text should also permit me to highlight certain keywords that fall within that variable code.]
[NOTE 3: The same problem will likely happen with bold separately: {\bf insert-text}]
(font-lock-add-keywords 'latex-mode (list
(list (concat "\\(\{\\)\\(\\\\bf\\)\\(\\\\uline\\)\\(\{\\)\\(\\(.\\|\n\\)+?\\)\\(\}\\)\\(\}\\)")
'(1 lawlist-regular t)
'(2 lawlist-red t)
'(3 lawlist-blue t)
'(4 lawlist-regular t)
'(5 lawlist-bold-underline t)
'(7 lawlist-regular t)
'(8 lawlist-regular t))
(list (concat "\\(\\\\uline\\)\\(\{\\)\\(\\(.\\|\n\\)+?\\)\\(\}\\)")
'(1 lawlist-green t)
'(2 lawlist-regular t)
'(3 lawlist-underline t)
'(5 lawlist-regular t))
lawlist-keywords
))
\uline{insert-text}so that it precedes{\bf\uline{insert-text}}in theinit.elmay have done the trick. I'm not sure I understand why, but it appears to work. In other words, switching the order of the two list . . . concat definitions seems to resolve the issue. - lawlistinit.elmatters, although I do not fully understand why that is the case. - lawlist