doclicense incompatible with biblatex
kmccurley opened this issue · 3 comments
LaTeX does not enforce good software practices on packages, and this can result in namespace collisions between definitions of macros. In this case a minimal example to demonstrate the problem is:
\documentclass{article}
\usepackage{biblatex}
\usepackage[type={CC},modifier={by},version={4.0}]{doclicense}
\begin{document}
\end{document}
The result is a collision in csquotes.sty where \newcommand*{@quotelevel}{} collides with the definition from biblatex. Both csquotes and biblatex are quite old packages. I suspect that biblatex is far more commonly used than csquotes. Since doclicense depends on csquotes, we cannot use it in our package because we need to allow users to choose biblatex.
Good software practices generally say that macros should be defined with a unique prefix for the package. Unfortunately csquotes and biblatex violate this, so it is dangerous to depend on either one.
Sorry, I currently don’t find the time to work on a solution. Could you propose a code fix?
After reading the code, it seems that the solution is to load the csquotes package before biblatex. This is a clumsy way of avoiding namespace collisions, but at least it can be checked for in the preamble. We are writing a document class in which we load biblatex as part of the .cls if the author specifies it as an option. That was causing doclicense to fail, so we have a workaround now by trying to control the order in which packages are loaded (hyperxmp, csquotes, biblatex, doclicense).
I'm closing this.
Thanks for investigating and implementing a workaround. If there is something that can be improved in doclicense about this let me know. The package already tries to detect loaded packages and be smart about all of this.