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've one problem in my scrbook, ï and î don't work when I compile my \printbibliography. But the problem come only with these 2 accents…

Begin of my bibliography

I export my .bib from Papers2 for Mac application, & I use TexShop, UTF8 encoding, & I'm newbie with Biber & Biblatex.

Please help ! Thank you.

My ref :

@book{GoncalvesdaCosta:2000tw,
author = {Goncalves Da Costa, H{\'e}lo{\"\i}sa},
title = {{Les mus{\'e}es d'histoire de ville leur contribution au d{\'e}veloppement social contemporain.}},
publisher = {Universit{\'e} du Qu{\'e}bec {\`a} Montr{\'e}al},
year = {2000},
address = {Montr{\'e}al}}

My minimal config :

% !TEX encoding = UTF-8 Unicode
\documentclass[12pt]{scrbook}

\usepackage[english,frenchb]{babel}             
\usepackage[quiet]{fontspec}    

\usepackage[automark]{scrpage2}
\usepackage[babel,french=guillemets*]{csquotes} 
\usepackage[backend=biber,style=authortitle-ticomp,doi=false]{biblatex}

\frenchbsetup{FrenchFootnotes=false}
\MakeOuterQuote{"}

\setmainfont[Mapping=tex-text, Ligatures={Common, Rare}, Numbers={OldStyle}]{Adobe Garamond Pro}

\addtokomafont{disposition}{\normalfont}
\addtokomafont{pageheadfoot}{\normalfont}       
\addtokomafont{pagenumber}{\normalfont} 
\addtokomafont{footnote}{\normalfont}               
\addtokomafont{footnotereference}{\normalfont}

\addbibresource{Biblio.bib}             
\AtBeginBibliography{\def\UrlFont{\scriptsize}}

\begin{document}
"Héloïse"\footcite{GoncalvesdaCosta:2000tw}.
\printbibliography
\end{document}
share|improve this question
    
If I use another font, the characters are correct. Try with “Linux Libertine O” instead of “Adobe Garamond Pro”, just to see whether it's a font problem or not. –  egreg Feb 4 at 16:21
    
Hi @egreg I try with "Garamond", same problem (I don't have "Linux Libertine O"), but with "Arial" it's ok, why ? I think the problem come from my new use of biber & UTF8 encodings… Hope I can continue with my font. –  Zouib Feb 4 at 18:15
add comment

2 Answers

up vote 4 down vote accepted

Short answer

Biber does not understand {\"\i}. Fix the encoding with recode:

recode -d latex..UTF-8 biblio.bib 

Too long answer

The problem seems to be the string {\"\i} (which is meant to represent ï) in your bibliography. Biber gets confused and interprets it as {\"ı}, which is nonsense, and in turn, responsible for the bad output.

So the question is, what to do with the offending character? There are two general answers:

  1. Change the way your bibliography gets processed
  2. Remove the offending string from your bibliography

1. Change how the bibliography is processed

1.1 Call biber with --output_safechars.

To force biber to pass {\"\i} along unchanged, and thus getting the correct output, simply use the option --output_safechars:

xelatex document
biber --output_safechars document
xelatex document
xelatex document

1.2. Use bibtex8 as backend.

BibTeX does not modify {\"\i} in the process and it can be used with 'BibLaTeX'. (It is possible but not recommended using BibTeX instead of biber, because a lot of the advanced features will work only with the latter.) To do so set the option backend=bibtex8. Your MWE would look like this:

% !TEX encoding = UTF-8 Unicode
\documentclass[12pt]{scrbook}

\usepackage[english,frenchb]{babel}             
\usepackage[quiet]{fontspec}    

\usepackage[automark]{scrpage2}
\usepackage[babel,french=guillemets*]{csquotes} 
\usepackage[backend=bibtex8,style=authortitle-ticomp,doi=false]{biblatex} % <-- changed backend

\frenchbsetup{FrenchFootnotes=false}
\MakeOuterQuote{"}

\setmainfont[Mapping=tex-text, Ligatures={Common, Rare}, Numbers={OldStyle}]{Adobe Garamond Pro}

\addtokomafont{disposition}{\normalfont}
\addtokomafont{pageheadfoot}{\normalfont}       
\addtokomafont{pagenumber}{\normalfont} 
\addtokomafont{footnote}{\normalfont}               
\addtokomafont{footnotereference}{\normalfont}

\addbibresource{biblio.bib}             
\AtBeginBibliography{\def\UrlFont{\scriptsize}}

\begin{document}
"Héloïse"\footcite{GoncalvesdaCosta:2000tw}.
\printbibliography
\end{document}

To compile the document call:

xelatex document
bibtex document
xelatex document
xelatex document 

Both ways produce PDFs with correctly rendered ï:

enter image description here

2. Prevent {\"\i} from ending up in bibliography

2.1. Change the exported bibliography

The general approach would be replacing all occurrences of \"\i in your bibliography with \"i. This could be done with any text editor capable of searching and replacing strings. Of course there are tools to do that for you. sed is one of them:

sed s/\\"\\i/\\"i/g  < in.bib > out.bib 

Don't worry, there are others beside sed. The best tool on the command line es of course recode, all you have to do is:

recode -d latex..UTF-8 biblio.bib 

(Unfortunately recode does not come preinstalled with Mac OS X, but it can be easily installed with Homebrew.)

As you are on a Mac, you could use BibDesk:

  1. Open your bibliography with BibDesk:

enter image description here

  1. Export (Menu --> File --> Export...) as BibTeX and Unicode (UTF-8):

enter image description here

This will provide you with a valid UTF-8 BibLaTeX compatible file:

%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/


%% Created for you at 2014-02-11 23:42:00 +0000 


%% Saved with string encoding Unicode (UTF-8) 



@book{GoncalvesdaCosta:2000tw,
    Address = {Montréal},
    Author = {Goncalves Da Costa, Héloïsa},
    Publisher = {Université du Québec à Montréal},
    Title = {{Les musées d'histoire de ville leur contribution au développement social contemporain.}},
    Year = {2000}}

2.2. Use software capable of exporting BibLaTeX

Maybe you should ditch Papers and switch to JabRef, BibDesk, Mendeley, Zotero, vim or emacs.

share|improve this answer
    
Hi @DG' thanks for your analyse, it produces effectively {\"ı} I try with bibtex8, but no change in my pdf. I don't know how calling your biber option… In command line ? Maybe, I can change the encoding when I create my .bib from Papers, but it purpose only : bibtex, xml endnote, reman RIS… So I chose obviously bibtex –  Zouib Feb 5 at 11:59
    
I find it in is.gd/mhZTCL (qandasys.info Audrey) : "A quick way to do this is to re-encode your bib file to Ascii with: biber --tool --output_encoding=ascii --output_safechars <file name>.bib" I try, but the problem persists… –  Zouib Feb 5 at 12:39
1  
@Zouib have you tried compiling the document manually (maybe TeXShop calls biber instead of bibtex8)? If not, open a terminal, cd to your working directory and run latexmk -xelatex yourfile –  DG' Feb 5 at 12:40
1  
Have you deleted all the temporary files (.aux, .bbl, etc.)? –  DG' Feb 5 at 12:43
1  
Sorry to hear that. There is another way: open your file with bibdesk and save as UTF-8. PS: Papers is indeed known for all kinds of problems... –  DG' Feb 11 at 18:45
show 6 more comments

With LuaTeX the glyph isn't available for Garamond Regular. I tried it with the Garamond Pro and Garamond Premier Pro. Only the italic and bold variant show the character. But EBGaramond has it:

enter image description here

If I run the example with xelatex instead of lualatex then everything is fine with AGaramondPro, too:

enter image description here

As Enrico said, use another font if you do not have the EBGaramond, at least for the bibliography. However, you can write your bibliography with unicode characters:

@book{GoncalvesdaCosta:2000tw,
author = {Goncalves Da Costa, Héloïsea},
title = {Les musées d'histoire de ville leur contribution au développement social contemporain.},
publisher = {Université du Québec à Montréal},
year = {2000},
address = {Montréal}}

Biber can handle all that.

share|improve this answer
    
However, you can write your bibliography with unicode characters:...Biber can handle all that. Is true, if and only if you don't need bibtex back-compatibility in your .bib file, see for example this question and its answers –  Chris H Feb 4 at 16:57
1  
that's obvious! BibTeX is a 7-bit-System! –  Herbert Feb 4 at 17:00
    
It's obvious once you know a bit of the history of bibtex, which can't be assumed! –  Chris H Feb 4 at 17:02
    
without history nobody knows what this might be: {\"i} –  Herbert Feb 4 at 17:03
1  
@Zouib: you should use this notation: {\"i} or {\"{\i}} but _not_ {\"\i}`. –  Herbert Feb 4 at 18:33
show 4 more comments

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.