When I use the Swedish babel package, the header on the even sides of the table of contents is written "INNEHåLL" (note the lower-case å which should be an Å). If I use the English version, it correctly says CONTENTS. Is this a bug?

I don't have a minimal example for this as it requires at least a page worth of chapters for the contents but here is a screenshot:enter image description here

Edit: If I use the book class I can get an empty page with this behavior. I managed to strip down all packages I'm using and it appears that the issue is caused by the fontspec package:


Edit 2: I changed now to polyglossia. Here is my current preamble. The commented packages are probably the ones giving me trouble:

%!TEX TS-program = XeLaTeX
%!TEX encoding = UTF-8 Unicode







\setmainfont{PT Sans}
\setmonofont[AutoFakeBold=1.4, AutoFakeSlant=0.2]{Inconsolata}




Edit 3 My solution so far was the following (can't self-answer yet):

1) Changed babel to polyglossia.

2) Deleted fontspec (included by polyglossia) and amssymb (incompatible with polyglossia).

3) Changed listingsutf8 to listings and now using unicode-math

  • Really wild guess: I noticed you're not using CM or LM as a font, but I have no clue which font this is. Perhaps your font doesn't have an capital Å (either not at all or just not in slanted/italic). – doncherry Aug 24 '11 at 17:23
  • 1
    @doncherry: The font is PT Sans. It does have Å as normal text displays fine. – pg-robban Aug 24 '11 at 17:36
  • 1
    Use polyglossia instead of babel when compiling with xelatex. Also see this question. – lockstep Aug 24 '11 at 17:38
  • If I use polyglossia I get the following error: Command \Finv already defined – pg-robban Aug 24 '11 at 17:47

Check if you use \uppercase somewhere and replace it by \MakeUppercase. This is a usual weakness of \uppercase, it doesn't show effect on macros in its argument. Compare:

\uppercase{Inneh\aa ll}

\MakeUppercase{Inneh\aa ll}

MakeUppercase example

That's not a bug in babel. It can be a weakness in your code, as above, in a package or in the way you are using a package for the headers.

It works as expected for example with the default headings pages style:

% repeat chapters and sections many times to get a TOC longer than a page

headings example

It works also if you use fancyhdr and fancy page style:

  • Thanks for your answer. However, I localized the issue - see my edit. – pg-robban Aug 24 '11 at 17:39

You original problem with babel can be solved like this:


Regarding your current example:

  1. Don't use listingsut8 with xelatex. Use listings

  2. Do you really need amssymb? (It's the source of the Command \Finv already defined). If yes you must load it before fontspec (so before polyglossia as it loads fontspec), but be aware that some of its definitions will be overwritten.

  • I don't think I need amssymb, so I have removed it now and replaced with unicode-math. Also, it looks like I could get rid of fontspec as well. – pg-robban Aug 24 '11 at 18:20
  • 2
    "get rid of" is a bit harsh. You should use it, but both polyglossia and unicode-math already load it, so you don't have to do it yourself (but it doesn't do much harm if you do it anyway). – Ulrike Fischer Aug 24 '11 at 18:25
  • I see. I'm fairly new to xelatex and I don't have too much experience with latex in general, so I guess I have a lot of studying to do. – pg-robban Aug 24 '11 at 18:29

Here's how I solved it, with a combination of help from answers and comments:

1) Changed babel to polyglossia.

2) Deleted font-spec and moved amssymb to the top (as it was incompatible with polyglossia).


Not entirely sure how babel modifies the contents, but how about trying the following:

\renewcommand{\contentsname}{Inneh\aa ll}

Your \chaptermark should use \MakeUppercase to modify this and make it UPPERCASE in the header.

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.