TransWikia.com

Undefined Control Sequence while using setmathdigitfont in xepersian

TeX - LaTeX Asked by Ali Kazemkhanloo on September 26, 2021

I want to use Persian numbers in the math environment in my tex document. I tried to use setmathdigitfont{} as below:

% !TEX program=xelatex

documentclass[]{article}

usepackage[localise=on,extrafootnotefeatures,displaymathdigits=default]{xepersian} 

settextfont{Tahoma}

setmathdigitfont{Tahoma}
begin{document}
فارسی
$62$
end{document}

but I get the following error:

Undefined control sequence. begin
Missing begin{document}. begin
Extra fi. begin
Undefined control sequence. begin
Extra fi. begin
Font shape `TU/Tahoma(1)/m/it' undefined(Font) using `TU/Tahoma(1)/m/n' instead
Some font shapes were not available, defaults substituted.
  • the errors refer to the line with begin{document}

** last two lines were warning, but I included just in case.
commenting out setmathdigitfont{Tahoma} will result in no error, but the numbers are English.

using setmathdigitfont{Tahoma} will compile with errors, but the resulting pdf has Persian numbers. Also, there is an extra line at the beginning of the pdf.

enter image description here

I’m using MiKTeX and all packages are up to date.

UPDATE: It is working in overleaf.com, the problem is definitely related to MiKTeX

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP