TeX - LaTeX Asked by Marcel S. on November 21, 2020
Is it at all possible to typeset text in Esperanto language (with LuaLaTeX
) using Adobe Garamond Pro font? After some research and testing it appears there is no way to do this, that some characters (such as ĉ, ŭ, ĥ) are simply missing and impossible to create even with composite commands (like ^ c
).
Or is there a way around it? Thanks in advance for any help!
Edit
Upon request adding MWE:
%%%! lualatex
deffontBaseName{adobegaramondpro}
deffontBaseNameBold{agaramondprosemibold}
documentclass[11pt,twoside,openright]{book}
usepackage{polyglossia}
setdefaultlanguage{esperanto}
setmainfont[BoldFont={fontBaseNameBold}]{fontBaseName}
begin{document}
Antaŭparolo
Ĉi-loke estas kaj fariĝis ŝoseo estas ŝtopita teĥnike
end{document}
This is a few years old, but I saw it when it landed back on the front page, and it deserves an answer. Actually, it deserves two, depending on which problem you want to solve: getting those accents in Garamond, or faking accented characters in a font that does not contain them.
You update in the comments to say that you ended up using Linotype Garamond Premier. In 2020, a free font that contains all these characters is EB Garamond. Garamond Libre would also work.
tracinglostchars=2
documentclass[11pt,twoside,openright]{book}
pagestyle{empty} % Suppress page numbering.
usepackage{polyglossia}
setdefaultlanguage{esperanto}
usepackage{ebgaramond}
begin{document}
Antaŭparolo
Ĉi-loke estas kaj fariĝis ŝoseo estas ŝtopita teĥnike
end{document}
If you are looking instead for a solution to the problem that your font does not contain combining accents (rare these days, but I have run into it), you can tell LaTeX to use non-combining accents. A MWE for your sample:
tracinglostchars=2
documentclass[11pt,twoside,openright]{book}
pagestyle{empty} % Suppress page numbering.
usepackage{polyglossia}
usepackage{newunicodechar}
setdefaultlanguage{esperanto}
usepackage{ebgaramond}
DeclareTextAccent{^}{UnicodeEncodingName}{"02C6} % Modifier letter circumflex accent
DeclareTextAccent{u}{UnicodeEncodingName}{"02D8} % Spacing breve
newunicodechar{Ĉ}{^{C}}
newunicodechar{ĝ}{^{g}}
newunicodechar{ŝ}{^{s}}
newunicodechar{ĥ}{^{h}}
newunicodechar{ŭ}{u{u}}
begin{document}
Antaŭparolo
Ĉi-loke estas kaj fariĝis ŝoseo estas ŝtopita teĥnike
end{document}
The Unicode standard says that canonically-precomposed and decomposed characters should be equivalent, but not every font on every system implements that correctly. If a font you want to use contains combining accents, but a precomposed character does not work, delete the DeclareTextCommand
lines from the above example.
Answered by Davislor on November 21, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP