![排版“空心斜线”](https://linux22.com/image/400335/%E6%8E%92%E7%89%88%E2%80%9C%E7%A9%BA%E5%BF%83%E6%96%9C%E7%BA%BF%E2%80%9D.png)
答案1
stmaryrd
这些符号由名称下的包定义\fat(b)slash
(\fatslash 的间距不太好):
\documentclass{article}
\usepackage{stmaryrd}
\begin{document}
\[ A\fatbslash B\qquad C \fatslash D \]
\end{document}
编辑\fatslash
:正如@AndrewSwann所建议的,我们可以使用此代码获得更好的间距:
\documentclass{article}
\usepackage{stmaryrd}
\newcommand{\myfatslash}{\mathbin{\mkern-6mu\fatslash}}
\begin{document}
\[ A\fatbslash B\qquad C\myfatslash D \]
\end{document}
答案2
您可以使用\holwd
来设置间隙。
\documentclass[12pt]{article}
\usepackage{stackengine}
\newcommand\hollowslash{\setbox0=\hbox{/}\def\holwd{3pt}%
\stackengine{-.3pt}{/}{\rlap{\kern-1pt\rule{\holwd}{.4pt}}}{O}{r}{F}{F}{S}%
\kern\dimexpr\holwd-\wd0-.2pt\relax%
\stackengine{-.4pt}{/}{\llap{\rule{\holwd}{.4pt}\kern-1pt}}{U}{l}{F}{F}{S}%
}
\newcommand\hollowbackslash{\setbox0=\hbox{\textbackslash}\def\holwd{2.8pt}%
\stackengine{-.4pt}{\textbackslash}{\rlap{\kern-1pt\rule{\holwd}{.4pt}}}{U}{r}{F}{F}{S}%
\kern\dimexpr\holwd-\wd0-.2pt\relax%
\stackengine{-.3pt}{\textbackslash}{\llap{\rule{\holwd}{.4pt}\kern-1pt}}{O}{l}{F}{F}{S}%
}
\usepackage{amsmath}
\begin{document}
$C\hollowslash(A\hollowbackslash B)$
\end{document}
如果你不介意加载graphicx
包,你可以使用\reflectbox
它来减少代码。这里将它\holwd
设置为2pt
:
\documentclass[12pt]{article}
\usepackage{stackengine}
\newcommand\hollowslash{\setbox0=\hbox{/}\def\holwd{2pt}%
\stackengine{-.3pt}{/}{\rlap{\kern-1pt\rule{\holwd}{.4pt}}}{O}{r}{F}{F}{S}%
\kern\dimexpr\holwd-\wd0-.2pt\relax%
\stackengine{-.4pt}{/}{\llap{\rule{\holwd}{.4pt}\kern-1pt}}{U}{l}{F}{F}{S}%
}
\newcommand\hollowbackslash{\reflectbox{\hollowslash}}
\usepackage{amsmath,graphicx}
\begin{document}
$C\hollowslash(A\hollowbackslash B)$
\end{document}