# Tag Info

17

A workaround is to insert Zero Width Joiner character around the text break area, this would force final/initial forms. For most fonts with should be OK, though it would break contextual alternates in more advanced fonts, but the text should still be readable. Other than that, there is no way to switch color without breaking text into two parts in XeTeX. \...

17

In general, I advise against using bold and slanted in Arabic for emphasis: they work poorly in Arabic, especially the slant which is not always as visible and is quite alien to Arabic typesetting traditions. (Even though my own Amiri font has them, they are there to avoid the fake bold and slanted synthesized by GUI applications which are very very poor and ...

15

The 'proper' (internal) name of the primitive has always been \textdir, but for various reasons it used to be 'activated' as \luatextextdir in LuaLaTeX. The LaTeX team have recently revised this approach and all primitives now have their 'natural' names in LuaLaTeX. Thus you should either update your code or add \directlua{ tex.enableprimitives("luatex",...

14

From reading the documentation I deduced that \<…> will do the trick: \documentclass[a4paper,10pt]{article} %In the preamble section include the arabtex and utf8 packages \usepackage{arabtex} \usepackage{utf8} \begin{document} %start encoding to unicode %Note that your layout must support arabic text when compiling \setcode{utf8} %To start ...

14

I don't know whether this fact is documented (I can't see it in the manual, though), but the arabicfnt.sty that's automatically loaded has \DeclareRobustCommand{\times}{\fontfamily{artimes}\selectfont} which explains the mystery. You can solve the problem by adding to your document \DeclareMathSymbol{\mtimes}{\mathbin}{symbols}{"02} and using \mtimes ...

13

In texmf-dist/doc/latex/arabi/user_guide.pdf, pages 50–51 give samples of fonts from Microsoft and from arabeyes.org (there are .ttf versions of the latter in Debian’s fonts-arabeyes package). And the documentation for dad shows examples of its output. Of course, with xetex and luatex, you can use any unicode, OpenType font, whether free or commercial. ...

13

Because Arabic is complex, characters are connected to form a word, unlike English and Latin, it can not bend to follow a path easily. To remedy this, you have to break the text into separate words using text format delimiters={|}{|} and activate the font at the begining of the tikzpicture by adding \arabicfont\fontsize{12pt}{20}\selectfont. \documentclass[...

11

To align text to the right you can just put them in minipage environment, regarding frame title you can use \setbeamertemplate{frametitle}[default][right] I have created 2 macro \myenum and \myitem for enumerate and itemize bullets. Here the code % compile with xelatex \documentclass[20pt]{beamer} \usetheme{Warsaw} \usepackage{enumitem} \usepackage{...

11

For pdfTeX: \documentclass{report} \pagenumbering{Roman} \begin{document} \chapter{chap1} Bla bla bla \cleardoublepage % Best place at the start of the Arabic numbered pages % after \cleardoublepage and before the page number is % reset in \pagenumbering{arabic}. \pdfcatalog{% /PageLabels<<% /Nums[% % Page numbers are zero based. ...

11

What you are trying to do can be achieved but it will be difficult and frustrating. Questions tagged grid-typesetting contain many details on the matter. Long story short, (Xe)LaTeX is the wrong tool for grid typesetting: you would have to eliminate any glue and set every dimension to a multiple of the grid step. You can only do this manually, and every ...

10

This is a solution. The option hyperfootnotes is the culprit of this behavior. So, when loading beamer, pass the option hyperfootnotes=false to hyperref, in this way: \documentclass[hyperref={hyperfootnotes=false},10pt]{beamer} At this point, however, footnotes won't be printed... To avoid that, we need to add the following lines in the preamble: \...

10

Ideally, one could fix the problem using an OpenType feature file loaded at runtime through a ConTeXt typescript. In practice, that's not (yet) possible; as Hans Hagen told me the new font loaders doesn't support fea files (i have a basic parser but it's not included as i'm still not sure if it should be .. fea files assume stable fonts and so) ...

10

To get the Unicode bidirectional algorithm working correctly, you need to use babel. There are many clever things babel can now do with lualatex and right-to-left languages. Have a look through the manual. Try this (with lualatex): \documentclass[12pt,a4paper]{article} \usepackage[nil,bidi=basic-r]{babel} \babelprovide[import=ar,main]{arabic} \babelfont[...

10

This here should probably work (to really make use of the HarfBuzz Render you need either texlive 2020 or should use the lualatex-dev format): \documentclass{article} \usepackage{fontspec} \usepackage[bidi=basic]{babel} \babelprovide[import=ur,mapdigits]{urdu} \babelfont[urdu]{rm}[Renderer=HarfBuzz]{Amiri} \begin{document} My urdu test \selectlanguage{...

9

Very simple. I do it like this: \usepackage{bidi}% this should be the last package to load. \newfontfamily\Kayhan[Script=Arabic]{XB Kayhan}% for example \newenvironment{Farsi}%more human readable - other stuff can be added as well {\begin{RTL}} {\end{RTL}} Then just write farsi like this: This is an english paragraph with some \begin{Farsi}\Kayhan نوشته ...

9

You can use only one mapping file at a time; so the solution is to merge the map files. Prepare a file texarabicdigits.map containing ; TECkit mapping for TeX input conventions <-> Unicode characters LHSName "TeX-text" RHSName "UNICODE" pass(Unicode) ; ligatures from Knuth's original CMR fonts U+002D U+002D <> U+2013 ; -- -> ...

9

You have to switch to text mode: \documentclass[10pt,a4paper]{report} \usepackage{amsthm} \usepackage{amsmath} \usepackage{setspace} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{xunicode} \usepackage{xcolor} \usepackage{pifont} \usepackage{enumitem} \setmainlanguage{english} \setotherlanguage{arabic} \newfontfamily\arabicfont[Script=Arabic,...

8

You have to properly mark the parts where different scripts are used; this works, for instance: \documentclass[letterpaper, 12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T2A,LAE,T1]{fontenc} \usepackage[russian,arabic,USenglish]{babel} \begin{document} the letter \foreignlanguage{russian}{Я} is Cyrillic, whereas \foreignlanguage{arabic}{و} is ...

8

Probably your file is not saved in UTF-8 encoding. Apparently TeXshop allows you to put % !TEX encoding = UTF-8 Unicode as the first line, although since it's now the 21st Century you should probably make that the editor default. This can be done in the main preferences of TeXShop in the Source panel (Encoding). To summarize: Install polyglossia (which ...

8

The following can be improved in various ways (e.g. using tikz is probably a bit overkill and also doesn't work well in RTL mode; there should be a way to select the glyphs which gets a frame and to change the colors; glue and other nodes are currently ignored, so it works only for single words) but it shows that it is basically possible to inspect the words,...

7

The dot can be removed using the glossaries package option nopostdot. The Missing \endcsname inserted error is because you're trying to use \textarabic{...} as a label, but the label must be plain text. I don't have the required fonts installed, so I can't fully test it, but try the following: \documentclass[twocolumn]{article} \usepackage{fontspec} \...

7

No, you can’t. XeTeX processes each word in isolation and does not apply the BiDi algorithm to the whole paragraph. It is possible to use interchar classes to do very primitive BiDi processing, but it is too limited to be reliable (because the nature of BiDi handling and the fact interchar classes were not meant for such use cases). P.S. I have a Bidi ...

7

You can redefine the plain page style: \makeatletter \def\ps@plain{% \let\@mkboth\@gobbletwo \let\@oddhead\@empty \def\@oddfoot{\reset@font\hfil\lr{\arabic{page}}\hfil}% \let\@evenhead\@empty \let\@evenfoot\@oddfoot} \makeatother \pagestyle{plain} A less intimidating way is obtained with fancyhdr: \usepackage{fancyhdr} % must go before bidipoem ...

7

You just need to redefine \thepage to switch to the latin font. Based on Vafa's comment to egreg's answer, this should be done with: \renewcommand{\thepage}{\texorpdfstring{\lr{\arabic{page}}}{\arabic{page}}}

7

The below functionality is available as the manchuxetex package on GitHub. A minimal example as to demonstrate Khaled Hosny’s point of hacking Manchu/Mongolian into top-to-bottom, left-to-right: % !TEX TS-program = xelatex \documentclass{scrartcl} \usepackage{fontspec} \newfontfamily{\dcw}[]{DaicingWhite}% \begin{document} \noindent Line above\\% to ...

7

The first thing to note is that the problem really has nothing to do with TikZ. Consider \documentclass{article} \begin{document} العائلة \end{document} which produces a blank page when compiled with LuaLaTeX. This is not surprising: the default configuration supports English and uses fonts with a limited range of characters, all Latin script. To ...

7

You didn't say what you had tried, but with xelatex, this works \documentclass{article} \begin{document} Muḥammad ibn Mūsā al-Khwārizmī \end{document}

6

The \textarab command changes internally the category code of _, so that it's not any more the subscript character for math formulas, but only in the argument of \textarab. However, this change is not any more possible if the argument has already been read (in this case as argument to \place). You have two strategies available. Strategy 1 \begin{document} ...

6

I assume by “Hindi numbers” you mean eastern Arabic numerals, in this case you can use numerals=maghrib option as explained in §5.1 of pologlossia manual. You shouldn’t also be using Mapping=arabicdigits font option, as it has the exact same effect you don’t want (and Amiri does not have old style numbers yet, so that option has no effect). \setmainlanguage[...

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