[Tex/LaTex] ligature with special characters: fī

accentsbibtexcompilingligatures

I am using a lot of special characters such as ā, ī, ū, š, ṣ, ḥ, ḫ and so on. I just spotted that sometimes this causes problems with ligatures for example the fi-ligature, if the dot on the i is a dash: fī.

In my MWE below I am using the Brill font: http://www.brill.com/author-gateway/brill-fonts .

I've come so far to have learned that there are three options to set :

If you want to get an MWE, please download it from here: http://www.arabic-philosophy.com/misc/minimal_fi.tex (Copy&Paste into this forum did not work because it made Option 1 and 3 be identical in sight.)

This is the result: http://www.arabic-philosophy.com/misc/minimal_fi.pdf

Option 1 is the one that emerges when I type a f and an ī.

Option 2 has been suggested by tohecz.

Option 3 is the one I'd prefer.

Is there a way to enable myself just to type as I used to but to tell LuaLatex to use option 3 instead of 1 as the output? What in fact is the difference between 1 and 3?

Best Answer

Your option 3 is using

U+0069 (LATIN SMALL LETTER I) U+0304 (COMBINING MACRON)

instead of

U+012B (LATIN SMALL LETTER I WITH MACRON)

You get the former when inputting the latter by using

\usepackage{newunicodechar}
\newunicodechar{ī}{ī} % use "i + combining macron" in the second argument

or, without too much hassle in inputting strange characters,

\newunicodechar{ī}{i\char\string"0304 }

This is the output from your test file (omitting option 2).

enter image description here

Minimal example:

\documentclass[12pt, a4paper]{scrbook}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Brill}

\usepackage{newunicodechar}
\newunicodechar{ī}{i\char\string"0304 }

\begin{document}

\begin{verbatim}
1a. Kitāb an-Naǧāt fī l-ḥikma.

1b. \emph{Kitāb an-Naǧāt fī l-ḥikma}.

3a. Kitāb an-Naǧāt fī l-ḥikma.

3b. \emph{Kitāb an-Naǧāt fī l-ḥikma}.
\end{verbatim}

1a. Kitāb an-Naǧāt fī l-ḥikma.

1b. \emph{Kitāb an-Naǧāt fī l-ḥikma}.

3a. Kitāb an-Naǧāt fī l-ḥikma.

3b. \emph{Kitāb an-Naǧāt fī l-ḥikma}.

\end{document}
Related Question