Le 25/01/2016 19:47, Georg Baum a écrit :
Kornel Benko wrote:

Am Sonntag, 24. Januar 2016 um 22:19:25, schrieb Georg Baum
<georg.b...@post.rwth-aachen.de>

See http://www.lyx.org/trac/ticket/4595 for label insets, there are
similar bugs for other insets that expect LaTeX code. Unfortunately this
behaviour is indeed not documented as Günter noticed, and this should be
changed soon IMHO.

I am not sure whether a test is needed at all. This is expected
behaviour, and if we implement the solution suggested by Jürgen, then
this file will fail to compile forever, because of backward
compatibility.


Since the error happens only if processed by latex, we could as well
handle the string on latex export.

This is actually the plan, but non unconditionally. The outcome of various
previous discussions on this subject is that in some cases the current
implementation makes sense: Otherwise it would not be possible to enter
stuff that is not supported by LyX into these insets (or we'd need to make
the input fields some sort of mini LyX workarea, where you can also input an
ERT inset, but this would be quite complicated).

Therefore, the solution proposed by Jürgen is to have a switch "Use LaTeX
input" for those insets, and depending on the switch either export the
contents unfiltered, or with the usual escaping mechanism applied. This
switch would also ease the lyx2lyx implementation quite a bit.


I have seen this suggestion before, and thought about it in relationship
with another bug where somebody complained that it was not possible to
correctly paste lyx contents into dialogs (forgot for which purpose
exactly). IMO this would be solved by pasting the latex contents (if
available) when the tex switch is on. So, I not only like this idea but
I also think that it would be worth it to carefully craft a custom
widget to be used consistently throughout the interface (whenever
relevant), incorporating such an idea. I wanted to share this pasting
idea for some time, now done.



Reply via email to