我从这里得到了以下 MWE我如何获得填充黑色的 < 和 \leq?。我怎样才能在符号上画一条垂直且适当粗的负线?
\documentclass{article}
\usepackage{amssymb}
\newcommand{\bleq}{\mathrel{\mathpalette\bleqinn\relax}}%blacklessequal
\newcommand{\bleqinn}[2]{%
\ooalign{%
\raisebox{.14ex}{$#1\blacktriangleleft$}\cr
$#1\leq$\cr
}%
}
\begin{document}
\(\bleq\)
\end{document}
答案1
有一些改进(并不是说它们通常很重要,因为很少将其\mathsurround
设置为非零值,但是……)。
\documentclass{article}
\usepackage{amssymb}
\makeatletter
\newcommand{\bleq}{\mathrel{\mathpalette\bleq@\relax}}%blacklessequal
\newcommand{\bleq@}[2]{%
\ooalign{%
\raisebox{.14ex}{$\m@th#1\blacktriangleleft$}\cr
$\m@th#1\leq$\cr
}%
}
\newcommand{\bleqbar}{\mathrel{\mathpalette\bleqbar@\relax}}%blacklessequal + bar
\newcommand{\bleqbar@}[2]{%
\vphantom{|}%
\ooalign{%
\hidewidth$\m@th#1|$\hidewidth\cr
\raisebox{.14ex}{$#1\blacktriangleleft$}\cr
$\m@th#1\leq$\cr
}%
}
\makeatother
\begin{document}
\(A \bleq B \bleqbar C\)
\end{document}
该条刚被添加到叠加的符号中。
如果您想将栏向右移动,请尝试以下操作:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\makeatletter
\newcommand{\bleq}{\mathrel{\mathpalette\bleq@\relax}}%blacklessequal
\newcommand{\bleq@}[2]{%
\ooalign{%
\raisebox{.14ex}{$\m@th#1\blacktriangleleft$}\cr
$\m@th#1\leq$\cr
}%
}
\newcommand{\bleqbar}{\mathrel{\mathpalette\bleqbar@\relax}}%blacklessequal + bar
\newcommand{\bleqbar@}[2]{%
\vphantom{|}%
\ooalign{%
\hidewidth$\m@th#1\bleqbarshift|$\hidewidth\cr
\raisebox{.14ex}{$#1\blacktriangleleft$}\cr
$\m@th#1\leq$\cr
}%
}
\newcommand{\bleqbarshift}{\mspace{0mu}}% no shift
\makeatother
\begin{document}
\(A \bleq B \bleqbar C\)
\renewcommand{\bleqbarshift}{\mspace{0.5mu}}
\(A \bleq B \bleqbar C\)
\renewcommand{\bleqbarshift}{\mspace{1mu}}
\(A \bleq B \bleqbar C\)
\renewcommand{\bleqbarshift}{\mspace{1.5mu}}
\(A \bleq B \bleqbar C\)
\renewcommand{\bleqbarshift}{\mspace{2mu}}
\(A \bleq B \bleqbar C\)
\renewcommand{\bleqbarshift}{\mspace{2.5mu}}
\(A \bleq B \bleqbar C\)
\end{document}
当您找到适合您口味的转变时,将的定义更改\bleqbarshift
为所需的值。
答案2
像这样?我没有将\mid
字符设置为非常粗细,否则它会隐藏符号\blacktriangleleft
。这是字符 \mid 的位移和粗细:\scalebox{2.6}[1.1]{$\mid$}
\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}%%%%% added
\newcommand{\bleq}{\mathrel{\mathpalette\bleqinn\relax}}%blacklessequal
\newcommand{\bleqinn}[2]{%
\ooalign{%
\raisebox{.14ex}{$#1\blacktriangleleft\mkern -18mu \scalebox{2.6}[1.1]{$\mid$}$}\cr
$#1\leq$\cr
}%
}
\begin{document}
\(\bleq\)
\end{document}
减少粘性:
\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}
\newcommand{\bleq}{\mathrel{\mathpalette\bleqinn\relax}}%blacklessequal
\newcommand{\bleqinn}[2]{%
\ooalign{%
\raisebox{.14ex}{$#1\blacktriangleleft\mkern -17mu \scalebox{2}[1.1]{$\mid$}$}\cr
$#1\leq$\cr
}%
}
\begin{document}
\(\bleq\)
\end{document}