# Tag Info

25

Depending on your precise needs there are different options: If you want to only run XeLaTeX explicitly from time to time, use Tools -> Commands -> XeLaTeX. You may assign a shortcut in the options. If you want to modify the default build configuration (i.e. the compiler for Tools -> Build / Build & View) then change Options -> Build -> ...

11

Using the solution from Fix nested section numbers in RTL languages with polyglossia (and no, I haven't gotten down to why this works yet): \documentclass{book} \usepackage{polyglossia} \setmainlanguage[numerals=western]{farsi} \newfontfamily\arabicfont{Arial} \makeatletter \renewcommand{\SepMark}[1]{\def\@SepMark{#1}} \makeatother \SepMark{-} \begin{...

10

Yes. You should install the font in your OS, or use the font as an external file. If you installed the font file (e.g. using Windows control panel/font), then you can call your font using \settextfont{XB Niloofar} no mapping is needed, since xepersian sets the proper mapping by default. If you want to use your font, without installing it, your font file ...

10

This seems to do; you have to set also a different \baselineskip, though. % Enable right to left typesetting \TeXXeTstate=1 % define a font (this is one I have) \font\frmnorm = "Scheherazade" at 24pt \let\rm = \frmnorm \uselanguage{farsi} % At the start of a paragraph remove the indentation box then % start right to left typesetting, after reinserting the ...

9

Two things up front: As XePersian is relying on the XeTeX engine, I would recommend using polyglossia instead of babel. The article document class cannot use the 14pt option; for more information, take a look at this answer. The Problem in your case is that XePersian clearly changes all western numerals (123) into genuine Arabic numerals (١٢٣), even ...

9

I think this has nothing to do with TeXstudio as your editor but a feature of xepersian package. I looked at the documentation and found out that if you want to show English text for short left-to-right text, you wrap the text in \lr{}. If it involves larger amount of text, you use the latin environment. Perhaps you meant to type something like %\...

9

You are probably not loading pgf directly; it's more likely that you are loading tikz or pgfplots, or some other package that depends on tikz. Just make sure you load this before loading bidi. Since bidi modifies lots of package behaviour to work with RTL languages, it's generally best to load it last in the order. You may not be even loading bidi ...

7

You have two options. You want your caption label in LTR (english). In this case simply use \caption{\rl{الگوریتم شماره دو}} MWE: \documentclass[a4paper,12pt]{report} \usepackage{xepersian} \settextfont[Scale=1.3]{B Nazanin} \begin{document} \begin{latin} \begin{table}[h!] \large \centering \begin{tabular}{|l|} \hline \textbf{Proximal Forward-Backward ...

7

I installed a persian keyboard on my windows 10 and tried it out. "shift + space" inserted for me not a half-space but U+200C (ZERO WIDTH NON-JOINER). ] I had no problem to insert and use with my normal latex editor (winedt) but it doesn't work in texworks. Looking at the texworks bug tracker I found a related issue: https://github.com/TeXworks/texworks/...

7

Unfortunately the package explicitly prevents loading fonts with names that contain the string HM You can use \usepackage[fontsloadable]{xepersian} to disable this or it would not be unreasonable to make a local copy of the package and replace the two instances of HM by anything else, eg ZZZZZ to disable that feature.

7

The amsthm package provides several "theorem styles". While the default style, also known as the plain style, is programmed to typeset its body in italics, the remark and definition styles employ upright lettering. I therefore suggest that you insert the instruction \theoremstyle{definition} after loading amsthm and before issuing the instruction \...

6

I believe that xepersian sets up a mechanism similar to ligatures (probably via a map file), so that if the period is followed by a digit it is transformed in the decimal separator. With \overline it fails because this command is not a digit. I found an undocumented feature: you can use \decimalseparator in the cases such as this, where it is not followed ...

6

Yes there is. You can find a template according to "Sharif University of Technology" rules in Parsilatex website. See here and here (courtesy of M. Sharifitabar). Support is also available through parsilatex forum.

6

I recommend XePersian package for typesetting Persian/Farsi in your document. For a quick start, see ParsiLaTeX.com quick start If you have a working installation of TeXLive (use 2015 for the latest version) with xepersian package installed, you can try this minimal example: \documentclass{report} \usepackage{xepersian} \settextfont{Tahoma} \begin{...

6

The above answer is correct. I am adding this answer for the reference. One should add this lines to the MWE provided in the question: \makeatletter \def\SepMark#1{\gdef\@SepMark{\if@RTL\fi#1\if@RTL\fi}} \makeatother So, this will work as intented: \documentclass{book} \usepackage{xepersian} \settextfont[Scale=1]{Arial} \setlatintextfont[Scale=1]{Arial} \...

6

Use babel, which supports Pashto. (As of 2020, polyglossia does not.) This MWE requires LuaLaTeX from 2020 or later (or lualatex-dev might work). \documentclass{article} \tracinglostchars=2 \usepackage[english,bidi=basic]{babel} \usepackage{unicode-math} \babelprovide[import, onchar=ids fonts]{pashto} \defaultfontfeatures{ Scale=MatchUppercase, Ligatures=...

5

You need to set the environment up to accept an optional argument if you wish to use one. (This problem has nothing to do with the direction of typesetting.) There is an example on page 42 of the manual for listings. However, to get the caption typeset correctly, you need to look at page 18 of the manual for bidi which explains the problem and its solution ...

5

The best possible choice is to use zref-perpage package from zref bundle. It provides a \zmakeperpage[<reset>]{<counter>} command to force a counter reset with each page. Therefore adding \zmakeperpage{footnote} in your preamble will do the job. A mwe is as follows: \documentclass{article} \usepackage{xepersian} \usepackage{zref-perpage} \...

5

You can say \begin{table}[htp] \centering\setLTR \begin{tabular}{|r|c c c c c c|} \hline $t(s)$ & 0 & 1 & 2 & 3 & 4 & 5 \\ \hline $x(m)$ & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline \end{tabular} \end{table} to change the writing direction in the table environment. In case you have a caption below the table you ...

5


5

I had some issues with that template, so here's a solution with the article class. I have used 10pt to fit the example in a single page, but you can use 12pt too, for example. Please note that I don't speak Fārsī, so there might be mistakes in the title, author or even the date, although I tried to check to the best of my abilities and everything seems OK. ...

5

Note first that the miniTOC inside \printmyminitoc command is reversed ( from left to right ) you can correct that with \begin{RTL} \printcontents[chapters]{}{1}{} \end{RTL} To obtain persian form of \thechapter you can just do it with \lr{\thechapter} Code \documentclass[twoside]{book} \usepackage{tikz} \usetikzlibrary{shadows.blur} \usepackage{...

5

Install the NppExex plugin using the plugin manager, and then press <F6> and paste the following code: NPP_SAVE cd $(CURRENT_DIRECTORY) xelatex$(NAME_PART).tex" and click Save and then type, for example, xelatex Everytime you want to run xelatex on a file in the future, simply press CTRL+F6. If you have configured multiple scripts, you can select ...

5

As your example is not compilable and therefore not easy to test, I will provide only some remarks: You are using \exp_args to transform exactly one N type argument into c type, as in \exp_args:Ncnx \fontspec_set_family:Nnn { l__xepersian_ #2 #3 _family_tl } {#5,##1} {##2} Instead you should generate a variant of \fontspec_set_family that does exactly ...

4

As ofcourse Ludovic's answer is correct, bidi defines \thesection and similar counter values like this: \thechapter\@SepMark\@arabic\c@section and provides a command \SepMark to redefine the separator mark, and use it in all other counter values. So, it is logical to use \SepMark{-} instead of redefining each counter value separately.

4

Just an answer for Linux users which will find this page via search engines: If you use a Linux distro such as Ubuntu then download the font from the open font library and copy it to ~/.fonts direcotry and run the following command to add it to the fonts cache: $fc-cache -v ~/.fonts Then recompile your document. 4 The trick is to \clearpage or \cleardoublepage before switching the numbering, so that the final page in the previous numbering system gets numbered before the numbering is switched. Since \cleardoublepage reduces to \clearpage in a single-sided document, simply \cleardoublepage is sufficient. The following code should do the right thing: Stuff on last ... 4 use ctrl+shift+M for$*\$ snippet.

4

In your references file, remove the line \chapter*{مراجع}%\markboth{مراجع}{مراجع}‎ and the problem is gone. Note that the thebibliography environment automatically inserts a sectioning heading, so the above line is not needed. Note also that you are \includeing it, so a \clearpage is issued before that and \addcontentsline will refer to the correct page.

Only top voted, non community-wiki answers of a minimum length are eligible