已填充 \fatbslash?

已填充 \fatbslash?

我使用 stmaryrd 包来获取 $\fatbslash$。有什么高效且稳定的方法可以填充符号内的空白区域,使其均匀呈黑色?

答案1

角度不如 中那么圆\fatbslash,但尺寸几乎相同。

\documentclass{article}
\usepackage{amsmath}
\usepackage{stmaryrd}
\usepackage{l3draw}
\usepackage{color}

\ExplSyntaxOn
\NewDocumentCommand{\filledbslash}{}
 {
  \mathbin
   {
    \mspace{1mu}
    \mathpalette \sapiens_filledbslash:nn \scan_stop:
    \mspace{1mu}
   }
 }

\box_new:N \l_sapiens_filledbslash_box

\cs_new_protected:Nn \sapiens_filledbslash:nn
 {
  \hbox_set:Nn \l_tmpa_box { \use:c {m@th} $#1\mkern-1mu\fatbslash\mkern-1mu$ }
  \dim_set:Nn \l_tmpa_dim { \box_ht:N \l_tmpa_box + \box_dp:N \l_tmpa_box }
  \dim_set:Nn \l_tmpb_dim { \box_wd:N \l_tmpa_box }
  \hbox_set:Nn \l_sapiens_filledbslash_box
   {
    \draw_begin:
    \draw_join_round:
    \draw_path_moveto:n { 0pt , \l_tmpa_dim }
    \draw_path_lineto:n { 0.43\l_tmpb_dim , \l_tmpa_dim }
    \draw_path_lineto:n { \l_tmpb_dim, 0pt }
    \draw_path_lineto:n { 0.57\l_tmpb_dim, 0pt }
    \draw_path_close:
    \draw_path_use_clear:n { fill }
    \draw_end:
   }
  \box_move_down:nn { \box_dp:N \l_tmpa_box } { \box_use:N \l_sapiens_filledbslash_box }
 }

\ExplSyntaxOff


\begin{document}

$a\fatbslash b$

$a\filledbslash b$

\fboxsep=-0.1pt \fboxrule=0.1pt

\fbox{$\mkern-1mu\fatbslash\mkern-1mu$}

\fbox{$\fatbslash$}

\fbox{$\filledbslash$}

{\ooalign{\color{red}$\fatbslash$\cr$\filledbslash$\cr}}

{\ooalign{$\filledbslash$\cr\color{red}$\fatbslash$\cr}}

{\ooalign{$\scriptstyle\filledbslash$\cr\color{red}$\scriptstyle\fatbslash$\cr}}

{\ooalign{$\scriptscriptstyle\filledbslash$\cr\color{red}$\scriptscriptstyle\fatbslash$\cr}}

\end{document}

在此处输入图片描述

相关内容