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.

Consider a non-English document compiled in XeLatex, the standard font size is equal for all English and non-English text. How is it possible to set the size of the English text and change the font face?

share|improve this question
    
How can XeLaTeX indentify the languages? Give an example of some lines in form of a MWE. –  Keks Dose Sep 2 '12 at 19:08

1 Answer 1

You can use Polyglossia features: if \englishfont is defined, then XeLaTeX will use it for English text.

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\newfontfamily{\englishfont}{Linux Biolinum O}

\usepackage{polyglossia}
\setmainlanguage{italian}
\setotherlanguage{english}

\begin{document}
Testo in italiano.

\begin{english}
Text in English.
\end{english}
\end{document}

enter image description here

share|improve this answer
    
\latin and \persian is better than \begin{english} –  seyed Oct 6 '13 at 6:31
    
This is probably a silly question, but how does one set different font sizes for particular languages as indicated in the title of this post? I don't see it in the MWE. –  camatkara Nov 13 at 12:24
    
@camatkara For sizes, use the Scale option to \newfontfamily. –  egreg Nov 13 at 13:13
    
Thanks @egreg, got it working. –  camatkara Nov 13 at 16:01
    
@seyed I would also prefer the simpler \latin{} command, but the \begin{english} environment is the only thing that's worked in properly hyphenating English for me. Can you elaborate? Thanks. –  camatkara Nov 13 at 16:02

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.