chirun-ncl / chirun

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

Beamer HTML bullet points when \only is used #256

Open prowlett opened 2 months ago

prowlett commented 2 months ago

This LaTeX code:

\documentclass{beamer}
\begin{document}
    \begin{frame}{My mess of bullets}
        \begin{itemize}
            \only<1>{\item 1
                \item 2
                \item 3}
            \only<2>{\item 4
                \item 5
                \item 6}
            \only<3>{\item 7
                \item 8
                \item 9}
        \end{itemize}
    \end{frame}
\end{document}

I expect to produce three slides (under the same heading and with the same slide number if these are shown), the first showing 123, the second 456, and the third 789. This is what the PDF output looks like, which is what I expect:

Three slides, as described

Here is what the HTML output looks like:

Bullet without text, bullet with 1 2 3 on three separate lines, two bullets without text, bullet with 4 5 6, two bullets without text, bullet with 7 8 9, bullet without text.

The HTML code is like this:

<section class="beamer-frame">
<header>
<h2 class="beamer-frame-title" id="my_mess_of_bullets">My mess of bullets</h2>
</header>
<ul class="itemize" id="a0000000002">
<li id="a0000000003">
</li>
<li id="a0000000004">
<p>
1 
</p>
<p>
2 
</p>
<p>
3
</p>
</li>
<li id="">
</li>
<li id="a0000000005">
</li>
<li id="a0000000006">
<p>
4 
</p>
<p>
5 
</p>
<p>
6
</p>
</li>
<li id="">
</li>
<li id="a0000000007">
</li>
<li id="a0000000008">
<p>
7 
</p>
<p>
8 
</p>
<p>
9
</p>
</li>
<li id="">
</li>
</ul>
</section>

I don't know why there are blank bullets, nor why the text for each \only is under one bullet, nor why this is the middle bullet of each set of three. I noticed there is no id=a0000000001 on the page and I'm not sure if this is significant because I'm not sure how these numbers are assigned.

I don't expect the HTML version to do anything with the \only because it just makes different PDF pages for presentation, but I would expect the output to be something like this:

<section class="beamer-frame">
<header>
<h2 class="beamer-frame-title" id="my_mess_of_bullets">My mess of bullets</h2>
</header>
<ul class="itemize" id="a0000000001">
<li id="a0000000002">
<p>
1 
</p>
</li>
<li id="a0000000003">
<p>
2 
</p>
</li>
<li id="a0000000004">
<p>
3
</p>
</li>
<li id="a0000000005">
<p>
4 
</p>
</li>
<li id="a0000000006">
<p>
5 
</p>
</li>
<li id="a0000000007">
<p>
6
</p>
</li>
<li id="a0000000008">
<p>
7 
</p>
</li>
<li id="a0000000009">
<p>
8 
</p>
</li>
<li id="a0000000010">
<p>
9
</p>
</li>
</ul>
</section>