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

"\AA" in math mode breaks math-to-image-conversion with "latexmlpost --mathimages" #1012

siegfriedzoetzsche opened this issue Jul 10, 2018 · 2 comments


Copy link

siegfriedzoetzsche commented Jul 10, 2018

If I convert the file aa.tex:



    latexml --destination aa.xml aa.tex
    latexmlpost --verbose --pmml --mathtex --mathimages --destination=aa-post.xml aa.xml 

I get

    Error:shell:latex LaTeX command 'latex ltxmlimg > ltxmlimg.ltxoutput' failed


    ! Undefined control sequence.
    <argument> \lx 
    l.60 \beginINLINE 3\,\text{\lx@utf@AA}


    \beginINLINE 3\,\text{\lx@utf@AA}\endINLINE\clearpage

I can work around the problem by using the Definition of \AA from TeX.pool.ltxml:

    DefPrimitiveI('\AA', undef, UTF(0xC5));     # LATIN CAPITAL LETTER A WITH RING ABOVE

instead of that in LaTeX.pool.ltxml:

    DefMacroI('\AA', undef, '\lx@utf@AA');

and changing aa.tex to aafix.tex:


with aafix.sty.ltxml:

    # -*- CPERL -*-
    package LaTeXML::Package::Pool;
    use strict;
    use warnings;
    use LaTeXML::Package;
    DefPrimitiveI('\AA', undef, UTF(0xC5));

and running:

latexml --destination aafix.xml aafix.tex
latexmlpost --verbose --pmml --mathtex --mathimages --destination=aafix-post.xml aafix.xml 

I guess the problem occurs for all of these defined in LaTeX.pool.ltxml:

    DefMacroI('\OE', undef, '\lx@utf@OE');
    DefMacroI('\oe', undef, '\lx@utf@oe');
    DefMacroI('\AE', undef, '\lx@utf@AE');
    DefMacroI('\ae', undef, '\lx@utf@ae');
    DefMacroI('\ae', undef, '\lx@utf@ae');
    DefMacroI('\AA', undef, '\lx@utf@AA');
    DefMacroI('\aa', undef, '\lx@utf@aa');
    DefMacroI('\O',  undef, '\lx@utf@O');
    DefMacroI('\o',  undef, '\lx@utf@o');
    DefMacroI('\L',  undef, '\lx@utf@L');
    DefMacroI('\l',  undef, '\lx@utf@l');
    DefMacroI('\ss', undef, '\lx@utf@ss');
    DefMacroI('\dh', undef, '\lx@utf@dh');    # in latex?
    DefMacroI('\DH', undef, '\lx@utf@DH');
    DefMacroI('\dj', undef, '\lx@utf@dj');
    DefMacroI('\DJ', undef, '\lx@utf@DJ');
    DefMacroI('\ng', undef, '\lx@utf@ng');
    DefMacroI('\NG', undef, '\lx@utf@NG');
    DefMacroI('\th', undef, '\lx@utf@th');
    DefMacroI('\TH', undef, '\lx@utf@TH');
@siegfriedzoetzsche siegfriedzoetzsche changed the title \AA in math mode breeaks math-to-image-conversion with latexmlpost --mathimages "\AA" in math mode breeaks math-to-image-conversion with "latexmlpost --mathimages" Jul 10, 2018
@siegfriedzoetzsche siegfriedzoetzsche changed the title "\AA" in math mode breeaks math-to-image-conversion with "latexmlpost --mathimages" "\AA" in math mode breaks math-to-image-conversion with "latexmlpost --mathimages" Jul 10, 2018
@dginev dginev added this to the LaTeXML-0.8.4 milestone Jul 10, 2018
Copy link

dginev commented Jul 10, 2018

Thank you for the report! I have quickly edited the code blocks for extra readability, without changing any content.

Copy link

Jeez, silly me. I added a level of redirect (since some etoolbox stuff(?) seemed to expect these to be macros), but neglected to add aliases so that revert back to the normal `\AA'. Sorry! Fixed now. Thanks for the report!

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

No branches or pull requests

3 participants