当我使用包 csquotes (style=spanish) 的命令 enquote 和书目样式 caauda0.bst 时,我遇到了问题。我给你一个 MWE 来说明,但我得到了以下错误:
LaTeX Error: Command \enquote already defined.
./output.bbl, 6
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 ...nquote}[1]{\guillemotleft#1\guillemotright}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
你知道为什么会发生这种情况吗?我需要使用 XeLatex 进行编译。
梅威瑟:
\documentclass{beamer}
\usepackage[catalan]{babel}
\usepackage[utf8]{inputenc}
\usepackage[style=spanish]{csquotes}
\begin{filecontents}{\bib.bib}
@book{key,
author = {Author, A.},
year = {2001},
title = {Title},
publisher = {Publisher},
}
\end{filecontents}
\begin{document}
\begin{frame}{BON DIA}
\enquote{Aquest títol}.
\cite{key}
\end{frame}
\begin{frame}{BON DIA}
\bibliography{bib}
\bibliographystyle{caauda0}
\end{frame}
\end{document}
问题似乎出在参考书目风格上: https://ctan.org/tex-archive/biblio/bibtex/contrib/catalan
答案1
bst 文件有
"\newcommand{\enquote}[1]{\guillemotleft#1\guillemotright}"
这有点不幸,但一个简单的解决方法是将其本地副本更改为
"\renewcommand{\enquote}[1]{\guillemotleft#1\guillemotright}"