LaTeXML icon indicating copy to clipboard operation
LaTeXML copied to clipboard

\item should always call \makelabel

Open xworld21 opened this issue 11 months ago • 2 comments

In LaTeX, \makelabel is always called on every item (just look at how \item calls \@item[...] which in turns runs \makelabel{...}). However, LaTeXML uses \makelabel only if \item was called with an optional argument. Contrived example:

\documentclass{article}
\begin{document}
\list{item:}{\def\makelabel#1{\textbf{#1}}}
\item First.
\item Second.
\item Third.
\endlist
\end{document}

LaTeXML won't make the labels bold.

I am not sure how often it happens. For me, this is another raw beamer issue (beamer uses \makelabel to set the label color).

xworld21 avatar Jan 02 '25 11:01 xworld21

As a high level comment:

Well, it could always call \makelabel, or we could have a high level binding for beamer, there are various options...

This is a point where I would generally opine that latexml shouldn't be held too strictly to be a low-level emulation of LaTeX, unless we have Good Reasons to commit to that - for example the Tikz emulation only got started as a project because we exhausted all "reasonable" attempts at a high-level binding, due to the sheer size of Tikz as a project.

dginev avatar Jan 02 '25 17:01 dginev

latexml shouldn't be held too strictly to be a low-level emulation of LaTeX

I can generally agree with that. In this particular case, LaTeXML calls \makelabel very indirectly from \lx@make@tags, and from within the RefStepItemCounter function, which means it's quite messy to override – I'll probably have to duplicate RefStepItemCounter, beginItemize, and so on just to remove one if (defined $tag) line.

xworld21 avatar Jan 03 '25 20:01 xworld21