-
Notifications
You must be signed in to change notification settings - Fork 125
Description
Hi, I've just encountered a problem with the braket package. My MWE is
\documentclass{article}
\usepackage{amsmath}
\usepackage{braket}
\begin{document}
\begin{equation}
\Braket{a_{\mathbf{p}}^{\dagger}a_{\mathbf{p}}}.
\end{equation}
\end{document}
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
@Braket@{a_{\mathbf{p}}^{\dagger}a_{\mathbf{p}}}.\endD...
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
\documentclass{article}
\usepackage{amsmath}
\usepackage{braket}
\begin{document}
\begin{equation}
\Bra{a_{\mathbf{p}}^{\dagger}}\Ket{a_{\mathbf{p}}}.
\end{equation}
\end{document}
things work as expected both with and without --mathsvg.