I'm typing my thesis in Farsi, and I'm using LiveTeX. I want to change my font in some parts of my documents. I checked most of the relevant questions and answers but unfortunately I couldn't find out my answer. There are two questions:

  1. How can I change the font of some specific parts of my thesis?

  2. What are font families?

I already used {\fontfamily{ppl}\selectfont ... } but it didn't work.

I used it as:

\newenvironment{ppl}{\fontfamily{ppl}\selectfont}{‎Times New ‎R‎oman‎}‎
‎\textwidth =12cm‎ 
‎\textheight =19cm‎
‎‎‎\usepackage{amsmath,amssymb}‎ ‎‎‎
‎\settextfont[Scale=1]{XB Zar}‎
‎\setdigitfont[Scale=1]{XB Zar}‎ 
من این همه را خودم نوشته ام و این یکی را می خواهم به صورت امتحانی در زیر با فونت دیگری بنویسم . ‎‎
‎‎‎من این را به صورت امتحانی مینویسم . 
  • 1. Do you mean change the typeface to italic and/or bold? – Werner Aug 15 '11 at 3:54
  • No I didn't . I mean changing the font , i.e. frome XB Zar To Times New Roman . – Prelude Aug 15 '11 at 4:21

You are using xepersian which is used with XeLaTeX, so you can use commands from the fontspec package (which is loaded automatically by xepersian) to change fonts or you can use commands from the xepersian package itself.

XePersian has a command \deflatinfont which allows you to create a command for the latin font you want. For example, you want Times New Roman as the font, so you could do:

\deflatinfont\timesroman{Times New Roman}

You would then use it with:

{\timesroman Some Times Roman text here}

To make this an environment, (after defining the font as shown above) you can do:


and then use


You can use \deflatinfont multiple times (with different command names) in your document to define other latin fonts.

| improve this answer | |
  • 1
    @Negin: Note the use of \newenvironment{<nam>}{<begdef>}{<enddef>}. It takes 3 mandatory arguments, giving it a name <nam> and executing <begdef> at the start and <enddef> at the end. Effectively, \begin{<nam>}=<begdef> and \end{<nam>}=<enddef>. – Werner Aug 15 '11 at 3:59








من ایران را دوست دارم


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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