chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
29 stars 4 forks source link

LaTeX enumerate numbers missing in Chrome #171

Closed prowlett closed 1 year ago

prowlett commented 1 year ago

This LaTeX

\documentclass{article}

\title{Test file.}
\author{Peter Rowlett}
\date{}

\begin{document}
\maketitle

\begin{enumerate}
    \item One thing.
    \item \(\int x^2 \, \mathrm{d}x \).
    \item And a third.
\end{enumerate}

\end{document}

produces this HTML snippet (well, the list does):

<ol class="enumerate" id="a0000000002" style="list-style: none">
<li id="a0000000003" style="list-style: symbols(cyclic '1.');" value="1">
<p>
One thing. 
</p>
</li>
<li id="a0000000004" style="list-style: symbols(cyclic '2.');" value="2">
<p>
<script type="math/tex">\int x^2 \,  \mathrm{d}x </script>. 
</p>
</li>
<li id="a0000000005" style="list-style: symbols(cyclic '3.');" value="3">
<p>
And a third. 
</p>
</li>
</ol>

I don't know why this is list-style: none but then each item is styled with list-style: symbols(cyclic '1.');, but anyway Chrome doesn't seem to like it (but Firefox does).

Here's Chromium on Ubuntu.

three items without bullets

@Alex-Corner found this issue using Chrome on Windows and I have the same on Chromium on Ubuntu. We both see numbers when we use Firefox.

christianp commented 1 year ago

Ah rats, it looks like Chrome doesn't support list-style: symbols! I'll have to think of another way of fixing list labels.

christianp commented 1 year ago

Just repeating the note from the commit message here: I've switched to using @counter-style rules, which are supported by Chrome and Firefox, but not Safari yet. The next version of Safari will support it.

prowlett commented 1 year ago

I updated chirun locally and this works well, but I ran the same code through https://lti.chirun.org.uk/ and it is still having the same problem. Does the online version need its chirun updating?

christianp commented 1 year ago

Yeah, it's a faff to update so I'm not doing it often. I'll get automatic updating set up eventually!