6
$\begingroup$

In this comment, the fraction $\frac{(2n+2)!}{(n+1)!}$ is misaligned. I repeated the same input in a second comment underneath the first, and the alignment gets even worse there. Here's a screenshot from my browser (Firefox $44.0.2$, Mac OS $10.5.5$):

enter image description here

Here's the input for the affected equation:

\binom{2n}n=\frac{(2n)!}{n!^2}=\frac{(n+1)^2}{(2n+1)(2n+2)}\frac{(2n+2)!}{(n+1)!‌​‌​}=\frac{(n+1)^2}{(2n+1)(2n+2)}\binom{2(n+1)}{n+1}

This is the only related question I could find; as far as I can tell, that was a different issue that was resolved.

$\endgroup$
  • $\begingroup$ Is this specific to comments, or does it behave the same way in questions/answers. $\endgroup$ – Martin Sleziak Mar 6 '16 at 8:37
  • $\begingroup$ Test: $$\binom{2n}n=\frac{(2n)!}{n!^2}=\frac{(n+1)^2}{(2n+1)(2n+2)}\frac{(2n+2)!}{(n+1)!‌​‌​}=\frac{(n+1)^2}{(2n+1)(2n+2)}\binom{2(n+1)}{n+1}$$ \binom{2n}n=\frac{(2n)!}{n!^2}=\frac{(n+1)^2}{(2n+1)(2n+2)}\frac{(2n+2)!}{(n+1)!‌​‌​}=\frac{(n+1)^2}{(2n+1)(2n+2)}\binom{2(n+1)}{n+1} $\endgroup$ – Jyrki Lahtonen Mar 6 '16 at 8:45
  • 3
    $\begingroup$ Test: $\binom{2n}n= \frac{(2n)!}{n!^2}= \frac{(n+1)^2}{(2n+1)(2n+2)}\frac{(2n+2)!}{(n+1)!} = \frac{(n+1)^2}{(2n+1)(2n+2)} \binom{2(n+1)}{n+1}$ $\binom{2n}n= \frac{(2n)!}{n!^2}= \frac{(n+1)^2}{(2n+1)(2n+2)}\frac{(2n+2)!}{(n+1)!} = \frac{(n+1)^2}{(2n+1)(2n+2)} \binom{2(n+1)}{n+1}$ I have reposted the same thing but added spaces in some places. Is it possible that this is caused by an added invisible character as explained here? $\endgroup$ – Martin Sleziak Mar 6 '16 at 8:54
  • $\begingroup$ The screenshot looks like the FastPreview output. Do you see this if you disable the FastPreview via the MathJax menu? I.e. does either CommonHTML, HTML-CSS, or SVG output exhibit the problem? $\endgroup$ – Peter Krautzberger Mar 6 '16 at 12:34
  • $\begingroup$ @PeterKrautzberger: Yes, I disabled FastPreview and cycled through all the renderers; the problem always occurs (except of course for plain source). I think Martin's idea about the invisible character makes sense. $\endgroup$ – joriki Mar 6 '16 at 12:52
  • $\begingroup$ Thanks, @joriki. Will take a closer look when I get the chance. $\endgroup$ – Peter Krautzberger Mar 6 '16 at 13:00
  • $\begingroup$ The comment you linked to now seems ok, so probably some of the moderators has edited it. (So thanks to our moderators team.) $\endgroup$ – Martin Sleziak Mar 11 '16 at 10:26
7
$\begingroup$

There are several invisible characters in the input, and that is causing the unexpected alignment. The characters are U+200B (ZERO WIDTH SPACE) and U+200C (ZERO WIDTH NON-JOINER). These are the characters that the comment code inserts into long runs of characters that have no spaces. There several copies of them, so it may be that you edited the comment several times?

You can see the characters in the MathML output. If you use the MathJax contextual menu to Show Math As MathML (on the example in Jyrki's comment for example), then you should see

      ...
      <mn>2</mn>
      <mo stretchy="false">)</mo>
      <mo>!</mo>
    </mrow>
    <mrow>
      <mo stretchy="false">(</mo>
      <mi>n</mi>
      <mo>+</mo>
      <mn>1</mn>
      <mo>&#x200C;</mo>
      <mo>&#x200B;</mo>
      <mo stretchy="false">)</mo>
      <mo>!</mo>
      <mo>&#x200C;</mo>
      <mo>&#x200B;</mo>
      <mo>&#x200C;</mo>
      <mo>&#x200B;</mo>
    </mrow>
  </mfrac>
  <mo>=</mo>
  <mfrac>
  ...

where you can see the &#x200C; and &#x200B; in several places. These are throwing off the width of the denominator.

$\endgroup$
  • $\begingroup$ Yes, it may be that I edited the comment several times. Do additional space characters get inserted every time I edit it, and accumulate across edits? $\endgroup$ – joriki Mar 6 '16 at 22:29
  • $\begingroup$ I would expect the answer to be yes, though I haven't tested it. $\endgroup$ – Davide Cervone Mar 6 '16 at 23:53
1
$\begingroup$

A strange thing. In case it helps tracing the problem here's what it looks like if you insert a \qquad in front of the offending denominator. Posting this as an answer instead of a comment so that A) anyone so inclined can tinker with it more, B) the output won't be disturbed by the known 80-character feature preventing parsing of long TeX-snippets inside a comment.

Code snippet/output pairs follow

\binom{2n}n=\frac{(2n)!}{n!^2}=\frac{(n+1)^2}{(2n+1)(2n+2)}\frac{(2n+2)!}{\qquad(n+1)!} =\frac{(n+1)^2}{(2n+1)(2n+2)}\binom{2(n+1)}{n+1} $$ \binom{2n}n=\frac{(2n)!}{n!^2}=\frac{(n+1)^2}{(2n+1)(2n+2)}\frac{(2n+2)!}{\qquad(n+1)!} =\frac{(n+1)^2}{(2n+1)(2n+2)}\binom{2(n+1)}{n+1}$$

\binom{2n}n=\frac{(2n)!}{n!^2}=\frac{(n+1)^2}{(2n+1)(2n+2)} \frac{(2n+2)!}{\qquad(n+1)​‌​!}=\frac{(n+1)^2}{(2n+1)(2n+2)}\binom{2(n+1)}{n+1} $$ \binom{2n}n=\frac{(2n)!}{n!^2}=\frac{(n+1)^2}{(2n+1)(2n+2)} \frac{(2n+2)!}{\qquad(n+1)!​‌​}=\frac{(n+1)^2}{(2n+1)(2n+2)}\binom{2(n+1)}{n+1}$$

$\endgroup$
  • $\begingroup$ This is not an answer. I know :-/ $\endgroup$ – Jyrki Lahtonen Mar 6 '16 at 8:45
  • $\begingroup$ Even stranger is that the behavior has changed since I first posted this. And after previewing it. I swear, when I first posted this the first displayed formula in my answer looked exactly like the second with the factorial sign added in place. In other words, adding \qquad had the effect of adding extra whitespace both to the left and to the right of the numerator/denominator AND also centering both the numerator and the denominatore within their respective boxes. Trying reloading the page... $\endgroup$ – Jyrki Lahtonen Mar 6 '16 at 8:51
  • 1
    $\begingroup$ And now i get two different outputs with the same code! $\endgroup$ – Jyrki Lahtonen Mar 6 '16 at 9:10
  • 6
    $\begingroup$ I think someone is trying to tell you not to divide $(2n+2)!$ by $(n+1)!$. $\endgroup$ – Gerry Myerson Mar 6 '16 at 11:49

You must log in to answer this question.

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