1

I asked this on the lyx user list but haven't got an answer (http://marc.info/?l=lyx-users&m=137891444218650&w=2).

I would like to include text lines in align environment using 'leqno' option of amsmath package.

This inserts numbers in front of each line and aligns the lines giving an output like this:

|(1)                aligned text = line
|(2)                   something = other something
|(3)                         ab  = CD

The | represents the left margin (specified for text pages).

How could I set the exact position of the number, for example to move it to the right, closer to the aligned lines (or increase the margin for the number)? I find the space between numbers and aligned text too big. Instead of the above I would like to get something like this:

align environment 1:

|              (1)  A. aligned text = line
|              (2)        something = other something
|              (3)              ab  = CD

align environment 2:

|        (1)                       something = other something
|        (2)  B. this is longer aligned text = linedifferent 
|        (3)                             ab  = CD

See that I have different align environments and the indentations have to be the same within the same align but should be different between different aligns, depending on the length of the aligned lines. I would prefer to set the distance between the number and the left edge of the aligned stuff (labels A. and B. above), and the indentation should be adjusted according to this.

Is this possible?

Thanks,

bcsikos

2
  • do you want the equation number indented on all numbered equations, or only on certain specific lines? and if on all numbered lines, do you want the indentation always to be the same, or might some be different from others? Commented Sep 12, 2013 at 13:02
  • I want all numbers to be indented. I edited my question to make it clearer what I want to achieve.
    – bcsikos
    Commented Sep 24, 2013 at 16:15

1 Answer 1

1

Plan B:

enter image description here

\documentclass{article}
\usepackage[leqno]{amsmath}
\begin{document}

\noindent X\dotfill X

\begin{align}
a&=b\\a&=b\\a&=b
\end{align}

\noindent X\dotfill X

\makeatletter
\def\maketag@@@#1{\hbox{\hspace{2cm}\m@th\normalfont#1}}
\makeatother

\begin{align}
a&=b\\a&=b\\a&=b
\end{align}


\noindent X\dotfill X

\end{document}

Plan A:

Generally the way to control margins in LaTeX is via a list structure (see how quote is defined in article class)

enter image description here

\documentclass{article}
\usepackage[leqno]{amsmath}
\begin{document}

\noindent X\dotfill X

\begin{align}
a&=b\\a&=b\\a&=b
\end{align}

\noindent X\dotfill X

\begin{list}{}{\setlength\leftmargin{4cm}}\item\relax
\noindent X\dotfill X
\begin{align}
a&=b\\a&=b\\a&=b
\end{align}
\end{list}

\noindent X\dotfill X

\end{document}
13
  • In this solution the whole stuff goes to the right. I would like the aligned lines to be kept centered and only the numbers get closer to the left side of the aligned lines.
    – bcsikos
    Commented Sep 24, 2013 at 16:19
  • @bcsikos Oh OK see update Commented Sep 24, 2013 at 16:27
  • note that, while this works with article, it won't work with amsart because of the editorial decision that the position of display math won't be affected by the indentations of list environments. a different mechanism would have to be devised to get the requested effect with any ams document class. Commented Sep 24, 2013 at 16:37
  • @barbarabeeton true of the original plan a but not of the updated plan b (which is what the OP wanted I think) Commented Sep 24, 2013 at 16:41
  • @DavidCarlisle -- replace article with amsart and run your example. (i just did.) if you get indented equation numbers, please let me know -- that will be a bug that needs to be attended to. Commented Sep 24, 2013 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .