Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\setdigitfont doesn't work! #17

Closed
javadr opened this issue Jul 22, 2020 · 9 comments · May be fixed by #19
Closed

\setdigitfont doesn't work! #17

javadr opened this issue Jul 22, 2020 · 9 comments · May be fixed by #19

Comments

@javadr
Copy link

javadr commented Jul 22, 2020

After updating to the latest version of TeXLive [Version 3.14159265-2.6-0.999992 (TeX Live 2020) (preloaded format=xelatex 2020.7.22)], \setdigitfont and its family doesn't work resulting in an error like below:

! Undefined control sequence.
\__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ...
                                                  \l_fontspec_font "#1\scan_...

MWE:

\documentclass{article}

\usepackage{xepersian}
\settextfont{Yas}
\setdigitfont{Yas}

\begin{document}
سلام این یک متن آزمایشی با عدد ۰۱۲۳۴۵۶۷۸۹ است. 
\end{document}
@hadisfr
Copy link

hadisfr commented Aug 4, 2020

Issue reproduced and confirmed.

Also with \setmathdigitfont.

@ghost
Copy link

ghost commented Aug 5, 2020

You can also use the command:


\ExplSyntaxOn \cs_set_eq:NN \etex_iffontchar:D \tex_iffontchar:D \ExplSyntaxOff

before calling \setdigitfont to temporarily fix the issue.

@majid-vaghari
Copy link

You can also use the command:


\ExplSyntaxOn \cs_set_eq:NN \etex_iffontchar:D \tex_iffontchar:D \ExplSyntaxOff

before calling \setdigitfont to temporarily fix the issue.

This does seem to fix this problem but another problem was encountered; when using \mathbf (for vectors) this error occured:

Undefined control sequence.
<argument> \LaTeX3 error:
                           Use 1 not \c_one deprecated on 2020-01-01.

@bahman-mirzakhani
Copy link

bahman-mirzakhani commented Oct 16, 2020

@majid-vaghari

You can use these codes before \setmathdigitfont or \setdigitfont:

\ExplSyntaxOn
\cs_set_eq:NN
\etex_iffontchar:D
\tex_iffontchar:D
\cs_undefine:N \c_one
\int_const:Nn \c_one { 1 }
\ExplSyntaxOff
\setmathdigitfont or \setdigitfont

This link is used for fix your problem.

@majid-vaghari
Copy link

@majid-vaghari
You can use these codes before setmathdigitfont or setdigitfont

\ExplSyntaxOn
\cs_set_eq:NN
\etex_iffontchar:D
\tex_iffontchar:D
\cs_undefine:N \c_one
\int_const:Nn \c_one { 1 } 
\ExplSyntaxOff

I used this

Thank you, @bahman-mirzakhani. It worked!

@majid-vaghari
Copy link

I created a Gist so you can copy and paste in your project and import instead of importing XePersian:
XePersian Fix
Hope it helps.

@bahman-mirzakhani bahman-mirzakhani mentioned this issue Dec 31, 2021
5 tasks
javadr added a commit to javadr/unistyle that referenced this issue Jan 21, 2022
@vafa-khalighi
Copy link

I sincerely apologize for being very slow and get to this issue quite late.
I have uploaded version 23.2 of the xepersian package to CTAN which fixes this issue. You can see the Release Announcement. Please test the new version against this issue; if it indeed fixes the issue, then please close this issue and if it does not, then please let me know what needs to be done so that I can fix it.

Please also note that I had to move the GitHub repository to a new place. The new repository can be found here. If you have reported any issues in the old repository, there is no need to re-report it in the new one but for the new issues, please kindly use the new repository.

There is also a Discussions section on the new repository which you can use to ask questions that need my attention. The announcements for future versions of the xepersian package also will appear in Discussions under Announcements.

Finally, if you ever need to contact me directly, you can find my email address in the PDF documentation on the second title page.

@javadr
Copy link
Author

javadr commented Feb 4, 2022

Solved.
See tex-persian/xepersian#1

@javadr javadr closed this as completed Feb 4, 2022
@t1360
Copy link

t1360 commented May 31, 2022

thank you it was really useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants