Description
Note: I'm not 100% sure this belongs here, but the main Scala issue tracker seems to be about semantic issues with the spec, not formatting, so I'm posting it here.
Currently, LaTeX rendering is broken on the current (2.12) spec. The issue seems to be that the LaTeX has been processed by the highlighter before it gets to the LaTeX script. I.e. the HTML that gets sent to the browser looks like this:
<div class="highlight"><pre><code class="language-scala" data-lang="scala"><span class="k">package</span> <span class="nn">$p_1$</span><span class="o">;</span>
<span class="n">$</span><span class="o">\</span><span class="n">ldots$</span>
<span class="k">package</span> <span class="nn">$p_n$</span><span class="o">;</span>
<span class="n">$</span><span class="o">\</span><span class="n">mathit</span><span class="o">{</span><span class="n">stats</span><span class="o">}</span><span class="n">$</span>
Note how the LaTeX expressions are broken up by separate <span>
elements.
It should look more like this (the same fragment from the 2.11 spec, note that the actual markdown source file for that fragment is actually unchanged between the two):
<div class="highlight"><pre><code class="language-scala" data-lang="scala">package $p_1$ { $\ldots$
package $p_n$ {
$\mathit{stats}$
} $\ldots$
}
</code></pre></div>
As a result, the rendered code looks a bit like this:
package
p1;
$\ldots$
package
pn;
$\mathit{stats}$
instead of
package
p1;
…
package
pn;
stats
Note that some LaTeX expressions are kept intact, e.g. $p_1$
and $p_n$
are not broken up into separate <span>
s and thus rendered correctly; whereas $\ldots$
and $\mathit{stats}
are.
The only difference between 2.11 (working) and 2.12 (broken) I have been able to find at a quick glance is the Jekyll upgrade. The actual markdown source for that fragment hasn't been changed in years and looks like this:
```scala
package $p_1$;
$\ldots$
package $p_n$;
$\mathit{stats}$
```
[Discovered by @hao luo on StackOverflow.]