babel 和 breqn 包生成错误“!您不能在 \the 之后使用‘字符 ,’。”

babel 和 breqn 包生成错误“!您不能在 \the 之后使用‘字符 ,’。”

我在 ubuntu 20.04 的开发版本上使用 latex。在此环境中,babel 和 breqn 包会生成错误“!您不能在 \the 后使用‘字符 ,’。”在从 ubuntu 19.10 升级之前不会发生这种情况。(抱歉,我不能说得更具体。)

有人知道解决方法吗?

\documentclass[a4paper, 12pt, reqno]{article}
\usepackage[english]{babel}
\usepackage{breqn}

\begin{document}

\title{Minimum Working Example}
\maketitle

This is a test\ldots
\begin{dmath}
    \Psi = 0.
\end{dmath}

\end{document}

“latex mwe-01.tex”生成:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./mwe-01.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo))
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def)
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def))))
(/usr/share/texlive/texmf-dist/tex/latex/breqn/breqn.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-dvips.def))
(/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/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def)))
(/usr/share/texlive/texmf-dist/tex/latex/breqn/flexisym.sty
(/usr/share/texlive/texmf-dist/tex/latex/breqn/cmbase.sym)
(/usr/share/texlive/texmf-dist/tex/latex/breqn/mathstyle.sty))
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)) (./mwe-01.aux)

LaTeX Warning: No \author given.

! You can't use `the character ,' after \the.
\@elt #1->,#1,

l.13 \end{dmath}

? 
! Emergency stop.
\@elt #1->,#1,

l.13 \end{dmath}

No pages of output.
Transcript written on mwe-01.log.

答案1

欢迎来到 TeX.SE。这里有一个重要的片段

\let\oldcdot\cdot
\usepackage{breqn}
\let\cdot\oldcdot

非常好的用户@David Carlisle 的链接breqn:指定方程式可以被打破的字符

\documentclass[a4paper, 12pt, reqno]{article}
\usepackage[english]{babel}
\let\oldcdot\cdot
\usepackage{breqn}
\let\cdot\oldcdot
\begin{document}

\title{Minimum Working Example}
\maketitle

This is a test\ldots
\begin{dmath}
    \Psi = 0.
\end{dmath}

\end{document}

并且您的代码可以正常工作。

在此处输入图片描述

相关内容