我正在尝试使用该hepparticles
包。
\documentclass{minimal}
\usepackage{hepparticles}
\begin{document}
foo \HepParticle{H}{1}{2} $\HepParticle{H}{}{}\to \HepParticle{b}{}{}\HepParticle{b}{}{}$ \HepParticle{\Lambda}{1}{2} bar
\end{document}
这是输出pdflatex
:
❯ pdflatex test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texlive/texmf-dist/tex/latex/hepparticles/hepparticles.sty
(/usr/share/texlive/texmf-dist/tex/latex/subdepth/subdepth.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def)
(./test.aux) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux
) )</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
Output written on test.pdf (1 page, 17922 bytes).
Transcript written on test.log.
理想情况下,我希望lualatex
稍后使用,但在这种情况下,两者的结果是相同的。
干杯!
答案1
这个问题已经讨论并解决了这里。问题在于较新版本的 TeX 中宏定义的改变。
您可以通过插入一段特定的代码(取自回答(参见上述讨论)如下:
\documentclass{minimal}
\usepackage{hepparticles}
%%%%%
\usepackage{xpatch}
\makeatletter
\xpatchcmd\@HepConStyle
{\edef\@upcode{\updefault}}
{\ifdefined\shapedefault\edef\@upcode{\shapedefault}\else\edef\@upcode{\updefault}\fi}
{}{}
\makeatother
%%%%%
\begin{document}
foo \HepParticle{H}{1}{2} $\HepParticle{H}{}{}\to \HepParticle{b}{}{}\HepParticle{b}{}{}$ \HepParticle{\Lambda}{1}{2} bar
\end{document}