Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using LuaLaTeX and biblatex which the biblatex manual says should be able to compile utf. At the bottom of this message is a minimal non-working example. In the final PDF it just deletes all the accented characters. I can go in and manually correct the .bbl file (replacing èwith \'e and ö = \"o) but this isn't an ideal solution.

The errors I get when running BibTeX (with biber of course as the default engine) are

INFO - This is Biber 1.5
INFO - Logfile is 'Biblatex.blg'
INFO - Reading 'Biblatex.bcf'
INFO - Found 3 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'Biblatex.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'Biblatex.bib'
INFO - Overriding locale 'en_US.UTF-8' default tailoring 'level = 4' with 'level = 2'
INFO - Overriding locale 'en_US.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting 'entry' list 'cms' keys
INFO - No sort tailoring available for locale 'en_US.UTF-8'
INFO - Writing 'Biblatex.bbl' with encoding 'UTF-8'
INFO - Output to Biblatex.bbl

Then in LuaLaTeX I get this error:

l.50 ...le sentence ~\citep[1666]{Loschel:2010dn}.                                               
./Biblatex.tex:50: Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `utf8'.
See the inputenc package documentation for explanation.
Type  H   for immediate help.
 ...                                              

l.50 ...le sentence ~\citep[1666]{Loschel:2010dn}.

[1{/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]

./Biblatex.tex:53: Package inputenc Error: Unicode char \u8:èvr not set up for use with LaTeX.

with input

    \documentclass{report}  

    \usepackage[utf8]{inputenc}     %Use utf-8 encoding for foreign characters
    \usepackage[authordate,natbib,backend=biber,bibencoding=utf8]{biblatex-chicago}

    \begin{filecontents}{\jobname.bib}

    @article{Cherp:2011dt,
    author = {Cherp, Aleh and Jewell, Jessica},
    title = {{The three perspectives on energy security: intellectual history, disciplinary roots and the potential for integration}},
    journal = {Current Opinion in Environmental Sustainability},
    year = {2011},
    volume = {3},
    number = {4},
    pages = {202--212},
    month = sep,
    annote = {(0) {\&}lt;ce:title{\&}gt;Energy Systems{\&}lt;/ce:title{\&}gt;

    }
    }

    @article{Loschel:2010dn,
    author = {L{\"o}schel, Andreas and Moslener, Ulf and R{\"u}bbelke, Dirk T G},
    title = {{Indicators of energy security in industrialised countries}},
    journal = {Energy Policy},
    year = {2010},
    volume = {38},
    number = {4},
    pages = {1665--1671},
    month = may
    }

    @article{Lefevre:2010kz,
    author = {Lef{\`e}vre, Nicolas},
    title = {{Measuring the energy security implications of fossil fuel resource concentration}},
    journal = {Energy Policy},
    year = {2010},
    volume = {38},
    number = {4},
    pages = {1635--1644},
    month = jan
    }


    \end{filecontents}
    \addbibresource{\jobname.bib}

    \begin{document}

    This is the first meaningless sentence ~\citep{Cherp:2011dt}. This is another meaningless sentence ~\citep{Lefevre:2010kz}. A third meaningless example sentence ~\citep[1666]{Loschel:2010dn}.

    \printbibliography

    \end{document}
share|improve this question
4  
You are not doing your fonts correctly. If you use lualatex, you need fontspec, not inputenc. –  jon Apr 1 '13 at 7:44
2  
Also take a look at the question tex.stackexchange.com/questions/28642/… –  matth Apr 1 '13 at 8:11

1 Answer 1

up vote 8 down vote accepted

If you make the following changes (and stick with biber), everything should work out just fine:

% \usepackage[utf8]{inputenc}
\usepackage{fontspec}

With fontspec you have a lot more font options anyway. I recommend typing texdoc fontspec at a terminal prompt (assuming you use TeX Live and aren't stuck on Windows).

An easy way to make your file compilable by either latex/pdflatex or lualatex would be (assuming no other packages are determining what you can or can't do):

\usepackage{ifluatex}

\ifluatex % LuaTeX
  \usepackage{fontspec}
  \defaultfontfeatures{Ligatures=TeX} 
  % load your system fonts; e.g.:
  \setmainfont{LinLibertineO}
  \setsansfont{LinBiolinumO}
  \setmonofont{Inconsolata}
\else % pdfTeX
  \usepackage[utf8]{inputenc}                   
  \usepackage[T1]{fontenc}
  % load some Type 1 font; e.g.:
  \usepackage[fulloldstylenums,largesmallcaps]{kpfonts}
\fi

Something similar could be done with the package ifxetex....

share|improve this answer
    
Does luaotfload work here instead of fontspec ? what's the similarity between inputenc, fontspec ,luaotfload any reference is kindly appreciated. –  texenthusiast Apr 1 '13 at 7:56
2  
inputenc and fontenc are for the pdfTeX engine, while fontspec is for the XeTeX and LuaTeX engines (for use with xelatex or lualatex). While luaotfload can be used if you know what you are doing, fontspec is much more user-friendly. –  jon Apr 1 '13 at 8:02
    
@texenthusiast -- I expanded the answer some. –  jon Apr 1 '13 at 8:09
1  
@texenthusiast -- you mean fontspec, right? :) The short answer is 'yes'. (The long answer is 'yes, for us mere mortals'). Actually, I should clarify: some font packages now are 'smart' enough to do everything for you, especially those done by Bob Tennent: see, e.g., the packages libertine and ebgaramond. –  jon Apr 1 '13 at 8:14
2  
@texenthusiast -- fontenc is not needed or recommended for use with xelatex or lualatex; but it is for latex or pdflatex. –  jon Apr 1 '13 at 8:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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