Le 06/08/11 17:40, Uwe Stöhr a écrit :
\begin{lyxcode}
~~~Hello~~Hello~~\end{lyxcode}

This is wrong because if the line is too long, LaTeX tries to break the
line and does this at the first possibility - and this is at the
beginning of course. Thus the leading spaces get lost which was reported
as bug #4742. The fix consists of two things:

1. automatically transform the spaces to '\ ' instead of '~'
2. allow the user to insert a protected space to the LyX-Code
environment if he needs this

This solution is the result of a discussion at comp.text.tex with the
TeX experts Oberdiek, Kastrup and Arseneau.

I think lyxcode is fundamentally flawed, but nobody dares fixing it :)
Could we just use alltt or even verbatim instead?

Another solution would be to use \obeyspace there and just remve the freespace nonsense. This is more work, but a better result. For this we could have to create a new value freespacing=2 that means "allow mutiple spaces, but output them as normal spaces.

JMarc

Reply via email to