\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}
\pmzerodot
方程式編號如何加?
答案1
下面的範例定義了\dotarabic
,它類似於\arabic
列印阿拉伯語形式的計數器,其中的零被 交換\pmzerodot
。
\theequation
被重新定義為使用\dotarabic
而不是\arabic
(或\arabic
可以重新定義,如果帶點的零應該由所有計數器輸出使用)。
此外,由於受到/系統的約束\pmzerodot
,因此變得穩健。脆弱命令將在內部定義期間中斷。\the<counter>
\label
\ref
\@currentlabel
完整範例:
\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}
\addtocounter{equation}{9}
\begin{empheq}{align}
\label{eq:test}
\pmzerodot + 1 = 1
\end{empheq}
\end{document}