5

I'm looking for a symbol like this enter image description here

2
  • 2
    Welcome! Do you have a source for the symbol? Not just out of curiosity: examples of usage may be important for inclusion in Unicode.
    – egreg
    Apr 10, 2019 at 21:29
  • This symbol should be a system that processes an input signal u(t) and produces an output signal v(t). What I would like to write is: v (t) -> SquareSymbol-> u (t).
    – Ildubbio
    Apr 10, 2019 at 21:47

2 Answers 2

10

The only problem was finding a suitably small square symbol, which can be found in mathabx and imported.

A few tricks can make for defining also the corresponding left arrow avoiding code duplication. The square is positioned so that the distance from the arrow end to it is half than the distance to the arrow tip; this is of course reversed for the left arrow. You can vary this choice by changing {1}{2} into, say {1.5}{2.5} or whatever you think fit.

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{marvosym}

\DeclareFontFamily{U}{mathb}{}
\DeclareFontShape{U}{mathb}{m}{n}{
  <-5.5> mathb5
  <5.5-6.5> mathb6
  <6.5-7.5> mathb7
  <7.5-8.5> mathb8
  <8.5-9.5> mathb9
  <9.5-11> mathb10
  <11-> mathb12
}{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
\DeclareMathSymbol{\abxsmallsquare}{2}{mathb}{"05}

\makeatletter
\DeclareRobustCommand{\sqrightarrow}{%
  \mathrel{\mathpalette\sq@arrow{{1}{2}\rightarrow}}%
}
\DeclareRobustCommand{\sqleftarrow}{%
  \mathrel{\mathpalette\sq@arrow{{2}{1}\leftarrow}}%
}
\newcommand{\sq@arrow}[2]{\sq@@arrow#1#2}
\newcommand{\sq@@arrow}[4]{%
  \ooalign{%
    \hskip 0pt plus #2fil
    $\m@th#1\abxsmallsquare$%
    \hskip 0pt plus #3fil\cr
    $\m@th#1#4$\cr}%
}
\makeatother

\begin{document}

$a\sqrightarrow b \sqleftarrow c$

$\scriptstyle a\sqrightarrow b \sqleftarrow c$

$\scriptscriptstyle a\sqrightarrow b \sqleftarrow c$

\end{document}

enter image description here

8

Two variant solution based on the stackinset command from stackengine and relsize or rotating:

\documentclass[border = 2pt]{standalone}

\usepackage{stackengine} %
\usepackage{amssymb, relsize, rotating}
\usepackage{old-arrows} 
\newcommand\sqarrow{\stackMath\mathrel{\stackinset{c}{0ex}{c}{0.14ex}{\mathsmaller{\mathsmaller{\Box}}}{ ―――→ }}}
\newcommand\varsqarrow{\stackMath\mathrel{\stackinset{c}{0ex}{c}{0.12ex}{\rotatebox{45}{$ \diamond $}}{ ―――→ }}}
\begin{document}

 $ A \sqarrow B$ \quad

$ A \varsqarrow B$

\end{document} 

enter image description here

1
  • @egreg: Probably a freudian slip… Actually I thought \mathrel. I'll fix that in a second. Thank you for pointing it!
    – Bernard
    Apr 10, 2019 at 22:29

You must log in to answer this question.

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