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:


Extract from the TeX output:


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?

  • Do you need index at all? If you need multiple indexes, then use imakeidx
    – user31729
    Feb 11 '16 at 18:37
  • 2
    @ChristianHupfer I have macros that rely on index that I've been carrying around for years, not just for multiple indices but also \index* and possibly other features that I'm not recalling right now. I'd rather not sort them out at this time. I've never looked at imakeidx. (Could you add an answer mentioning it to this question?) Feb 11 '16 at 18:44
  • 2
    Done so ;-) I wonder, it has not been given as an answer (but as comment only, not showing how to use it)
    – user31729
    Feb 11 '16 at 18:54
  • if the language of your document is not english, then the substitutions of babel for common heading strings are what you'll probably want. i haven't looked, but i suspect that "Index" is the only option you'll get with the index package. Feb 11 '16 at 20:31

Load index before babel you then will get both: the redefinition from index and the language additions from babel as babel will store the definition in \org@markboth and then use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.