0

Here's my MWE:

\documentclass{article}

\newenvironment{tscode}{}{}
\def\tscode|#1|{}

\begin{document}
\tsinline|efwe|
\begin{tscode}
efihw$feiw$
\end{tscode}
\end{document}

% Local Variables:
% LaTeX-verbatim-environments-local: ("tscode")
% LaTeX-verbatim-macros-with-delims-local: ("tsinline")
% End:

I've verified the buffer is loading as LaTeX-mode and that the variables listed have the quoted values given as the file-local value, but fontlock is still incorrect after saving&reverting the buffer:

-

I've had this working before, but I'm not sure what changed in my configuration. I'm assuming no incompatible changes with AucTeX have been introduced in the last three months or so.

Related:

3
  • OT: what theme/font are you using?
    – Tyler
    Commented Nov 29, 2018 at 19:31
  • @Tyler The font looks like DejaVu Sans Mono. (A bit late but it's resurrection time… :-) Commented Apr 8, 2023 at 9:45
  • I can confirm it would've been DejaVu Sans Mono – as for the theme… that config is long gone, I'm afraid :-) Commented Apr 11, 2023 at 13:28

2 Answers 2

0

I can't reproduce what you're describing. Your example looks like this for me (with latest AUCTeX from ELPA):

enter image description here

You can try to eval the form (font-latex-update-font-lock t) and see if it helps. Also, try to disable the theme you're using. Otherwise, check your config again.

0

I get this rendition:

Screenshot showing fontlock rendition.

It produces an error when I run it through LaTeX because I don't have a definition for \tsinline. The colors are different from those of @Sean-allred, no doubt because I'm using a different theme (I'm using the modus vivendi theme. But I see that in his screenshot \tsinline and \def are in distinct colors, whereas in mine they're treated identically.

I'm Using AucTeX 14.0.6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.