1

How would I "implement" a glyph such as the following:

enter image description here

to signifty "out", so that I would be able to use it as part of my text without pdftex balking at me?

Specifically, do I need to study the dark voodoo of tikz, or can I make it simpler somehow? Perhaps by combining+stretching a circle and an arrow?

  • “What glyph” is off topic. How to implement a particular symbol is on topic. – egreg Aug 18 '17 at 21:24
  • @egreg: Edited. – einpoklum - reinstate Monica Aug 18 '17 at 21:27
6

A solution with TikZ, the measurements are taken as pixels and scaled to the height of an uppercase letter:

\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\DeclareRobustCommand*{\circrarr}{%
  \begingroup
    \sbox0{H}%
    \resizebox{!}{\the\ht0}{%
      \begin{tikzpicture}[
        line width=41pt,
        >={Triangle[length=86pt, width=228pt]},
      ]
        \draw (0, 0) circle[radius=170pt];
        \draw[->] (0, 0) -- ++(347pt, 0);
      \end{tikzpicture}%
    }%
  \endgroup
}

\begin{document}
\sffamily A\circrarr B
\end{document}

Result

Refinements:

  • Left and right side bearings
  • Some support for italics/slanted.
  • Some support for bold.

Example:

\documentclass{article}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\makeatletter
\newcommand*{\ItalicAngle}{77}
\DeclareRobustCommand*{\circrarr}{%
  \begingroup
    \sbox0{H}%
    \resizebox{!}{\the\ht0}{%      
      % Italics support
      \let\ItalicShape=N
      \edef\sldefault{\sldefault}%
      \edef\itdefault{\itdefault}%
      \edef\f@shape{\f@shape}%
      \ifx\f@shape\sldefault
        \let\ItalicShape=Y
      \fi
      \ifx\f@shape\itdefault
        \let\ItalicShape=Y
      \fi
      \ifx\ItalicShape Y
        \tikzset{italic/.style={
          transform canvas={xslant=1/tan(\ItalicAngle)}%
        }}%
      \else
        \tikzset{italic/.style={}}%
      \fi
      % Bold support
      \edef\f@series{\f@series}%
      \if b\expandafter\@car\f@series X\@nil
        \def\LineWidth{70pt}%
        \def\TriangleLength{106pt}%
        \def\TriangleWidth{240pt}%
      \else
        \def\LineWidth{41pt}%
        \def\TriangleLength{86pt}%
        \def\TriangleWidth{228pt}%
      \fi
      \begin{tikzpicture}[
        line width=\LineWidth,
        >={Triangle[length=\TriangleLength, width=\TriangleWidth]},
      ]
        \begin{scope}[italic]
          \draw (0, 0) circle[radius=170pt];
          \draw[->] (0, 0) -- ++(306pt + \LineWidth, 0);
        \end{scope}
        \ifx\ItalicShape Y
          \path
            (-170pt - 20.5pt, -170pt - 20.5pt)
            (306pt + \LineWidth, 170pt + 20.5pt)
          ;  
        \fi
        \path % side bearings
          (current bounding box.west) ++(-50pt, 0)
          (current bounding box.east) ++(20pt, 0)
        ;
      \end{tikzpicture}%
    }%
  \endgroup
}
\makeatother

\begin{document}
\sffamily A\circrarr B

{\slshape A\circrarr B}

{\itshape A\circrarr B}

{\bfseries A\circrarr B}

{\bfseries\itshape A\circrarr B}
\end{document}

Result

  • So what would happen if I... 1. Use \textbf, \textit etc? 2. Try to put that in a section header (and hence in the TOC)? – einpoklum - reinstate Monica Aug 18 '17 at 22:20
  • 2
    @einpoklum As usual \protect lets fragile commands survive in the section headers. Or the command can be defined with \DeclareRobustCommand. – Heiko Oberdiek Aug 18 '17 at 22:23
  • Also, I think I'll be changing the dimensions as follows: Triangle length 150pt, rightwards line length 400pt. The arrow looks "smashed" in the image I provided. Probably it makes sense for the circle not to be placed so as to have the same vertical dimensions of a full capital letter; but I wonder if it should be more like \circ or more like \oplus. – einpoklum - reinstate Monica Aug 18 '17 at 23:20
  • @einpoklum Feel free to experiment (there is \raisebox for shifting vertically, \vcenter to center around the math axis, ...). – Heiko Oberdiek Aug 18 '17 at 23:31
6

Wouldn't these icons from fontawesome be OK? Or you can make your own signs with pstricks:

\documentclass[svgnames]{article}
\usepackage[utf8]{inputenc}
\usepackage{fontawesome}

\usepackage{pstricks, pst-arrow}
\usepackage{auto-pst-pdf}
\newcommand\ArrowIn{\begin{pspicture}\psset{linejoin =1, fillstyle=solid,, opacity=0.4 }
\pscircle[linewidth=2pt]{0.8ex}\psBigArrow[ fillcolor=Tomato!30, linecolor=Tomato, doublesep=0.3ex](0.75em,-0.1ex)(0,-0.1ex)
\end{pspicture}}
\newcommand\ArrowOut{\begin{pspicture}\psset{linejoin =1, fillstyle=solid,, opacity=0.4 }
\pscircle[linewidth=2pt]{0.8ex}\psBigArrow[ fillcolor=RoyalBlue!30, linecolor=RoyalBlue, doublesep=0.3ex](0,0.1ex)(0.75em,0.1ex)
\end{pspicture}}

\begin{document}

\Huge A \faSignIn \,\,B\,\,\faSignOut \,\,C

A\ArrowOut B\ArrowIn C

\end{document} 

enter image description here

  • Huh. Hmm. Hmph. That's not so bad. I mean, they don't "scream" the message as well as the image I linked to but it might do. So +1 but not accept. Another deficiency of these is that the arrows don't like the stroke of a font, but like the blot of a stamp. – einpoklum - reinstate Monica Aug 18 '17 at 22:17
  • @einpoklum, You cut me to the quickk. I've added a more ‘screaming’ pstricks solution. – Bernard Aug 18 '17 at 23:21
  • My dear Bernard... this question asks for a glyph, not a neon sign :-) – einpoklum - reinstate Monica Aug 18 '17 at 23:30
  • You always can remove colouring; or use another shade of gray. – Bernard Aug 19 '17 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.