<venom00 <at> arcadiaclub.com> writes:

> 
> Hello, when I put LaTeX code in a listing it seems backslashes aren't escaped
(at least in View -> Show
> source) and so it's executed while generating the output, is this a sort of
expected behaviour or should I
> file a bug? Should be an easyfix.
> 

I would classify it as expected behavior.  It is possible to insert either LaTeX
macros (to be executed) in a listing, by setting the mathescape option true
and/or specifying escapechar, escapeinside or escapebegin/escapeend.  I've used
this to insert math expressions, for instance (including Greek letters, arrows,
relational symbols etc.).  If LyX automatically escaped backslashes, that would
be broken.

On the other hand, when I enter something like '\thepage' in the body of a
listing, even though View->Source shows what looks like a single backslash, the
DVI output contains '\thepage' verbatim, not the page number that would be there
if the macro were executed.  So I'm not seeing the problem.  Do you have an
example where it is executed?

This is on LyX 1.6.5.  I haven't tested on 2.0.

Paul

Reply via email to