2

I mean like in English such as in V_s

 \documentclass{article}
 \usepackage{circuitikz}
 \begin{document}
 \begin{circuitikz}[american]
 \draw (0,0) to[V,v=$V_s$,invert] (0,2);
 \end{circuitikz}
 \end{document}

I mean the letter and the subscript of it are both in Arabic.

Ali
  • 195
  • 1
    Is your question somehow speicifc to circuittikz, or why is it included in your MWE? – sheß Mar 28 '19 at 15:32
  • No, it is general not limited to this example. – Ali Mar 28 '19 at 16:20
  • 1
    Something to keep in mind: Khaled Hosny’s Libertinus family includes Libertinus Math (which covers Arabic mathematical symbols), and complements his Amiri font well. – Davislor Mar 28 '19 at 21:17

1 Answers1

3

I think you have two problems there

  1. the need to type in two scripts at once, which is not really a problem with XeLaTeX
  2. the need to typeset a math-version of the arabic font, which can be circumvented by simply using amsmath's \text{}.

\documentclass{article}
\usepackage{circuitikz}
\usepackage{amsmath}
\usepackage{polyglossia}
%pick a font that has knows arabic
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Times New Roman}
\def\matharabic#1{\ensuremath{\text{\begin{Arabic}#1‎\end{Arabic}}}}
 \begin{document}
 \begin{circuitikz}[american]
 \draw (0,0) to[V,v=${}_\matharabic{عَفْواً}\matharabic{شُكْراً}_\matharabic{عَفْواً}$,invert] (0,2);
 \end{circuitikz}
 \end{document}

enter image description here

sheß
  • 3,622