0

I'm using the arabtex to write som Persian/Farsi words in Latex. When I'm trying to write two consecutive ن like نن in a word like کنند, arabtex adds shadda since it's part of its commands by default (xx for ARABIC SHADDA, reference: https://en.wikipedia.org/wiki/ArabTeX). This is the code I'm using:

\documentclass[11pt,a4paper]{article}
\usepackage{arabtex}
\begin{document}
{\setfarsi\novocalize \<rA.dy knndh >}
\end{document}

That results in:

enter image description here

While my desired output is راضی کننده. I wonder how I can get my desired output?

3 Answers 3

2

The way to go with arabtex is to use the 'pipe' character (|) which prevents the šadda from being generated, like so:—

\documentclass[11pt,a4paper]{article}
\usepackage{arabtex}
\begin{document}
{\setfarsi\novocalize \<rA.dy kn|ndh >}
\end{document}

See the documentation of arabtex on p. 20 for more information.

0

Adding an i between the characters solved my problem:

\documentclass[11pt,a4paper]{article}
\usepackage{arabtex}
\begin{document}
{\setfarsi\novocalize \<rA.dy knindh >}
\end{document}

enter image description here

0

If you can use LuaLaTeX or XeLaTeX, instead of PDFLaTeX, you can type in Unicode with whatever input method and text editor you prefer.

Here’s a template you can tweak.

\documentclass{article}
\usepackage[bidi=basic, layout=sectioning.tabular, nil]{babel}
\usepackage{unicode-math}

\defaultfontfeatures{ Scale=MatchLowercase,
                      Ligatures=TeX,
                      Renderer=HarfBuzz }

\babelfont{rm}
          [Scale=1.0]{Libertinus Serif}
\babelfont{sf}
          {Libertinus Sans}
\babelfont{tt}
          {Libertinus Mono}

\babelprovide[import=fa, main]{persian} % You can call it farsi instead, if you prefer.

\babelfont[persian]{rm}
          [Language=Default]{Amiri}
% Define \babelfont[persian]{sf} here if needed.
\babelfont[persian]{tt}
          {ALM Fixed}

\begin{document}
کنند
\end{document}
2
  • Thanks for your comment. Since I need this for an arXiv submission and arXiv apparently has an issue with babel, I had to use the arabtex instead.
    – Pedram
    Jan 1, 2021 at 6:11
  • @Pedram You might have a look at farsitex, then.
    – Davislor
    Jan 1, 2021 at 6:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .