I'm not so sure whether I am asking a question about biblatex
or about \providecommand
but I hope someone can help me.
It occurs to me that both csquotes
and biblatex
define an \enquote
command (I could not find it in the documentation of biblatex
however).
At least, both
\documentclass{article}
\usepackage{csquotes}
\begin{document}
\enquote{asdf}
\end{document}
and
\documentclass{article}
\usepackage{biblatex}
\begin{document}
\enquote{asdf}
\end{document}
compile perfectly fine.
If I include the line \providecommand{\enquote}{\emph}
, the version with csquotes
still works:
\documentclass{article}
\usepackage{csquotes}
\providecommand{\enquote}{\emph}
\begin{document}
\enquote{asdf}
\end{document}
But the version with biblatex
gives an error Command \enquote already defined. \begin{document}
:
\documentclass{article}
\usepackage{biblatex}
\providecommand{\enquote}{\emph}
\begin{document}
\enquote{asdf}
\end{document}
Also \enquote{asdf}
is printed as italics, which, to my understanding of \providecommand
should not be the case if biblatex
already defined the \enquote
command.
Best Answer
biblatex
tests ifcsquotes
has been loaded. If not it assumes that\enquote
is undefined and defines it itself with\newrobustcmd*
. The test is done in\AtEndPreamble
, directly before\begin{document}
.So your failing example is equivalent to this here.
The
\enquote
command ofbiblatex
is not so powerful as the one fromcsquotes
. E.g. it doesn't take languages into account: