Jean-Marc Lasgouttes wrote:

> Georg, could tex2lyx undo this quoted-printable stuff (maybe when it
> detects that the file was produced by LyX...)? It seems reasonably
> safe to me...

Except when the label occurs in a user command: We cannot understand that in
this snippet:

\newcommand{\myref}[1]{\ref{#1} bla}
\label{my fancy label that works even with umlauts ä}
\myref{my fancy label that works even with umlauts ä}

we need to translate the argument of \myref{}. This example shows also
another problem: labels with umlauts work here, but after the conversion to
lyx the umlaut in the \label argument will be encoded...
The only safe solution that I see is to check wether a \label or \ref
contains characters that are encoded by LyX and produce an ERT in this
case.
The long term solution is IMHO a commandline switch that chooses between
"safe" mode (where the aim is to get 100% identical TeX code after the tex
-> lyx -> tex round trip) and "sloppy" mode (where the aim is to translate
as much as possible to LyX constructs with a possibly invalid result).

> The algorithm could be to do it only when the hex code represents a
> character that would be encoded by LyX.

This would be a prerequisite. But I think we should be safe and don't
translate the labels.


Georg

Reply via email to