I am writing in French and there are many accents. I can see them in the whole document except in the table of contents.

When I compile and preview my document in Texmaker, I can see the french accent in the table of contents:

But when I check the actual pdf that is produced with Adobe Acrobat Reader or Preview/Aperçu (Mac OS X 10.6.8 default pdf viewer), the accents are replaced by special characters as shown on the screenshot below:

This is a part of my preamble:

``````\documentclass[12pt,a4paper,twoside,french]{article}
\usepackage{mathptmx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{prettyref}
\usepackage{hyperref}
\usepackage{babel}
\providecommand{\og}{\leavevmode\flqq~}%
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}
``````

The TOC file entries look like:

``````\select@language {french}
\contentsline {section}{Introduction}{1}{section*.2}
\contentsline {section}{\numberline {1}Contexte actuel}{2}{section.1}
\contentsline {subsection}{\numberline {1.1}Contexte socio-\'economique}{2}{subsection.1.1}
``````

How can I fix it?

-
Probably you have to use `\usepackage[utf8]{inputenc}`. See tex.stackexchange.com/a/34608/13670 – Cylian Apr 1 '13 at 11:57
If I use just utf8 I have to type all accents like `\'{e}` and I have to write around 20 pages like that. There are too many accents to type. Besides, I get this error `! Package inputenc Error: Unicode char \u8:�de not set up for use with LaTeX.` – esmitex Apr 1 '13 at 12:08
How does one of the entries look in the. toc-file? – Ulrike Fischer Apr 1 '13 at 12:21
maybe it's a font embedding problem. You could try `\usepackage{lmodern}` like in stackoverflow.com/questions/464140/… – Vincent Nivoliers Apr 1 '13 at 13:56
Well I found the problem I was using `\usepackage{mathpmx}` with `\usepackage{amsfont}` just by deleting the second one it would fix the accent problem and keep the font as "Times News Roman" – esmitex Apr 1 '13 at 14:27

``````\usepackage[latin1]{inputenc}
``````

If this doesn't work, then please try:

``````\usepackage[applemac]{inputenc}
``````
-
I fixed it with the font package but I cannot choose the comment as the answer. – esmitex Apr 3 '13 at 19:30
Well, you could wait a couple of days and post the answer yourself, or if you want I can edit mine to include yours – Mario S. E. Apr 3 '13 at 21:43
I posted my answer. lol – esmitex Apr 5 '13 at 15:32

I fixed the problem by removing the package `usepackage{amsfont}`. I didn't notice that I was using two fonts packages at the same time.

-
this is indeed peculiar. `amsfonts` is loaded automatically by `amssymb`, and you have also specified that, but haven't said that you removed it. so you are still loading `amsfonts` (check your log). thus it appears that `amsfonts` may actually be compatible with `mathptmx`, just not when loaded twice. if you can confirm this, i will put it on the ams list of things to be looked into. – barbara beeton Apr 5 '13 at 16:51
I am using `\usepackage{mathptmx} \usepackage{amsfonts} \usepackage{amssymb}` and it works now but before that I had one extra `amsfonts` – esmitex Apr 12 '13 at 14:49