重叠箭头

重叠箭头

我一直在寻找形成直角的箭头符号,以及指向符号左上角和左方的 45 度角(本质上是\leftarrow和的组合\nwarrow)。通常,三个箭头\leftarrow\uparrow和的所有组合\nwarrow在此处输入图片描述

我尝试过 \mathrlap...

$\mathrlap{\leftarrow}\uparrow$

但结果并不令人满意——箭头的起点应该是同一点。

任何意见,将不胜感激。

答案1

下面的例子使用\uparrow作为基本单位,因为箭头从边界框的底部到达顶部而不会干扰侧轴承。

\@leftuparrow采用三个带有值的参数01每个参数表示总符号的左、西北和向上箭头组成部分。

如示例所示,应使用向上箭头的字体,且尖端不要太宽。

\documentclass{article}
\usepackage{amsmath}
%\usepackage{MnSymbol}
%\usepackage{mathabx}
\usepackage{graphicx}

\makeatletter
\newcommand*{\leftuparrow}{%
  \@leftuparrow101%
}
\newcommand*{\loweredleftarrow}{\@leftuparrow100}
\newcommand*{\leftnwarrow}{\@leftuparrow110}
\newcommand*{\leftnwuparrow}{\@leftuparrow111}
\newcommand*{\nwuparrow}{\@leftuparrow011}
\newcommand*{\@leftuparrow}[3]{%
  \mathrel{%
    \mathpalette{\@@leftuparrow{#1}{#2}{#3}}{}%
  }%
}
\newcommand*{\@@leftuparrow}[5]{%
  % #1: left
  % #2: nw
  % #3: up
  % #4: math style
  % #5: unused
  \sbox0{$#4\uparrow\m@th$}% base unit
  %
  % Correction of depth to compensate line width
  \sbox6{$#4\mkern.25mu\m@th$}%
  \dimen@=\dp0 %
  \advance\dimen@ by -\wd6 %
  \dp0=\dimen@
  %
  \sbox2{%
    \rotatebox[origin=b]{45}{\hbox to\z@{\hss\copy0\hss}}%
  }%
  \sbox4{%
    \rotatebox[origin=b]{90}{\copy0}%
  }%
  \dimen@=\z@
  \dimen6=\z@
  \ifnum#1#2>\z@ 
    \kern4\wd6 % left side bearing
  \fi
  \ifnum#1=1 % leftarrow
    \copy4 %
    \dimen@=\wd4 %
    \dimen6=\wd6 %
  \fi
  \ifnum#2=1 % nwarrow
    \ifdim\dimen@>\z@
      \llap{\copy2}%
    \else
      \copy2 %
      \dimen@=\wd2 %
      \dimen6=.7071\wd6 %
    \fi
  \fi
  \ifnum#3=1 % uparrow
    \ifdim\dimen@>\z@
      \kern-.5\wd0 %
    \fi
    {\uparrow}%
  \else
    \kern4\wd6 % right side bearing
  \fi
  \kern\dimen6 %
}
\makeatother

\begin{document}
\newcommand*{\test}{%
  \loweredleftarrow \leftnwarrow \leftnwuparrow
  \leftuparrow \nwuparrow \uparrow
}
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{.1pt}%
\begin{gather*}
  \fbox{$\leftarrow$}
  \fbox{$\uparrow$}
  \fbox{$\nwarrow$}
\\
\fbox{$\loweredleftarrow$}
\fbox{$\leftnwarrow$}
\fbox{$\leftnwuparrow$}
\fbox{$\leftuparrow$}
\fbox{$\nwuparrow$}
\\
\test\\
\scriptstyle\test\\
\scriptscriptstyle\test
\end{gather*}
\end{document}

Computer Modern 字体的结果:

计算机现代(cmsy10)

结果MnSymbol

Mn符号

结果mathabx

数学

答案2

\documentclass{article}
\usepackage{mathtools}
\begin{document}

\[  \raisebox{-1ex}{$\leftarrow$}\mathllap{\nwarrow}\mkern-10mu\uparrow \]

\end{document}

在此处输入图片描述

答案3

% arara: pdflatex

\documentclass{article}
\usepackage{tikz-cd}
\newcommand{\myArrow}[1]{\arrow[start anchor=center, end anchor=center]{#1}}
\newcommand{\nothing}{\phantom{\bullet}}

\begin{document}
\begin{tikzcd}[row sep=.5cm, column sep= .5cm]
\nothing&\nothing \\
\nothing&\nothing\myArrow{l}\myArrow{u}
\end{tikzcd}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{tikzcd}[row sep=.5cm, column sep= .5cm]
\nothing&\nothing \\
\nothing&\nothing\myArrow{ul}\myArrow{l}
\end{tikzcd}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{tikzcd}[row sep=.5cm, column sep= .5cm]
\nothing&\nothing \\
\nothing&\nothing\myArrow{ul}\myArrow{u}\myArrow{l}
\end{tikzcd}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{tikzcd}[row sep=.5cm, column sep= .5cm]
\nothing&\nothing \\
\nothing&\nothing\myArrow{ul}\myArrow{u}
\end{tikzcd}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{tikzcd}[row sep=.5cm, column sep= .5cm]
\nothing&\nothing \\
\nothing&\nothing\myArrow{l}
\end{tikzcd}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{tikzcd}[row sep=.5cm, column sep= .5cm]
\nothing&\nothing \\
\nothing&\nothing\myArrow{u}
\end{tikzcd}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{tikzcd}[row sep=.5cm, column sep= .5cm]
\nothing&\nothing \\
\nothing&\nothing\myArrow{ul}
\end{tikzcd}
\end{document}

在此处输入图片描述

相关内容