如何使用 \leftrightarrows

如何使用 \leftrightarrows

谁能告诉我如何使用\leftrightarrows

此外,如果我在其上方和下方插入文本该怎么办?谢谢。

答案1

如果您想要放置在上方和下方的文本很短,则以下是一种使用方法:

示例输出

\documentclass{article}

\usepackage{stackrel,amssymb}

\begin{document}

\( V \stackrel[\beta]{\alpha}{\leftrightarrows} W \)

\end{document}

只需稍加努力,就可以制作出这些箭头的更长 ( \longleftrightarrows) 和可扩展 ( ) 的版本:\xleftrightarrows

第二个示例输出

\documentclass{article}

\usepackage{stackrel,amssymb,amsmath}

\newcommand{\leftrarrows}{\mathrel{\raise.75ex\hbox{\oalign{%
  $\scriptstyle\leftarrow$\cr
  \vrule width0pt height.5ex$\hfil\scriptstyle\relbar$\cr}}}}
\newcommand{\lrightarrows}{\mathrel{\raise.75ex\hbox{\oalign{%
  $\scriptstyle\relbar$\hfil\cr
  $\scriptstyle\vrule width0pt height.5ex\smash\rightarrow$\cr}}}}
\newcommand{\Rrelbar}{\mathrel{\raise.75ex\hbox{\oalign{%
  $\scriptstyle\relbar$\cr
  \vrule width0pt height.5ex$\scriptstyle\relbar$}}}}
\newcommand{\longleftrightarrows}{\leftrarrows\joinrel\Rrelbar\joinrel\lrightarrows}

\makeatletter
\def\leftrightarrowsfill@{\arrowfill@\leftrarrows\Rrelbar\lrightarrows}
\newcommand{\xleftrightarrows}[2][]{\ext@arrow 3399\leftrightarrowsfill@{#1}{#2}}
\makeatother


\begin{document}

\( U \stackrel[\beta]{\alpha} \leftrightarrows V
\xleftrightarrows[\text{description under}]{\text{long text}} W
\stackrel[\beta]{\alpha}\longleftrightarrows X \)

\end{document}

该技术是定义三个部分\leftrarrows\Rrelbar和 ,\lrightarrows分别表示双箭头的左、中、右部分。对于\longleftrightarrows我们只需将这三个部分用 连接在一起\joinrel;对于\xleftrightarrows我们根据需要重复\Rrelbar多次以获得所需的宽度,使用包提供的低级技术amsmath

要对“右左”箭头执行相同操作,您可以使用

右左示例

\documentclass{article}

\usepackage{stackrel,amssymb,amsmath}

\newcommand{\rleftarrows}{\mathrel{\raise.75ex\hbox{\oalign{%
  $\hfil\scriptstyle\relbar$\cr
  \vrule width0pt height.5ex$\scriptstyle\smash\leftarrow$\cr}}}}
\newcommand{\rightlarrows}{\mathrel{\raise.75ex\hbox{\oalign{%
  $\scriptstyle\rightarrow$\hfil\cr
  $\scriptstyle\vrule width0pt height.5ex\relbar$\cr}}}}
\newcommand{\Rrelbar}{\mathrel{\raise.75ex\hbox{\oalign{%
  $\scriptstyle\relbar$\cr
  \vrule width0pt height.5ex$\scriptstyle\relbar$}}}}
\newcommand{\longrightleftarrows}{\rleftarrows\joinrel\Rrelbar\joinrel\rightlarrows}

\makeatletter
\def\rightleftarrowsfill@{\arrowfill@\rleftarrows\Rrelbar\rightlarrows}
\newcommand{\xrightleftarrows}[2][]{\ext@arrow 3399\rightleftarrowsfill@{#1}{#2}}
\makeatother


\begin{document}

\( U \stackrel[\beta]{\alpha} \rightleftarrows V
\xrightleftarrows[\text{description under}]{\text{long text}} W
\stackrel[\beta]{\alpha}\longrightleftarrows X \)

\end{document}

相关内容