I am attempting to vertically align two equations at multiple points and I have come up with the following:

\eta(n)&\equiv&\frac{\Lambda(n)}{\log n}&\equiv&\sum_{d\mid n}&\mu\left(\frac nd\right)\log_nd\\
\eta(p(x))&\equiv&\frac{\Lambda(p(x))}{\log p(x)}&\equiv&\sum_{c(x)\mid p(x)}&\mu\left(\frac {p(x)}{c(x)}\right)\log_{p(x)}c(x)

The problem I'm encountering is that there is too much space between the right-most \sum and the following \mu, but if I remove the alignment markers then the \sum symbols do not align. Is there a simple way to fix this? I arrived at this point while trying to get the \sum parts to be vertically aligned, and this part of the alignment is what I most want to keep, followed immediately by the \equivs and the \eths (with right-alignment for the \eths).

Is there a simple way to resolve this?

  • 1
    Welcome to TeX.SX! I would simply center both equation using gather* (with \usepackage{amsmath}); I think that aligning the \equiv and \sum signs doesn't add to readability, but rather that it hinders it. Can you add at least the definition for \eth? – egreg Oct 10 '14 at 22:24
  • @egreg: thank you; I certainly see what you are saying about hindrance particularly due to the extra spacing. My intent is to convey the similarity of the formulas and I was hoping that vertical alignment would help with that. So, are you saying that there is no (easy) way to reduce the spacing created by this alignment technique? – abiessu Oct 10 '14 at 22:28
  • Oh, sorry, I'll pick another variable then... I'm just working locally using MathJAX and I'm unfamiliar with where some of the symbols actually come from... – abiessu Oct 10 '14 at 22:30

I don't think that aligning the \equiv and \sum signs adds to readability; to the contrary, I believe that it hinders it.

Anyway, with some more work one can get the required alignments.

I made also some improvements, defining a \moebius command that uses \DeclarePairedDelimiter, so you can say

\moebius{x}        % normal size
\moebius[\big]{x}  % big size
\moebius[\Big]{x}  % Big size
\moebius[\bigg]{x} % bigg size
\moebius[\Bigg]{x} % Bigg size
\moebius*{x}       % automatic sizing, use sparingly

The package array and \newcolumntype are necessary only for the second way of typesetting the formulas.




My proposal
\partial(n)\equiv\frac{\Lambda(n)}{\log n}\equiv\sum_{d\mid n}\moebius*{\frac{n}{d}}\log_nd\\
\partial(p(x))\equiv\frac{\Lambda(p(x))}{\log p(x)}\equiv\sum_{c(x)\mid p(x)}
With multiple alignments
\begin{array}{Mr Mc Mc Mc Ml}
\partial(n) &
  \equiv &
  \frac{\Lambda(n)}{\log n} &
  \equiv &
  \sum_{\mathmakebox[\widthof{$\scriptstyle c(x)\mid p(x)$}]{d\mid n}}
\partial(p(x)) &
  \equiv &
  \frac{\Lambda(p(x))}{\log p(x)} &
  \equiv &
  \sum_{c(x)\mid p(x)}\moebius*{\frac{p(x)}{c(x)}}\log_{p(x)}c(x)

enter image description here

  • Don't you think you should ‘mathclap’ the sums subscripts? – Bernard Oct 10 '14 at 23:16
  • @Bernard That would be an option, but I don't like it very much and, anyway, the subscript would be too under the \equiv. – egreg Oct 10 '14 at 23:18
  • Thank you! I guess that another option would be to left- or right-align the limits with the \sums, but that seems like it would cause its own problems and not improve anything. – abiessu Oct 11 '14 at 0:12
  • @Bernard: sadly, it seems that \mathclap|\mathrlap|\mathllap are not available in the version of MathJAX I have. But it's okay, I'll probably come up with a better way of presenting these function definitions before it really matters. Thank you for the suggestion. – abiessu Oct 12 '14 at 6:07
  • @abiessu MathJax is not LaTeX, although it shares the basic syntax. Most of the TeX constructions that require measuring simply don't work. – egreg Oct 12 '14 at 8:44

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.