I'd like to use Knuth's Computer Modern font with XeTeX in a way where I don't have to type accents in a \'
-way and without any gimmick such as making accentuated characters active and then say \def\é{\'e}
. Is there an extended font that would do such things for me?
1 Answer
The Computer Modern Unicode cover a big part of Unicode; they are part of TeX Live 2012.
\font\tenrm="CMU Serif:mapping=tex-text"
\tenrm
Praha je hlavní a současně největší město České republiky a
14.~největší město Evropské unie. Leží mírně na sever od středu Čech
na řece Vltavě, uvnitř Středočeského kraje, jehož je správním centrem,
ale jako samostatný kraj není jeho součástí.
Tirana është kryeqendra e qarkut dhe rrethit me të njëtin emër dhe
kryeqyteti i Republikës së Shqipërisë.
İstanbul, Türkiye'nin en kalabalık, iktisadi ve kültürel açıdan en
önemli şehri.
Москва столица Российской Федерации, город федерального значения,
административный центр Центрального федерального округа и центр
Московской области, в состав которой не входит.
Η Αθήνα (Ἀθῆναι στα αρχαία ελληνικά και την καθαρεύουσα) είναι
η πρωτεύουσα της Ελλάδας. Επίσης είναι η έδρα της Περιφέρειας Αττικής.
\bye
You may need to say
\font\tenrm="[cmunrm.otf]:mapping=tex-text"
if you don't have the fonts installed as system fonts.
The texts are from Wikipedia (pages for Praha, in Czech; for Tirana, in Albanian; for Istanbul, in Turkish; for Moscow, in Russian; for Athens, in Greek).
-
See the list of cmu fonts from the cmu homepage. Are there smaller and math versions available? Jan 24, 2013 at 23:06
-
1@lvaneesbeeck No, they are only at one size. The Latin Modern fonts have optically scaled variants, but cover a smaller part of Unicode. For math use Latin Modern Math; but setting a Unicode math font in Plain is not a task I'd start, personally.– egregJan 24, 2013 at 23:09
-
with texlive-full installed,
\font\tenrm="CMU Serif:mapping=tex-text"
doesn't compile and\font\tenrm="[cmunrm.otf]:mapping=tex-text"
doesn't show non-ASCII caracters... Any idea to solve this problem? Jan 27, 2013 at 21:27 -
@lvaneesbeeck What TeX Live did you install? If you have the old 2009, it won't have those fonts.– egregJan 27, 2013 at 21:29
-
1Your solution works great. Provided I am using the "article" class in Latex. If I am using another class such as "scrreprt" - I end up getting errors. Any idea how to resolve this?– user30564May 12, 2013 at 0:24
\font\tenrm="CMU Serif"