如何查找与命令冲突的包

如何查找与命令冲突的包

我正在使用大学为论文提供的自定义模板。在我的文本中,我使用了命令\mapstochar。由于模板的原因,我在 Ubuntu 中使用 XeLaTeX 进行编译时收到错误消息:

! Undefined control sequence.
<recently read> \mapstochar
l.77 $\mapstochar
$
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.
[1
]
\tf@toc=\write6
\openout6 = `test.toc'.
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 79.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 79.
(./test.aux)
Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 79.
Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 79.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 79.
)

如果我将模板更改为默认模板或某些会议的模板,就不会再收到错误。如何找出哪个包/命令与之冲突\mapstochar

该模板需要以下包

\RequirePackage{xkeyval}
\RequirePackage{ifxetex}

\ifxetex
\else
\RequirePackage[utf8]{inputenc}
\fi

\RequirePackage[absolute]{textpos}

% For conditionally including lists of tables and figures
\RequirePackage[figure,table]{totalcount}
\RequirePackage{color}
\RequirePackage[svgnames]{xcolor}
\RequirePackage{pdfpages}
\RequirePackage{tikz}
\RequirePackage{pbox}
\RequirePackage{ifthen}
\RequirePackage{geometry}
\RequirePackage[pdfusetitle]{hyperref}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{etoolbox}
\ifxetex
\RequirePackage[MnSymbol]{mathspec}

\RequirePackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text}
\else
\RequirePackage{graphicx}
\RequirePackage{palatino}
\RequirePackage{mathabx}
\RequirePackage{mathpazo}
\RequirePackage[T1]{fontenc}
\fi
\RequirePackage{csquotes}
\ifxetex
\RequirePackage{polyglossia}
\swedishenglish{
  \setmainlanguage{swedish}
  \setotherlanguages{english}
}{
  \setmainlanguage{english}
  \setotherlanguages{swedish}
}
\else
\swedishenglish{
  \RequirePackage[swedish]{babel}
}{
  \RequirePackage[english]{babel}
}
\fi
\RequirePackage{calc}
\RequirePackage{ragged2e}
\RequirePackage{carlito}

答案1

在包含之后,我遇到了类似的问题。根据@DavidCarlisle的评论,我简单地使用以下命令在序言末尾fdsymbol恢复了的定义:\mapstochar

\DeclareMathSymbol{\mapstochar}{\mathrel}{symbols}{"37}

相关内容