Re: Latex->Lyx bug ?

1999-06-11 Thread Jean-Marc Lasgouttes

> "Risto" == Risto Kuusisto <[EMAIL PROTECTED]> writes:

Risto> Hello!

Risto> I think there's a bug when you import the following type of
Risto> equation label to lyx:

Risto> (here's the original piece of latex code, 1'st the label)

Risto>   \begin{equation} \label{eq:syst_1} y(t)+A_1 y(t-1)=B_0
Risto> u(t-1)+ e(t)+C_1 e(t-1), \end{equation}

The file BUGS in the lib/reLyX directory says:

- The underscore character '_', when used as an argument to an unknown command,
may be copied incorrectly. \foo{a_b} will be copied in TeX mode as \foo{a_{b}}.
'_' in math mode works fine.  It also works fine as the argument to known
tokens, like \cite{foo_bar}, or even in translated arguments to untranslatable
commands (see the Syntax Files section of the man page).  Also, if you have
an underscore in a file name, you have to use the LaTeX style of \input. That
is, write "\input{a_b}" instead of the old TeX style "\input a_b" (even though
the latter is legal LaTeX). If \includegraphics can't be copied for various
reasons (see the reLyX man page), underscore will break. Finally, 
\label{foo_bar} in math mode will break.


Basically, it is better to avoid using _ in labels. The reLyX author
(Amir) is currently not available for comment, but I think he said
that this one is difficult to solve due to the structure of reLyX.

JMarc









Latex->Lyx bug ?

1999-06-10 Thread Risto . Kuusisto



Hello!

I think there's a bug when you import the following type of
equation label to lyx:

(here's the original piece of latex code,
 1'st the label)

  \begin{equation} \label{eq:syst_1}
y(t)+A_1 y(t-1)=B_0 u(t-1)+
e(t)+C_1 e(t-1),
  \end{equation}

(and then the reference in text)


 A natural state space representation for (\ref{eq:syst_1}) can be
 achieved by substitution $y(t)= x(t)+ e(t)$, which leads to the
 state space model

Now when you import this to Lyx and then export it back to Latex, the same
piece of Latex has been changed to the following:

(1'st the label)

 \begin{equation}
 \label{eq:syst_{1}}
 y(t)+A_{1}y(t-1)=B_{0}u(t-1)+e(t)+C_{1}e(t-1),
 \end{equation}

(then the reference)

 A natural state space representation for (\ref{eq:syst_1}) can be achieved
 by substitution \( y(t)=x(t)+e(t) \), which leads to the state space model

As you can see, the label and the reference are not the same anymore, Latex->Lyx
 has
generated {}-characters around the number in the label definition, but not in
the reference
field. This also means that Lyx can't find anymore the corresponding label in
question.
If you now look at the final ps-output, the reference point shows only this:
(??).
The same change can be seen in the generated lyx-file also.


Any comments ?