[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Listing and not listing regions inverted if `\begin{lstlist
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX] Listing and not listing regions inverted if `\begin{lstlisting}' not followed by what is expected |
Date: |
Sun, 22 Mar 2015 10:02:20 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Denis Bitouzé <address@hidden> writes:
Hi Denis,
> \newenvironment{latexcode}
> {%
> \VerbatimOut{tmp.tex}%
> }{%
> \endVerbatimOut%
> \lstinputlisting{tmp.tex}%
> }
>
> \begin{document}
> \begin{frame}[fragile]
> \begin{latexcode}
> \begin{lstlisting}+\only<2->{+[+\emph{options}+]+}+
> +\emph{listing}+
> \end{lstlisting}
> \end{latexcode}
The problem is that AUCTeX has no clue that latexcode is a verbatim
environment, and therefore its complete content should be displayed with
the verbatim face. Just add it as such ino your local variables
section:
--8<---------------cut here---------------start------------->8---
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% eval: (add-to-list 'LaTeX-verbatim-environments-local "latexcode")
%%% End:
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo