Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
1  
\font\tenrm="CMU Serif" –  egreg Jan 24 '13 at 17:13
add comment

1 Answer

up vote 10 down vote accepted

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

enter image description here

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).

share|improve this answer
    
See the list of cmu fonts from the cmu homepage. Are there smaller and math versions available? –  lvaneesbeeck Jan 24 '13 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. –  egreg Jan 24 '13 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? –  lvaneesbeeck Jan 27 '13 at 21:27
    
@lvaneesbeeck What TeX Live did you install? If you have the old 2009, it won't have those fonts. –  egreg Jan 27 '13 at 21:29
1  
Your 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? –  user30564 May 12 '13 at 0:24
show 7 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.