3

Edit: The following example code is slightly misleading because it contains non-breakable space (which actually causes the bug, see solution). Beware that Option + space produces this character and it isn't marked differently in any way (at least on macos 10.12.) just like in this question. Original:

\documentclass[12pt,a4paper,oneside]{article}
\begin{document}
\begin{eqnarray}
p&=& 0 \\
a&=& 0 \\
h&=& 0
\end{eqnarray}
\end{document}

enter image description here

One of these simple & similar equations inside an eqnarray is typeset to be aligned differently: the second one RHS is slightly moved to the right. I haven't encountered anything like this in other align environments. This isn't even persistent, haven't been able to pinpoint the cause. (Might be typset engine/LaTeX build related; MWE typeset in TeXShop 4.44 on macos 10.12., see log below.) Luckily this isn't for some important document and not even very bothering, but curious anyway...

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./mwe.tex
LaTeX2e <2018-12-01>
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size12.clo)) (./mwe.aux)
[1{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./mwe.aux) )</usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm
/cmmi12.pfb></usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/
cmr12.pfb>
Output written on mwe.pdf (1 page, 18233 bytes).
SyncTeX written on mwe.synctex.gz.
Transcript written on mwe.log.
7
  • 7
    Welcome to TeX.SE. A quick question: Why are you employing eqnarray in the first place? Don't do it. Use align instead.
    – Mico
    Dec 2, 2020 at 23:49
  • 1
    Welcome to TeX.SX! If I compile your example, everything is correctly aligned. However, note that it is preferable to use align than to use eqnarray.
    – Vincent
    Dec 2, 2020 at 23:49
  • 1
    I tested your example with texlive 2016,2017,2018,2019,2020 and did not see the mis-aligned space. Dec 2, 2020 at 23:53
  • can you add \showoutout and post the log? Dec 3, 2020 at 0:06
  • 1
    @Mico I took that habit 11 years ago and never noticed these issues (even though i do use nonumber regularly). May be high time to phase it out anyway... Dec 4, 2020 at 21:41

1 Answer 1

8

enter image description here

\documentclass[12pt,a4paper,oneside]{article}
\begin{document}
\begin{eqnarray}
p&=& 0 \\
a&=&  0\\
h&=& 0
\end{eqnarray}
\end{document}

This has a non breaking space (U+00A0) in the middle row (although posting to this site makes it appear as a normal space so I can not check the example you posted, as it has a normal space in your question even if the file you posted had nbsp)

1
  • 1
    Today i looked at the issue again, and had the same suspicion, turns out that was the culprit all along. What i missed was that i can introduce an nbsp as a typo because Option + space produce a nbsp marked identically to a regular space (at least on macos 10.12.), which is likely to occur since the preceding character is Option + 1 = & on my keyboard layout. Dec 4, 2020 at 21:52

You must log in to answer this question.

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