3

I am trying Lyx. I started Lyx and asked it to import this plain Latex file:

\documentclass[12pt]{article}% 
\usepackage{amsmath}
\begin{document}

\begin{align}
A  &= B+C   \tag{33}\\
D  &= F+G   \tag{34}
\end{align}

\end{document}

Mathematica graphics

However it seems Lyx adds its own tags to each equation, giving this result on the screen

Mathematica graphics

This seems to be just a configuration issue, as I saw few things about it, but I do not understand what the issue exactly.

There is a related question here Automatic equation numbering in LyX but I tried the suggestion there for this case, and I still see the double tags in there.

Mathematica graphics

I also tried to import the same latex file, without the amsmath package, like this

   \documentclass[12pt]{article}% 
    %%%%%%   \usepackage{amsmath}  %% comment out for Lyx
    \begin{document}    
    \begin{align}
    A  &= B+C   \tag{33}\\
    D  &= F+G   \tag{34}
    \end{align}    
    \end{document}

But still the double \tag showed up.

Could some one please explain (in simple terms, as I am newbie in Lyx) what I need to do to remove the tag that Lyx adds and tell it to use the original tags in the latex file?

I am trying to test Lyx to see how it handles some of my Latex files, and I want to keep the same equation numbers and not change them.

Mathematica graphics

  • 1
    This is only a problem in the LyX GUI, if you view the PDF your custom numbers are used. – Torbjørn T. Feb 26 '14 at 10:58
  • not being a lyx user, but being quite familiar with the coding of math, i'm confused by the contention that amsmath isn't used, since i don't know of any other package that defines the align environment. perhaps this refers only to the fact of commenting out the \usepackage line in the imported latex file? – barbara beeton Feb 26 '14 at 14:34
3

Very nicely written question, Nasser. As Torbjørn T. said, this is a LyX GUI issue. You can post an enhancement request at http://www.lyx.org/trac/.

You might be interested in going to Tools > Preferences > Look & Feel > Display and turning Instant Preview to "on". Then the correct equation numbers will be displayed when you are not editing the equation. (After you enable this feature, click inside the equation and then click out for it to refresh the first time). This gives the following:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.