2

The title is pretty self explanatory, mwes below. When I have a reference with an "Ł" in it, the character disappears from the bibliography; i.e. "Łukasz" becomes "ukasz". However, in regular Latex, it comes out fine.

This question suggests using {\L}, which works; however I'm generating my *.bib file from Zotero, and it will be a pain in the rear to manually edit the bib file every time I regenerate it (I can't just enter the special character into Zotero as {\L} as it escapes the commands).

Every other special character I have in my reference list works!

Latex:

\documentclass[a4paper, oneside, 12pt, openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[super, sort]{natbib}
\DeclareUnicodeCharacter{0141}{\L{}}
\begin{document}
    sometext Ł \cite{sivanesan_nanostructured_2014}
    \bibliographystyle{ieeetr}
    \bibliography{somebib}
\end{document}

Bibtex:

@article{sivanesan_nanostructured_2014,
    title = {Nanostructured silver-gold bimetallic {SERS} substrates for selective identification of bacteria in human blood},
    volume = {139},
    issn = {0003-2654, 1364-5528},
    url = {http://xlink.rsc.org/?DOI=c3an01924a},
    doi = {10.1039/c3an01924a},
    language = {en},
    number = {5},
    urldate = {2017-06-29},
    journal = {The Analyst},
    author = {Sivanesan, Arumugam and Witkowska, Evelin and Adamkiewicz, Witold and Dziewit, Łukasz and Kamińska, Agnieszka and Waluk, Jacek},
    year = {2014},
    pages = {1037},
    annote = {Łukasz},
    file = {c3an01924a.pdf:C\:\\Users\\bluet_000\\AppData\\Roaming\\Zotero\\Zotero\\Profiles\\9p6n5zoc.default\\zotero\\storage\\Q7F4GE2G\\c3an01924a.pdf:application/pdf}
}
  • With biblatex/biber you would have no problem. – Bernard Jul 04 '17 at 19:38
  • The canonical way to enter the character Ł in a bib file, for processing with BibTeX, is indeed as {\L}. See also the posting How to write “ä” and other umlauts and accented letters in bibliography? Question to you: Why are you letting (making?!) Zotero rebuild the entire bib file from scratch repeatedly? Once you're satisfied with the bib entries -- other than the Polish Ł character -- can't you just save all entries in a text file with extension .bib, open the file in a text editor, and to a global search and replace of Ł to {\L}? – Mico Jul 04 '17 at 19:55
  • 2
    bibtex does not support utf8. You may try cl-bibtex or bibtexu instead of bibtex. -Or you have to switch to biblatex/biber or convert you file to latin9 and use bibtex8. – Sveinung Jul 04 '17 at 19:55
  • 1
    The BBT add-on to Zotero takes care of translating Ł to {\L}, and will also automatically keep your bib file up to date if you want to. – retorquere Nov 23 '17 at 22:53

1 Answers1

3

You can get LaTeX to copy the bib file to a bibtex-friendly version:

enter image description here

\documentclass[a4paper, oneside, 12pt, openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[super, sort]{natbib}
\DeclareUnicodeCharacter{0141}{\L{}}

\def\outcodes{%
\catcode`\\=12
\let\protect\string
\def\IeC##1{{##1}}%
}
\newwrite\mybibout
\immediate\openout\mybibout=somebib2.bib
\newread\mybibin
\openin\mybibin=somebib.bib
{
\loop
\ifeof\mybibin
\else
{\outcodes
\read\mybibin to \tmp
\immediate\write\mybibout{\tmp}%
}
\repeat
\immediate\closeout\mybibout
}

\begin{document}
    sometext Ł \cite{sivanesan_nanostructured_2014}
    \bibliographystyle{ieeetr}
    \bibliography{somebib2}
\end{document}
David Carlisle
  • 757,742