6

I've been looking for arrow symbols that form a right angle, and 45' angles pointing to the upper-left and left of the symbol (combination of \leftarrow and \nwarrow, essentially). Generally, all combinations of the three arrows \leftarrow, \uparrow and \nwarrow.enter image description here

I tried \mathrlap...

$\mathrlap{\leftarrow}\uparrow$

but the results were less than satisfactory --the origin of the arrows should be the same point.

Any advice would be appreciated.

2
  • Please, show us an image of the arrows.
    – Sigur
    Jul 14, 2014 at 13:01
  • Since they were just symbol composition, I didn't think that was necessary. Detextify didn't return a result.
    – nlucaroni
    Jul 14, 2014 at 13:11

3 Answers 3

6

The following example uses \uparrow as base unit, because the arrow reaches from the bottom to the top of the bounding box without interfering side bearings.

Macro \@leftuparrow takes three arguments with values 0 and 1 each to denote the left, northwest, and up arrow component of the total symbol.

As the examples show, a font for the up arrow should be used, where the tip is not too broad.

\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}

Result for Computer Modern fonts:

Computer Modern (cmsy10)

Result for MnSymbol:

MnSymbol

Result for mathabx:

mathabx

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

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

\end{document}

enter image description here

1
  • So it's just about playing with the kerning to get them aligned. I guess that's what I should expect for combining symbols, thanks!
    – nlucaroni
    Jul 14, 2014 at 13:12
4
% 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}

enter image description here

1
  • 3
    If tikz is available it is easier to do \draw[<->] (-.5cm,0)--(0,0)--(0,.5cm);
    – Sigur
    Jul 14, 2014 at 13:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .