I am trying to use a bibliography for a my latex report. I am using a .bib file named bibli with articles written in french (so the titles have accents like é or ô). At the beginning of my .tex file I have
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
in order to write accents without using
{'\{e}}
for é in my file. It works just fine for the text in my .tex file. However in my bibliography (bibli.bib) it doesn't work because it returns "?" instead of any accented letters. Is there a way to corect this without using {'{e}} for each bibliography reference ? I already checked the preferences of my editor (TeXMaker) and the encoding is already UTF-8
Thanks in advance
Best Answer
You should use the modern replacement for bibtex: biblatex with its biber backend. It is fully unicode capable.
If you want to take it one more step further, you might also want to switch to a native unicode-enginge: xelatex or lualatex. You just have to change a few packages in the preamble. The combination of
\usepackage[utf8]{inputenc}
and\usepackage[T1]{fontenc}
has to be replaced by\usepackage{fontspec}
.This package takes care of font and input encoding. All you need are utf8 encoded source files. You can also use every truetype or opentype font.
For language support
polyglossia
should be preferred tobabel
.Here is an example that works both with lualatex and xelatex:
Compile e.g. with lualatex test.tex, biber test.bcf, lualatex test.tex, lualatex test.tex.
If you want to still use pdflatex, it would look like this:
Compile with pdflatex test.tex, biber test.bcf, pdflatex test.tex, pdflatex test.tex