Uwe Stöhr wrote:

> Am 04.03.2012 22:47, schrieb Jean-Marc Lasgouttes:
> 
>> The point that Georg wanted to make is that we know what the correct
>> solution is: reset all catcodes in the parser when we are in verbatim, or
>> just read character by character until we find \end{verbatim}.
> 
> I'm not sure about the catcodes. What we need to do is to parse verbatim
> as plain text without any change except for backslashes.

Yes. Unfortunately this is not done, since special properties of characters 
like % are already handled in the tokenize phase. For example,

\begin{verbatim}
x
%\end{verbatim}

is not handled correctly, since tex2lyx believes that %\end{verbatim} is a 
comment. Jean-Marc is right: The input must either be read with changed 
catcodes (probably more difficult), or character by character, not token by 
token (probably more easy).


Georg


Reply via email to