This answer appeared in HNQ and has unwanted line breaks in the LaTeX formulas as you can see. The author of the answer confirms that the breaks are not intended.

For some reason the issue disappears when the answer is opened for editing.

  • I wonder if this is related... there was a report on the new table support post talking about how LaTeX works in tables but that it creates line breaks... maybe it's a broader issue with our LaTeX rendering? meta.stackexchange.com/a/357525/284336 Thoughts? – Catija Dec 16 '20 at 20:52
  • 1
    Indeed it seems similar. I did notice that the answer has some extra horizontal spacing. Maybe there is a bug that overestimates the amount of horizontal space added when performing line breaking? – Bob Jansen Dec 16 '20 at 20:55
  • 1
    Is there any sandbox / test environment I can use? I want to test to replicate it as I suspect its the escaped dollar signs. But it might not be. – Pontus Hultkrantz Dec 19 '20 at 13:26
  • 1
    @PontusHultkrantz Yep I also think it's due to the dollar signs. Source code snip – Ak. Dec 19 '20 at 13:49

The issue is that the escaped dollar sign, ["backslash"$], in math mode gets translated to ["backslashBackslashBackslash"$] in the source code once published (see Ak's comment). Subsequently, ["backslashBackslash"] causes a line break. The issue is only present after a publish, and not in the immediate preview rendering window before a publish.

I have resolved the issue by not escaping the dollar sign. The inconsistency bug between rendering preview and published latex code is still present.

That is, the symptoms have been resolved by changing $$ L_1=L_2=["Backslash"]$1.0. $$

into $$ L_1=L_2=$1.0. $$


You must log in to answer this question.

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