Werner LEMBERG <w...@gnu.org> writes:

> [auctex git version around May 11th, 2023]
>
>
> If I have a document like this
>
> ```
> \documentclass{article}
>
> \usepackage{fvextra}
> \DefineShortVerb{\|}
>
> \begin{document}
> |foo|
> \end{document}
>
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% LaTeX-shortvrb-chars: (?|)
> %%% End:
> ```
>
> `|foo|` is not fontified as verbatim input.  I have to add
>
> ```
> %%% eval: (TeX-run-style-hooks "shortvrb")
> ```
>
> to the local variable block to get proper fontification.  Is there a
> more elegant solution?

You could try something like this in your .tex file:

  \usepackage{shortvrb,fvextra}

It shouldn't break your .tex file and will help AUCTeX to DTRT.

> Or maybe it makes sense to always activate the (possibly adapted)
> 'shortvrb' style for 'fancyvrb'?

I think the best option would be to add the corresponding code from
'shortvrb' to 'fancyvrb'.  I put that on my list.

Best, Arash

Reply via email to