# How to type a decimal point not in a number

I'm using xepersian package and I was trying to type $0.\overline{1011}$, but I noticed that the dot after 0 is not interpreted as a decimal point (The decimal sign in Persian is something like /). How do I make it look like a decimal sign?

To illustrate the situataion, consider the code below. The first line doesn't use the overline and outputs the correct character for decimal point, but second line output a dot instead. Third line is meant to show how decimal point character is different from $/$.

\documentclass{article}
\usepackage{xepersian}

\begin{document}
$$0.1011$$
$$0.\overline{1011}$$
$$0/\overline{1011}$$
\end{document}


Here is how the output looks like:

• Welcome to TeX.SE! Have you already tried $0/\overline{1011}$, where / would be the Persian decimal symbol?
– Mico
Sep 29, 2013 at 16:29
• Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Sep 29, 2013 at 16:40
• @Mico It doesn't output the exact same character. Sep 29, 2013 at 19:05
• @egreg Sure, I added an example. Sep 29, 2013 at 19:05

I believe that xepersian sets up a mechanism similar to ligatures (probably via a map file), so that if the period is followed by a digit it is transformed in the decimal separator. With \overline it fails because this command is not a digit.

I found an undocumented feature: you can use \decimalseparator in the cases such as this, where it is not followed by a digit.

\documentclass{article}
\usepackage{amsmath}
\usepackage{xepersian}

\begin{document}
\begin{gather*}
0.1011\\
0\decimalseparator\overline{1011}
\end{gather*}
\end{document}


• You are fast! :-) I was poking around in the file xepersian-mathsdigitspec.sty, had come across a bunch of statements that look like typos (\undefied -- should probably be \undefined?), and a couple of callouts to a macro called \decimalseparator, and the following definition: \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}. Sure enough, in the Opentype spec \char"066B points to a glyph labeled "ARABIC DECIMAL SEPARATOR". I guess it's a Persian as well as an Arabic character...
– Mico
Sep 29, 2013 at 19:34
• @Mico \undefied or \undefined is the same, so long as they are both undefined. In LaTeX packages it's customary to use \@undefined. Looking in the documented code, I saw exactly the definition of \decimalseparator and tried it. ;-) Sep 29, 2013 at 19:37