![如何在 TeX 中写“带有短斜杠的零”?](https://linux22.com/image/470297/%E5%A6%82%E4%BD%95%E5%9C%A8%20TeX%20%E4%B8%AD%E5%86%99%E2%80%9C%E5%B8%A6%E6%9C%89%E7%9F%AD%E6%96%9C%E6%9D%A0%E7%9A%84%E9%9B%B6%E2%80%9D%EF%BC%9F.png)
下面的快捷方式中有类似的应用程序。但是,我想要斜线的末端将被删除。那么我们如何才能创建第四个零呢?比如\pmzerocomputer
。
谢谢。
\documentclass{article}
\makeatletter
\newcommand*{\pmzerocomputer}{%
\nfss@text{%
\sbox0{0}%
\sbox2{/}% <--Be small slash. End parts of the slash to be deleted
\sbox4{%
\raise\dimexpr((\ht0-\dp0)-(\ht2-\dp2))/2\relax\copy2 %
}%
\ooalign{%
\hfill\copy4 \hfill\cr
\hfill0\hfill\cr
}%
\vphantom{0\copy4 }% correct overall height and depth of the symbol
}%
}
\makeatother
\usepackage{amstext}% for resizing the symbol in math
\begin{document}
\pmzerocomputer
\end{document}
答案1
您可能需要调整不同字体的参数,但这是我的想法:图片模式。
\documentclass{article}
\usepackage{amsmath}
\usepackage{pict2e}
\makeatletter
\NewDocumentCommand{\pmzero}{}{\mathord{0\mathpalette\pmzero@\relax}}
\newcommand{\pmzero@}[2]{%
\llap{%
\sbox\z@{$\m@th#10$}%
\begin{picture}(\wd\z@,\ht\z@)
\linethickness{0.1\wd\z@}
\Line(0.25\wd\z@,0.1\wd\z@)(0.75\wd\z@,0.9\ht\z@)
\end{picture}%
}%
}
\makeatother
\begin{document}
$0\pmzero0$
$\scriptstyle0\pmzero0$
$\scriptscriptstyle0\pmzero0$
\end{document}