I want to write in urdu with nastaleeq font. I have done quite a few things but i dont know how to write it. Plus i dont know how to use xetex. So can anyone give me a simple example writing urdu in the desired font and how to run it on texmaker.


Here is a typesetting of poem using IranNastaliq font and XePersian package. XePersian is included in texlive and in case you are missing it, you can get it from CTAN. One problem here is the font. IranNastaliq is designed for persian/farsi alphabet and despite of similarities between persian and urdu, it misses some of letters of urdu such as

enter image description here

This being said, I think you can find an urdu nastaliq font, just add it to you tex file and you will be good to go. I don't see any major difference between typesetting persian and urdu. Here is a sample tex file containing a poem from Saadi with nastaliq font.


\title{سر عشق}


\myverse{هزار جهد بکردم که سر عشق بپوشم}
{نبود بر سر آتش میسرم که نجوشم}

\myverse{به هوش بودم از اول که دل به کس نسپارم}
{شمایل تو بدیدم نه عقل ماند و نه هوشم}

\myverse{به راه بادیه رفتن به از نشستن باطل}
{که گر مراد نیابم به قدر وسع بکوشم}


which gives you this:

enter image description here

Please note that this is just a MWE and needs certain modification to be suitable for you purpose.

You can compile this from command line using:

xelatex your_poem.tex

To you use it with TexMaker, refer to this question.

enter image description here

Above tex sample is borrowed from XePersian Forum and it's respected creator.

| improve this answer | |
  • i tired the things that were given in the link provided by you but it keeps on running like forever ; The texmaker i have installed on my system has a option in Option ....> configure....> Quick build -----> Xelatex + pdf i checked this one but it gives the error ! Fatal fontspec error: "cannot-use-pdftex" ! ! The fontspec package requires either XeTeX or LuaTeX to function. ! ! You must change your typesetting engine to, e.g., "xelatex" or "lualatex" What should i do now ? – Shaheryar Oct 4 '13 at 5:34

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.