答案1
这是一个基于 Ti 的解决方案钾Z,并受到启发Heiko Oberdiek 的解决方案。我已定义\Implies
和\Impliedby
以方便使用,并具有正确的间距。此解决方案适用于上标/下标中使用的较小字体。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{graphs}
\usetikzlibrary{arrows.meta}
\usepackage{amsmath}
\begin{document}
\makeatletter
\newcommand*{\RightArrow}{\mathrel{\mathpalette{\@RightArrow}{}}}
\newcommand*{\LeftArrow}{\mathrel{\mathpalette{\@LeftArrow}{}}}
\newcommand*{\@RightArrow}[1]{%
% Get the line width for this math style
\edef\@LineWidth{%
\the\fontdimen8
\ifx#1\displaystyle\textfont
\else\ifx#1\textstyle\textfont
\else\ifx#1\scriptstyle\scriptfont
\else\scriptscriptfont
\fi\fi\fi
3}
\edef\@ScaleWidth{%
\ifx#1\displaystyle0.39
\else\ifx#1\textstyle0.39
\else\ifx#1\scriptstyle0.35
\else0.31
\fi\fi\fi}
\text{$\tikz
\draw[double equal sign distance, line width=\@LineWidth,
-{Implies[sep=-0.5ex] . Computer Modern Rightarrow[scale width=\@ScaleWidth, scale length=0.8]}]
(0,0) -- (1.5em,0);$}}
\newcommand*{\@LeftArrow}[1]{%
% Get the line width for this math style
\edef\@LineWidth{%
\the\fontdimen8
\ifx#1\displaystyle\textfont
\else\ifx#1\textstyle\textfont
\else\ifx#1\scriptstyle\scriptfont
\else\scriptscriptfont
\fi\fi\fi
3}
\edef\@ScaleWidth{%
\ifx#1\displaystyle0.39
\else\ifx#1\textstyle0.39
\else\ifx#1\scriptstyle0.35
\else0.31
\fi\fi\fi}
\text{$\tikz
\draw[double equal sign distance, line width=\@LineWidth,
-{Implies[sep=-0.5ex] . Computer Modern Rightarrow[scale width=\@ScaleWidth, scale length=0.8]}]
(1.5em,0) -- (0,0);$}}
\makeatother
\newcommand*{\Implies}{\DOTSB\;\RightArrow\;}
\newcommand*{\Impliedby}{\DOTSB\;\LeftArrow\;}
\[
a \implies b \qquad a \Implies b \qquad a \Impliedby b
\]
\[
x^{a \implies b} \qquad x^{a \Implies b} \qquad x^{a \Impliedby b}
\]
\[
x^{x^{a \implies b}} \qquad x^{x^{a \Implies b}} \qquad x^{x^{a \Impliedby b}}
\]
\end{document}
应该可以简化此代码,避免冗余代码,但我对 TeX 编程的熟练程度还不够。
替代解决方案
该解决方案使用相等的箭头,正如原始海报所要求的那样。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{graphs}
\usetikzlibrary{arrows.meta}
\usepackage{amsmath}
\begin{document}
\makeatletter
\newcommand*{\RightArrow}{\mathrel{\mathpalette{\@RightArrow}{}}}
\newcommand*{\LeftArrow}{\mathrel{\mathpalette{\@LeftArrow}{}}}
\newcommand*{\@RightArrow}[1]{%
% Get the line width for this math style
\edef\@LineWidth{%
\the\fontdimen8
\ifx#1\displaystyle\textfont
\else\ifx#1\textstyle\textfont
\else\ifx#1\scriptstyle\scriptfont
\else\scriptscriptfont
\fi\fi\fi
3}
\text{$\tikz
\draw[double equal sign distance, line width=\@LineWidth,
-{Implies[sep=-0.35ex] . Implies}]
(0,0) -- (1.5em,0);$}}
\newcommand*{\@LeftArrow}[1]{%
% Get the line width for this math style
\edef\@LineWidth{%
\the\fontdimen8
\ifx#1\displaystyle\textfont
\else\ifx#1\textstyle\textfont
\else\ifx#1\scriptstyle\scriptfont
\else\scriptscriptfont
\fi\fi\fi
3}
\text{$\tikz
\draw[double equal sign distance, line width=\@LineWidth,
-{Implies[sep=-0.35ex] . Implies}]
(1.5em,0) -- (0,0);$}}
\makeatother
\newcommand*{\Implies}{\DOTSB\;\RightArrow\;}
\newcommand*{\Impliedby}{\DOTSB\;\LeftArrow\;}
\[
a \implies b \qquad a \Implies b \qquad a \Impliedby b
\]
\[
x^{a \implies b} \qquad x^{a \Implies b} \qquad x^{a \Impliedby b}
\]
\[
x^{x^{a \implies b}} \qquad x^{x^{a \Implies b}} \qquad x^{x^{a \Impliedby b}}
\]
\end{document}
答案2
这里有两种解决方案,部分或全部基于 中的字形mathabx
:
\documentclass{article}
\usepackage{amssymb, mathtools}
\usepackage{graphicx}
\DeclareFontFamily{U}{matha}{\hyphenchar\font45}
\DeclareFontShape{U}{matha}{m}{n}{ <-6> matha5 <6-7> matha6 <7-8>
matha7 <8-9> matha8 <9-10> matha9 <10-12> matha10 <12-> matha12 }{}
\DeclareSymbolFont{matha}{U}{matha}{m}{n}
\DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
\DeclareFontShape{U}{mathb}{m}{n}{ <-6> matha5 <6-7> matha6 <7-8>
mathb7 <8-9> mathb8 <9-10> mathb9 <10-12> mathb10 <12-> mathba12 }{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
%
\DeclareMathSymbol{\ggcurly}{\mathrel}{mathb}{"CF}
\DeclareMathSymbol{\gcurly}{\mathrel}{mathb}{"A1}
\DeclareMathSymbol{\varRightarrow}{\mathrel}{matha}{"F1}
\DeclareMathSymbol{\varRelbar}{\mathrel}{matha}{"F9}
\newcommand\RightArrow{\mathrel{\Relbar\mkern-10.5mu\raisebox{0.05ex}{\scalebox{0.9}{$ \ggcurly $}}}}
\newcommand\varRightArrow{\mathrel{\varRightarrow\mkern-11mu\raisebox{0.06ex}{\scalebox{0.8}[0.89]{$ \gcurly $}}}}
\newcommand\LongRightArrow{\mathrel{\Relbar\mkern-2.8mu\Relbar\mkern-10.5mu\raisebox{0.05ex}{\scalebox{0.9}{$ \ggcurly $}}}}
\newcommand\varLongRightArrow{\mathrel{\varRelbar\mkern-2.8mu\varRightarrow\mkern-11mu\raisebox{0.06ex}{\scalebox{0.8}[0.89]{$ \gcurly $}}}}
\begin{document}
\begin{alignat*}{2}%
A & \RightArrow B &\qquad A & \LongRightArrow B\\
A & ⇒ B & A & \Longrightarrow B\\%
A & \varRightArrow B & A & \varLongRightArrow B\\
\end{alignat*}
\end{document}
答案3
重叠箭头:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\joinarrows}{\mathrel{\mspace{-14mu}}}
\newcommand{\Tworightarrow}{\Rightarrow\joinarrows\Rightarrow}
\newcommand{\Twoleftarrow}{\Leftarrow\joinarrows\Leftarrow}
\newcommand{\Twoleftrightarrow}{%
\Leftarrow\joinarrows\Leftarrow
\joinarrows
\Rightarrow\joinarrows\Rightarrow
}
\newcommand{\Twolongrightarrow}{\Longrightarrow\joinarrows\Rightarrow}
\newcommand{\Twolongleftarrow}{\Leftarrow\joinarrows\Longleftarrow}
\newcommand{\Twolongleftrightarrow}{%
\Leftarrow\joinarrows\Longleftarrow
\joinarrows
\Rightarrow\joinarrows\Rightarrow
}
\begin{document}
\begin{gather*}
\Tworightarrow \quad \Twoleftarrow \quad \Twoleftrightarrow \\
\Twolongrightarrow \quad \Twolongleftarrow \quad \Twolongleftrightarrow
\end{gather*}
\end{document}