3

I am facing issues with special characters in biber. Specifically, this is about "ʼ", "ḥ" and "Ḥ". These are used for Arabic transcription.

I have tried rendering this with LuaLaTeX instead of PDFLaTeX, this solved the issue insofar as it renders the document, but the "ʼ" is replaced by a rectangle in the document.

I have also tried adding bibencoding = ascii and texencoding = ascii. Both resulted in the document not rendering.

\documentclass[10pt,a4paper]{article}
    \usepackage[utf8]{inputenc}
    \usepackage[american]{babel}
    \usepackage{csquotes}
    \usepackage[backend=biber,
                bibencoding=utf8,
                language=auto,
                style=authoryear
                sorting=nyt, 
                maxbibnames=10,
                natbib=true, 
                idembib=false]{biblatex}
\begin{filecontents*}{ref.bib}
@book{suhrawardiPhilosophieErleuchtungHikmat2011a,
  title = {Philosophie der Erleuchtung =: Hikmat al-ishraq},
  shorttitle = {Philosophie der Erleuchtung},
  author = {Suhrawardī, Yaḥyá ibn Ḥabash},
  editor = {Sinai, Nicolai},
  date = {2011},
  publisher = {{Verlag der Weltreligionen}},
  location = {{Berlin}},
  isbn = {978-3-458-70032-6},
  keywords = {Early works to 1800,Sufism},
  langid = {german},
  pagetotal = {469},
  translator = {Sinai, Nicolai}
}

@book{avicennaMetaphysicsHealingParallel2004,
  title = {The metaphysics of The healing: a parallel English-Arabic text = al-Ilahīyāt min al-Shifāʼ},
  shorttitle = {The metaphysics of The healing},
    author = {Avicenna},
    editor = {Marmura, Michael E.},
    date = {2004},
    publisher = {{Brigham Young University Press}},
    location = {{Provo, UT}},
    isbn = {978-0-934893-77-0},
    keywords = {Early works to 1800,Islamic philosophy,Metaphysics},
    langid = {eng ara},
    pagetotal = {441},
    series = {Islamic translation series},
    translator = {Marmura, Michael E.}
}
\end{filecontents*}

\addbibresource{ref.bib}

\begin{document}
    \title{Some title}
    \author{}
    \date{}

    \maketitle

\nocite{avicennaMetaphysicsHealingParallel2004}

\nocite{suhrawardiPhilosophieErleuchtungHikmat2011a}

    \printbibliography[]
\end{document}

I have also looked at this question and this question. They are related, but don't offer a working soloution.

Furthermore, my ref.bib file is created by Zotero, so I would much prefer not having to change its contents.

Floris
  • 89
  • 1
    Not that it matters a great deal, but in this constellation this is not actually a problem that only occurs with biblatex or Biber. The same error messages can be reproduced if you just say Suhrawardī, Yaḥyá ibn Ḥabash al-Ilahīyāt min al-Shifāʼ in the document body directly and don't load or use biblatex at all. – moewe Dec 07 '20 at 21:39
  • 1
    The easiest way around the problem, IMHO, is to use a font that has the character, and not "build" the character. Try using fontspec + an appropriate font (e.g., Gentium or Brill, but any font that has the glyph will suffice.) –  Dec 07 '20 at 23:12
  • @BlackBird this is good advice, I did not realize that the font causes this problem. – Floris Dec 13 '20 at 19:42
  • @BlackBird however, I can't manage to change the font. Can you write an answer expanding on this soloution? – Floris Dec 13 '20 at 19:52
  • 1
    It's as easy as using a font package of a font that has those glyphs (\usepackage{gentium}, or libertine, or ebgaramond etc.) or using \usepackage{fontspec} \setmainfont{Linux Libertine O} and compile with xelatex or lualatex (be sure to remove the packages inputenc and fontenc). –  Dec 13 '20 at 21:44

1 Answers1

6

You can help LaTeX and provide the representation of the unknown characters.

\begin{filecontents*}{\jobname.bib}
@book{suhrawardiPhilosophieErleuchtungHikmat2011a,
  title = {Philosophie der Erleuchtung =: Hikmat al-ishraq},
  shorttitle = {Philosophie der Erleuchtung},
  author = {Suhrawardī, Yaḥyá ibn Ḥabash},
  editor = {Sinai, Nicolai},
  date = {2011},
  publisher = {{Verlag der Weltreligionen}},
  location = {{Berlin}},
  isbn = {978-3-458-70032-6},
  keywords = {Early works to 1800,Sufism},
  langid = {german},
  pagetotal = {469},
  translator = {Sinai, Nicolai}
}

@book{avicennaMetaphysicsHealingParallel2004, title = {The metaphysics of The healing: a parallel English-Arabic text = al-Ilahīyāt min al-Shifāʼ}, shorttitle = {The metaphysics of The healing}, author = {Avicenna}, editor = {Marmura, Michael E.}, date = {2004}, publisher = {{Brigham Young University Press}}, location = {{Provo, UT}}, isbn = {978-0-934893-77-0}, keywords = {Early works to 1800,Islamic philosophy,Metaphysics}, langid = {eng ara}, pagetotal = {441}, series = {Islamic translation series}, translator = {Marmura, Michael E.} } \end{filecontents*}

\documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[ backend=biber, bibencoding=utf8, language=auto, style=authoryear, sorting=nyt, maxbibnames=10, natbib=true, % idembib=false ]{biblatex}

\addbibresource{\jobname.bib}

\DeclareUnicodeCharacter{02BC}{'} \DeclareUnicodeCharacter{1E24}{\d{H}} \DeclareUnicodeCharacter{1E25}{\d{h}}

\begin{document} \title{Some title} \author{} \date{}

\maketitle

\nocite{avicennaMetaphysicsHealingParallel2004} \nocite{suhrawardiPhilosophieErleuchtungHikmat2011a}

\printbibliography[] \end{document}

enter image description here

How do you get the codes? Look in the log file when you get the error!

! Package inputenc Error: Unicode character ʼ (U+02BC)
(inputenc)                not set up for use with LaTeX.

See the inputenc package documentation for explanation. Type H <return> for immediate help. ...

l.65 \printbibliography[]

?

! Package inputenc Error: Unicode character ḥ (U+1E25) (inputenc) not set up for use with LaTeX.

See the inputenc package documentation for explanation. Type H <return> for immediate help. ...

l.65 \printbibliography[]

?

! Package inputenc Error: Unicode character Ḥ (U+1E24) (inputenc) not set up for use with LaTeX.

See the inputenc package documentation for explanation. Type H <return> for immediate help.

Alternatively, do

\usepackage{newunicodechar}

\newunicodechar{ʼ}{'} \newunicodechar{Ḥ}{\d{H}} % \d is dot under accent \newunicodechar{ḥ}{\d{h}}

egreg
  • 1,121,712
  • While this solves the issue for now, it does not seem to be a real soloution, since the issue might just come up again with a different symbol. How does one find the hexa-decimal codes you are using? – Floris Dec 07 '20 at 18:09
  • 1
    @Floris You find them in the log file! I'll add something. – egreg Dec 07 '20 at 20:17