I need to explain two different elements in two different lines of an equation in math mode. I'm using this piece of code:

h(z)=0 &\Leftrightarrow \sinh\frac{1}{z}=0 \markno{\Leftrightarrow}{According to ...} \frac{2}{z} = 2\pi i n  \\&\marknoup{\Leftrightarrow}{$n$ is whole} z = \frac{i}{\pi n}

(I'm shortening to make it clearer)

I'm using these macros:

\newcommand\markno[2]{\begin{array}[t]{@{\,}c@{\,}} #1 \\ \downarrow \\ \makebox[0pt]{\scriptsize #2} \end{array}}
\newcommand\marknoup[2]{\begin{array}[b]{@{\,}c@{\,}} \makebox[0pt]{\scriptsize #2}\\ \uparrow \\ #1 \end{array}}

The thing is, that LaTeX automatically spaces the lines, so that the "According two" is above (in height) "n is whole". I'm using two different arrows exactly to avoid that; I want them to overlap in height, in order to save space.

I tried using \vspace, but for some reason it doesn't work well for me.

  • 1
    Write \\[-16pt] instead of \\ in the align* – egreg Jan 29 '12 at 22:35

You can manually adjust the space between the lines in an align environment by adding an optional argument after the line end; e.g. \\[-5mm] instead of just \\. You could also try using \smash (see page 55 of the Not So Short Introduction, or sections 2 & 3 of A complement to \smash, \llap, and \rlap for details).

  • Thanks, it works. As for \smash, in the manual they use it in an inline equation. Can it be used in an align environment as well? – Hugo Jan 29 '12 at 22:43
  • Yes. I have added a reference to a document that describes \smash in more detail. – Ian Thompson Jan 29 '12 at 22:50

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.