I use both the index
and babel
packages. They both redefine \markboth
and \markright
. If I include babel
before index
, the index
package warns me about the double redefinition. Code:
\documentclass{article}
\usepackage[english]{babel}
\usepackage{index}
\begin{document}
\end{document}
Extract from the TeX output:
(/usr/share/texlive/texmf-dist/tex/latex/index/index.sty
LaTeX Warning: Command \markboth has changed.
Check if current package is valid.
LaTeX Warning: Command \markright has changed.
Check if current package is valid.
) (./a.aux) (./a.aux) )
If I swap the two \usepackage
lines so that index
is loaded before babel
, there's no warning. But either way I'm getting the definition of these commands from whichever is loaded last.
My objective is twofold: I want to get rid of the warning (because nonactionable warnings drown out the actionable ones), and I want to understand what I'm losing either way (I haven't spotted any problem so far, but I could be missing something, or run into unexpected problems later as I write more of the document). Presumably, if both packages redefine these commands, they have a good reason.
Should I include babel
before or after index
? If before, how do I get rid of the warning?
Is there anything I can/should do to make sure that both babel
and index
are working correctly? What problems should I be looking for?
Best Answer
Load
index
beforebabel
you then will get both: the redefinition fromindex
and the language additions frombabel
as babel will store the definition in\org@markboth
and then use it.