命令\rightrightarrows
(的amsfonts
) 垂直堆叠两个\to
/ \rightarrow
,是否有等效命令可以堆叠两个\mapsto
?如果没有,如何定义它以与 的定义一致\rightrightarrows
?
答案1
实际上并\mapstochar
不允许将两个字符堆叠得像\rightrightarrows
\documentclass{article}
\usepackage{amsmath} % for scalable \fontdimen8
\usepackage{amssymb} % for comparison with \rightrightarrow
\usepackage[old]{old-arrows} % for smaller arrow heads
\makeatletter
\newcommand{\mapsmapsto}{\mathpalette\@mapsmapsto\relax}
\newcommand*{\@mapsmapsto}[2]{%
\dimen@\fontdimen8
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi 3
\mathrel{%
\vcenter{%
\vbox{%
\baselineskip\z@skip
\lineskip\z@
\ialign{##\cr$#1\mapstochar\varrightarrow$\cr
\noalign{\kern\dimen@}%
$#1\mapstochar\varrightarrow$\cr}%
}%
}%
}%
}
\makeatother
\begin{document}
$A \rightrightarrows B \mapsmapsto C$
$\scriptstyle A \rightrightarrows B \mapsmapsto C$
$\scriptscriptstyle A \rightrightarrows B \mapsmapsto C$
\end{document}
评论:
- 整个
\fontdimen
内容分配给\dimen@
分数规则的厚度。使用此包,amsmath
这将根据当前的数学样式进行缩放。 - 该软件包
-old-arrows
提供了“旧式”箭头。加载此选项后,old
它不会替换标准定义,而是定义\var...
现有箭头的一个版本。
如果你不介意两个垂直笔划几乎互相接触,你可以删除整个\fontdimen
东西和包含的行\noalign
\newcommand*{\@mapsmapsto}[2]{%
\mathrel{%
\vcenter{%
\vbox{%
\baselineskip\z@skip
\lineskip\z@
\ialign{##\cr$#1\mapstochar\varrightarrow$\cr
$#1\mapstochar\varrightarrow$\cr}%
}%
}%
}%
}
获取
答案2
毕竟这就是我正在使用的。本质上,我使用 campa 的模板重新定义\tto
以保持一致性,并定义了两个符号的长版本。
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[old]{old-arrows}
\makeatletter
\renewcommand{\tto}{\mathpalette\@tto\relax}
\newcommand*{\@tto}[2]{%
\dimen@\fontdimen8
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi 3
\mathrel{%
\vcenter{%
\vbox{%
\baselineskip\z@skip
\lineskip\z@
\ialign{##\cr$#1\varrightarrow$\cr
\noalign{\kern-\dimen@}%
$#1\varrightarrow$\cr}%
}%
}%
}%
}
\makeatletter
\newcommand{\longtto}{\mathpalette\@longtto\relax}
\newcommand*{\@longtto}[2]{%
\dimen@\fontdimen8
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi 3
\mathrel{%
\vcenter{%
\vbox{%
\baselineskip\z@skip
\lineskip\z@
\ialign{##\cr$#1\varlongrightarrow$\cr
\noalign{\kern-\dimen@}%
$#1\varlongrightarrow$\cr}%
}%
}%
}%
}
\makeatletter
\newcommand{\mapstto}{\mathpalette\@mapstto\relax}
\newcommand*{\@mapstto}[2]{%
\dimen@\fontdimen8
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi 3
\mathrel{%
\vcenter{%
\vbox{%
\baselineskip\z@skip
\lineskip\z@
\ialign{##\cr$#1\mapstochar\varrightarrow$\cr
\noalign{\kern-\dimen@}%
$#1\mapstochar\varrightarrow$\cr}%
}%
}%
}%
}
\makeatletter
\newcommand{\longmapstto}{\mathpalette\@longmapstto\relax}
\newcommand*{\@longmapstto}[2]{%
\dimen@\fontdimen8
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi 3
\mathrel{%
\vcenter{%
\vbox{%
\baselineskip\z@skip
\lineskip\z@
\ialign{##\cr$#1\mapstochar\varlongrightarrow$\cr
\noalign{\kern-\dimen@}%
$#1\mapstochar\varlongrightarrow$\cr}%
}%
}%
}%
}