When compiling my document embedding references using biblatex, I get the error message:
Package inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX
With the help of the various unicode/biblatex questions on this side, I identified the character {\'{\i}}
in one of the references as the culprit. Interestingly, setting {\'{\i}}
in the main text does not throw an error message:
\begin{filecontents}{biblio.bib}
@Article{Zheng2016,
%author = {Qinsi Zheng and Steffen Jockusch and Gabriel G. Rodr{\'{\i}}guez-Calero and Zhou Zhou and Hong Zhao and Roger B. Altman and H{\'e}ctor D. Abru{\~n}a and Scott C. Blanchard},
author = {Qinsi Zheng and Gabriel G. Rodr{\'i}guez-Calero and Steffen Jockusch and Zhou Zhou and Hong Zhao and Roger B. Altman and H{\'e}ctor D. Abru{\~n}a and Scott C. Blanchard},
title = {Intra-molecular triplet energy transfer is a general approach to improve organic fluorophore photostability},
journal = {Photochemical {\&} Photobiological Sciences},
year = {2016},
volume = {15},
number = {2},
pages = {196--203},
doi = {10.1039/c5pp00400d},
publisher = {Royal Society of Chemistry ({RSC})},
}
@Article{Pennacchietti2018,
author = {Francesca Pennacchietti and Ekaterina O. Serebrovskaya and Aline R. Faro and Irina I. Shemyakina and Nina G. Bozhanova and Alexey A. Kotlobay and Nadya G. Gurskaya and Andreas Bod{\'{e}}n and Jes Dreier and Dmitry M. Chudakov and Konstantin A. Lukyanov and Vladislav V. Verkhusha and Alexander S. Mishin and Ilaria Testa},
title = {Fast reversibly photoswitching red fluorescent proteins for live-cell {RESOLFT} nanoscopy},
journal = {Nature Methods},
year = {2018},
volume = {15},
number = {8},
month = {jul},
pages = {601--604},
doi = {10.1038/s41592-018-0052-9},
publisher = {Springer Nature America, Inc},
}
\end{filecontents}
\documentclass[pdfa,a4paper,11pt,
bibliography=totoc,
numbers=noenddot,
abstracton,
twoside,openright,
parskip=half]{scrartcl}
\usepackage[english]{babel} % provides the dictionary for proper hyphenation
\frenchspacing % single space after full stop
\raggedbottom
\usepackage[utf8]{inputenc} % for font encoding
\usepackage{filecontents}
\usepackage{csquotes} % needed for babel / polyglossia
\usepackage[
natbib = true, % allows usage of citet, citep etc. commands
citestyle = authoryear, bibstyle = authoryear, %
backend = biber, %
sortcites = true, % sorts multiple refs in one cite command
hyperref = true, %backref = true, %
giveninits = true, %
terseinits = false, % if true: D. E. => DE
%uniquelist = true,
maxbibnames = 30, maxcitenames = 2, %
uniquename = init, uniquelist = minyear, % uniquelist = minyear only cites 2nd author if first author and year are identical
date = year,
url = false, isbn = false]{biblatex} % package for the bibliography
\addbibresource{biblio.bib}
\usepackage{hyperref} % crossreferencing
\begin{document}
\section{Introduction}
\citep{Zheng2016}
\citep{Pennacchietti2018}
S\'{\i}
\printbibliography
\end{document}
Trying to solve the problem, I I found different attempts on this side, such as
using {\'i} as suggested in this answer works. However, for automatically imported bibliography entries, it's tedious to find all of offending characters, especially when the error might occur with different combinations of precomposed characters as suggested here.
I therefore tried to configure biblatex using the
--output-safechars
option as suggested in in this answer. Compiling manually from the terminal, it seems to work ok.However, I prefer to use
latexmk
(especially when compilation workflows require multiple runs of various compilers) for compilation. I then found this answer, explaining how to passbiber
options tolatexmk
. I created the filelatexmk
in the local directory, containing the line$biber='biber --output-safechars';
. This finally works.
I am however afraid, that this whole workflow is beyond my bosses willingness to put up with the perks of LaTeX.
So I guess I'm having two options here:
1) is there any way to remove the offending characters automatically? I found this answer, but am afraid that it's way beyond my understanding.
2) if there isn't, is there any way to force latexmk/biber
to compile such characters properly that does not require any additional files or setup? Ideally, I'm looking for some magic commands that I could "sneak in unnoticed" at the beginning of the .tex file.
Edit:
I just tested the workflow using the .latexmkrc
on my whole document, which now throws an error
Undefined control sequence. in the line just after the
\printbibliography
command. Apparently some entry in my 200+ bibliography clashes with the--output-safechars
option.
I'll research on it, but it seems this workflow might also not work for me in the end.
{\'{\i}}
for{\'i}
with a sourcemap. – gusbrs Jan 10 '19 at 13:12