Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\item should always call \makelabel #2473

Open
xworld21 opened this issue Jan 2, 2025 · 2 comments
Open

\item should always call \makelabel #2473

xworld21 opened this issue Jan 2, 2025 · 2 comments

Comments

@xworld21
Copy link
Contributor

xworld21 commented Jan 2, 2025

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).

@dginev
Copy link
Collaborator

dginev commented Jan 2, 2025

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 dginev added this to the Future (if) milestone Jan 2, 2025
@xworld21
Copy link
Contributor Author

xworld21 commented Jan 3, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants