0

There is a similar application in the shortcuts below. However, I want the end parts of the slash to be deleted. So how can we create the fourth zero? Like \pmzerocomputer .

Thank you.

\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}

enter image description here

Related1: Inserting slashed zero in non-OpenType supporting LaTeX

Related2: How to write "computer zero" (with slanted vertical line) in TeX?

Özgür
  • 3,270
  • Are you willing and able to use LuaLaTeX or XeLaTeX, or do you have to use use pdfLaTeX to compile your document? – Mico Oct 24 '23 at 14:28
  • @Mico, I'm not willing to use LuaLaTeX or XeLaTeX. I'm using pdfLaTeX to compile my document. – Özgür Oct 24 '23 at 15:07

1 Answers1

4

You may need to tweak the parameters for different fonts, but here's my idea: picture mode.

\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}

enter image description here

egreg
  • 1,121,712