Go to page:

Search:   Help



LyX documentation


Shared groups



Categories: Windows, Farsi
<< | Page list | >>

How to set up LyX under Windows to use it for Farsi


  1. Install LyX for Windows
  2. In the Windows installer don't forget to select to install the spell checker for "فارسی".


  • In Tools→Preferences→Look and feel→Screen fonts, select the fonts which have Arabic glyphs. (On Windows the standard fonts like Arial already support Arabic characters.) (When you have installed the Liberation fonts under Linux, set Liberation Serif, Liberation Sans, and Liberation Mono, for Roman, Sans Serif, and Typewriter, respectively).

Testing the Installation

  1. Run LyX and press Ctrl+N to open a new document. Write a few words in English, and press Ctrl+R.
    A PDF viewer program should be opened; check that it displays the text correctly.
  2. Open another document and call the menu Document → Settings.
    Select there in the Language section "Farsi",
    press OK and type in a few words. Press Ctrl+R and check the output.

Possible problems

  • If you do not see Farsi, check that LyX's preferences are properly set (Check if the screen fonts support the Arabic script).


  • It is possible to add new templates to LyX. Place the template files in
    ~:\Documents and Settings\<username>\Application Data\LyX2.2\templates. Then reconfigure LyX by using the menu Tools → Reconfigure and restart LyX.

Setting Up LyX Under Ubuntu(mint) to Use it for Farsi

This description is not correct. For Farsi the LaTeX-package arabi should be used. This description is about the LaTeX-package arabtex that does not natively support Farsi.

  1. install LyX from mintinstall (package installer)
  2. install the package "texlive-lang-arab" from mintinstall
  3. open LyX and use the menu Tools → Reconfigure
  4. Start LyX, then in the menu Tools → Preferences go to Language Settings and select Language. Change Command start to \selectlanguage{arabic}, and change Language package to Custom, and enter \usepackage[farsi,arabic]{babel} in the provided text field.
  5. Still in Tools → Preferences, go to Output and select LaTeX, then change Use LaTeX font encoding to LAE,LFE in the provided text field.
  6. Still in Tools → Preferences, go to Editing and under Keyboard/Mouse check the Use keyboard map option and for First select Farsi from the *.kmap files that are shown when hitting the Browse button.
  7. Hit the Save button in the Preferences window then restart LyX.
  8. Still in Document → Settings, go to Language and select Arabic (Arab TeX) as the Language, then change Encoding to Other and select Unicode (utf8) as the encoding, then select None for the Language package option.
  9. Hit the Apply button then close the Document Settings window.
  10. Now enter text in your document (which should be going from right to left now), save the file as a LyX file, then select File → Export → PDF (pdflatex). You should get a PDF with Farsi in it.


Using Farsi

Part numbering

When you are using a report or book document class, you will see that the parts are not numbered in the PDF output. The reason for this is that the default numbering for parts is Roman numbering. LaTeX's Farsi support automatically translates Arabic numbers to Farsi numbers, but cannot handle roman numbers.

You have two possibilities to overcome this:

  1. Redefine the part numbering from Roman numbers to Arabic ones by adding this line to your document preamble:
  2. Make Roman numbering work in Farsi by redefining the part numbering with this line that you add as TeX code at the first line of your document:
    Note that you need to mark this fist line as English in your document.

In this LyX file the two methods are demonstrated.


It is important that you select for your document fonts that contain the Arabic script. Otherwise you will get error messages when viewing your file as PDF. If you use in the document settings the option use non-TeX fonts, you can use any OpenType or TrueType font. Here is a list of known OpenType an TrueType fonts containing the Arabic script. Note: not all of them will also fully support Urdu, so you will have to try.

Name Font Family Contains also Type
Andalus roman CP 862, CP 1252 TrueType
Arabic Transparent sans serif none TrueType
Arabic Typesetting sans serif CP 1250, CP 1252, CP 1254, CP 1257 OpenType
Arial sans serif almost all writing systems OpenType
Courier New typewriter almost all writing systems OpenType
FreeFont roman, sans serif, typewriter almost all writing systems OpenType and Web Open Font Format
Lateef roman CP 1252 OpenType and Graphite
Microsoft Sans Serif sans serif almost all writing systems OpenType
Scheherazade roman CP 1252 OpenType and Graphite
Simplified Arabic sans serif CP 862, CP 1252 TrueType
Simplified Arabic Fixed typewriter CP 862, CP 1252 TrueType
Tahoma sans serif almost all writing systems OpenType
Times New Roman roman almost all writing systems OpenType
Traditional Arabic roman CP 862, CP 1252 TrueType

Windows Farsi

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2017-11-21 01:00 CET