# Digit zero with a dot inside also in text mode

\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{empheq}

\makeatletter
\newcommand*{\pmzerodot}{%
\nfss@text{%
\sbox0{$\vcenter{}$}% math axis
\sbox2{0}%
\sbox4{0\/}%
\ooalign{%
0\cr
\hidewidth
\kern\dimexpr\wd4-\wd2\relax % compensate for slanted fonts
\raise\dimexpr(\ht2-\dp2)/2-\ht0\relax\hbox{%
\if b\expandafter\@car\f@series\@nil\relax
\mathversion{bold}%
\fi
$\cdot\m@th$%
}%
\hidewidth
\cr
\vphantom{0}% correct depth of final symbol
}%
}%
}
\makeatother

\begin{document}
\begin{empheq}{align}
0 + 1 = 1
\end{empheq}
\end{document}


How to add \pmzerodot in equation number?

• There is always \tag*{1\panzero}\stepcounter{equation} – John Kormylo Apr 23 '15 at 21:50

The following example defines \dotarabic, which similar to \arabic prints the arabic form of a counter with the zeros exchanged by \pmzerodot. \theequation is redefined to use \dotarabic instead of \arabic (or \arabic can be redefined, if the zero with dot should be used by all counter outputs).

Furthermore \pmzerodot is made robust, because \the<counter> are subject to the \label/\ref system. Fragile commands will break during the definition of the internal \@currentlabel.

Full example:

\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{empheq}

\makeatletter
\DeclareRobustCommand*{\pmzerodot}{%
\nfss@text{%
\sbox0{$\vcenter{}$}% math axis
\sbox2{0}%
\sbox4{0\/}%
\ooalign{%
0\cr
\hidewidth
\kern\dimexpr\wd4-\wd2\relax % compensate for slanted fonts
\raise\dimexpr(\ht2-\dp2)/2-\ht0\relax\hbox{%
\if b\expandafter\@car\f@series\@nil\relax
\mathversion{bold}%
\fi
$\cdot\m@th$%
}%
\hidewidth
\cr
\vphantom{0}% correct depth of final symbol
}%
}%
}

\newcommand*{\dotarabic}[1]{%
\expandafter\@dotarabic\csname c@#1\endcsname
}
\newcommand*{\@dotarabic}[1]{%
\expandafter\dotarabic@scan\number #1\relax
}
\newcommand*{\dotarabic@scan}[1]{%
\ifx\relax#1%
\expandafter\@gobble
\else
\expandafter\@firstofone
\fi
{%
\ifnum#1=0 %
\ifincsname
0%
\else
\pmzerodot
\fi
\else
#1%
\fi
\dotarabic@scan
}%
}
\makeatother

\renewcommand*{\theequation}{\dotarabic{equation}}

\begin{document}

• Heiko Oberdiek, When all codes compiled Illegal parameter number in definition of \@currentlabel' What will I do? – Özgür Apr 23 '15 at 22:48
• @Özgür Instead of \DeclareRobustCommand*{\pmzerodot}, you can try \protected\def\pmzerodot. Then \pmzerodot` is robust by an e-TeX command. If it does not help, provide a MWE, I do not know, what you are doing. – Heiko Oberdiek Apr 24 '15 at 2:13