一致的自定义相等和子集符号

一致的自定义相等和子集符号

我想制作一些符号并附有以下描述:

  • 子集(或者更确切地说\subseteq)符号,其中的额外线被“向前”箭头取代。
  • 带有“向后”箭头的类似符号。
  • 等号的下线被向前或向后的箭头取代。

浏览符号列表,我遇到了stix以下符号:

  • \subrarr(以及相关的\suplarr),它们看起来正是我想要的子集符号,但没有反向箭头变体
  • \dashleftharpoon\dashrightharpoon,(或者实际上是\barleftharpoon变体),但由于我想要的符号与极限有关,所以这些不是我想要的。

我尝试用盒子自己做

\newcommand\subsetlim{\makebox[2\width]{\raisebox{0.5ex}{\scalebox{0.65}
    {$\underleftarrow{\scalebox{1.5}{\makebox[0.95\width][r]{$\subset$}}}$}}}}
\newcommand\subsetcolim{\makebox[2\width]{\raisebox{0.5ex}{\scalebox{0.65}
    {$\underrightarrow{\scalebox{1.5}{\makebox[0.95\width][r]{$\subset$}}}$}}}}
\newcommand\eqlim{\makebox[2\width]{\raisebox{0.6ex}{\scalebox{0.5}
    {$\underleftarrow{\scalebox{2}{\makebox[\width][c]{\---}}}$}}}}

但是,为了使箭头很好地对齐,必须进行重新缩放,这会导致第一种情况下的线条粗细有所不同,而第二种情况下似乎不可避免地会出现一个很大的难看的间隙,无论我使用什么符号表示破折号。

我已经看到了 pgf 命令中给出的类似问题的解决方案,这很好,但我还没有遇到解决此类问题的权威指南;我根据 LaTeX WikiBooks 中的基本“盒子”信息提出了解决方案,但我认为这是不够的(尤其是考虑到是他们的页面\hbox,我在许多自定义排版结构中看到它被广泛使用)。

一旦我构建了符号,我如何确保周围的间距是正确的(我知道\mathop\mathbin等命令,但这些命令首先依赖于符号框的大小完全正确),或者线宽与周围的文本/符号一致?

答案1

使用堆栈,但在这种情况下,我只在底层符号上方放置一个缩放的黑色三角形。如下所示,我的第一个 MWE 不适用于较小的数学样式。如果需要,请参阅我的第二个 MWE。

\subseteq这些符号被设计为与其底层词根(即和/或)占据相同的水平空间=

\documentclass{article}
\usepackage{amssymb,stackengine,graphicx}
\stackMath
\newcommand\frightarrow{\scalebox{.4}[.3]{$\blacktriangleright$}}
\newcommand\fleftarrow{\scalebox{.4}[.3]{$\blacktriangleleft$}}
\newcommand\subsetrleads{\mathrel{%
  \stackengine{-1pt}{\subseteq}{\frightarrow}{U}{r}{F}{T}{S}}}
\newcommand\eqrleads{\mathrel{%
  \stackengine{-2.4pt}{=}{\frightarrow}{U}{r}{F}{T}{S}}}
\newcommand\subsetlleads{\mathrel{%
  \stackengine{-1pt}{\subseteq}{\fleftarrow}{U}{l}{F}{T}{S}}}
\newcommand\eqlleads{\mathrel{%
  \stackengine{-2.4pt}{=}{\fleftarrow}{U}{l}{F}{T}{S}}}
\begin{document}
$A \subseteq B\subsetrleads C$

$A = B\eqrleads C$

$A \subseteq B\subsetlleads C$

$A = B\eqlleads C$
\end{document}

在此处输入图片描述

这是一个适用于各种数学风格的版本:

\documentclass{article}
\usepackage{amssymb,stackengine,graphicx,scalerel}
\stackMath
\newcommand\frightarrow{\scalebox{.4}[.3]{$\SavedStyle\blacktriangleright$}}
\newcommand\fleftarrow{\scalebox{.4}[.3]{$\SavedStyle\blacktriangleleft$}}
\newcommand\subsetrleads{\mathrel{\ThisStyle{%
  \stackengine{\dimexpr-.7\LMpt-.3pt}{\SavedStyle\subseteq}{\frightarrow}{U}{r}{F}{T}{S}}}}
\newcommand\eqrleads{\mathrel{\ThisStyle{%
  \stackengine{\dimexpr-2.45\LMpt+0.05pt}{\SavedStyle=}{\frightarrow}{U}{r}{F}{T}{S}}}}
\newcommand\subsetlleads{\mathrel{\ThisStyle{%
  \stackengine{\dimexpr-.7\LMpt-.3pt}{\SavedStyle\subseteq}{\fleftarrow}{U}{l}{F}{T}{S}}}}
\newcommand\eqlleads{\mathrel{\ThisStyle{%
  \stackengine{\dimexpr-2.45\LMpt+0.05pt}{\SavedStyle=}{\fleftarrow}{U}{l}{F}{T}{S}}}}
\begin{document}
$A \subseteq B\subsetrleads C$

$A = B\eqrleads C$

$A \subseteq B\subsetlleads C$

$A = B\eqlleads C$

$\scriptstyle A \subseteq B\subsetrleads C$

$\scriptstyle A = B\eqrleads C$

$\scriptscriptstyle A \subseteq B\subsetlleads C$

$\scriptscriptstyle A = B\eqlleads C$
\end{document}

在此处输入图片描述

附录

根据 OP 的后续内容,这里是固定样式版本的一个版本,其中箭头完全符合水平笔划的末端,而不是延伸到它之外。它通过剪掉黑色三角形的尖端并使用底层笔划的圆端作为箭头尖端来实现这一点。

\documentclass{article}
\usepackage{amssymb,stackengine,graphicx,trimclip}
\stackMath
\newcommand\frightarrow{\scalebox{.4}[.3]{%
  \clipbox{0pt 0pt 2pt 0pt}{$\blacktriangleright$}\kern1.8pt}}
\newcommand\fleftarrow{\scalebox{.4}[.3]{%
  \kern1.8pt\clipbox{2pt 0pt 0pt 0pt}{$\blacktriangleleft$}}}
\newcommand\subsetrleads{\mathrel{%
  \stackengine{-1.1pt}{\subseteq}{\frightarrow\kern.3pt}{U}{r}{F}{T}{S}}}
\newcommand\eqrleads{\mathrel{%
  \stackengine{-2.43pt}{=}{\frightarrow}{U}{r}{F}{T}{S}}}
\newcommand\subsetlleads{\mathrel{%
  \stackengine{-1.1pt}{\subseteq}{\kern.4pt\fleftarrow}{U}{l}{F}{T}{S}}}
\newcommand\eqlleads{\mathrel{%
  \stackengine{-2.43pt}{=}{\fleftarrow}{U}{l}{F}{T}{S}}}
\begin{document}
$A \subseteq B\subsetrleads C$

$A = B\eqrleads C$

$A \subseteq B\subsetlleads C$

$A = B\eqlleads C$
\end{document}

在此处输入图片描述

相关内容