Skip to content
This repository has been archived by the owner on Nov 30, 2019. It is now read-only.

siunitx package is incompatible with bidi / XePersian #4

Open
1 of 5 tasks
ImanBayat opened this issue Jun 18, 2019 · 0 comments
Open
1 of 5 tasks

siunitx package is incompatible with bidi / XePersian #4

ImanBayat opened this issue Jun 18, 2019 · 0 comments
Assignees
Labels
Enhancement New feature or request

Comments

@ImanBayat
Copy link

ImanBayat commented Jun 18, 2019

Brief outline of the issue

It seems siunitx package is not compatible xepersian package. The decimal point does not change to the Persian decimal separator i.e. momayyez in \SI or \num sequences. Also \SIlist and \SIrange sequences have incorrect direction and should change words "and" and "to" into proper equivalents. Finally, xepersian package eliminates the degree symbol ° even in the latin environment.

Check/indicate

  • Relevant to the bidi package
  • The bidi package issue tracker has been searched for similar issues?
  • Issue tracker has been searched for similar issues?
  • Links to <tex.stackexchange.com> discussion if appropriate
  • Links to <qa.parsilatex.com> discussion if appropriate

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode


\documentclass{article}
\usepackage{siunitx}
%\sisetup{detect-mode}  %detect-all

\usepackage{xepersian}
\settextfont{Yas}
\setmathdigitfont{Yas}

%\usepackage{fontspec}
%\setmainfont[Script=Arabic]{Yas}
%\usepackage{bidi}

\DeclareSIUnit{\calorie}{cal}
\begin{document}
یک کالری کوچک تقریباً برابر است با $4.2$ ژول (به‌طور دقیق $4.1868$ ژول)

\[\SI{1}{\calorie} = \SI{4.1868}{\joule}\]

\SIlist{0.13;0.67;0.80}{\milli\metre}

\SIrange{0.13}{0.67}{\milli\metre}

\num{3.45d-4} 

\ang{4,5} 

\ang{1;2;3} $\ang{1;2;3}$

\begin{latin}
\[\SI{1}{\calorie} = \SI{4.1868}{\joule}\]

\SIlist{0.13;0.67;0.80}{\milli\metre}

\SIrange{0.13}{0.67}{\milli\metre}

\num{3.45d-4} 

\ang{4,5} Where is the $^{\circ}$ (degree) symbol?!

\ang{1;2;3} $\ang{1;2;3}$

\end{latin}
\end{document}

Expected behavior

Log and PDF files

siunitx.MWE.log
siunitx.MWE.pdf

@ImanBayat ImanBayat added the Bug Something isn't working label Jun 18, 2019
@user-is-inactive-forever user-is-inactive-forever added Enhancement New feature or request and removed Bug Something isn't working labels Jun 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants