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

[braket] Some commands not working in \Braket{} with SVG output #786

matteosecli opened this Issue Jul 9, 2016 · 1 comment


None yet
3 participants

matteosecli commented Jul 9, 2016

Hi, I've just encountered a problem with the braket package. My MWE is



As in issue 785, things work with latexmlc --verbose --destination=MWE.html MWE.tex but do not with latexmlc --verbose --mathsvg --destination=MWE.html MWE.tex. The error is always the same:

Error:shell:latex LaTeX command 'latex ltxmlimg > ltxmlimg.ltxoutput' failed
    returned code 256 (!= 0): 
    See /tmp/LaTeXMLVPd3er/ltxmlimg.log
    In Post::MathImages[@0x3d8a6d8] ->generateImages
Couldn't find image for 'LaTeXML::Post::MathImages:svg:\beginDISPLAY \lx@Braket@{a_{\mathbf{p}}^{\dagger}a_{\mathbf{p}}}.\endDISPLAY'

and the log says

! Undefined control sequence.
l.61 \beginDISPLAY \lx
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

In the example I've used \Braket{a_{\mathbf{p}}^{\dagger}a_{\mathbf{p}}} just because it stems from a typical (physical) formula, but the same problem occurs with a simpler \Braket{\mathbf{A}} or \Braket{\vec{A}} (I firstly realized the problem with \mathbf since sometimes I redefine \vec as \mathbf). The same goes with \mathcal{A} and I guess a larger variety of commands like these.

Strangely enough, things work with \Bra{} or \Ket{} alone. For example, if change my MWE into



things work as expected both with and without --mathsvg.

@dginev dginev added this to the LaTeXML-0.8.3 milestone Jul 9, 2016


This comment has been minimized.


brucemiller commented Dec 4, 2016

Sorry for the delay; easy fix, as well. The internal constructors needed an alias so that they revert to the original commands that were used, such as \braket. Thanks for the report!

@brucemiller brucemiller closed this Dec 4, 2016

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