7
\documentclass{memoir}

\usepackage{pgfcore}
\usepackage{pgfplots}
\usetikzlibrary{arrows, arrows.meta}

\begin{document}
\resizebox{\linewidth}{!}{
  \begin{tikzpicture}[>=stealth']
  \foreach \arrowa [count=\i from 1] in {stealth, Stealth, {Stealth[round]}, >} {
    \path (0.0, {-0.3 * \i}) edge [-\arrowa] (1.0, {-0.3 * \i});
  }
\end{tikzpicture}
}
\end{document}

How do you make stealth' using the new arrows.meta library?

enter image description here

  • round is not round enough for you? – Qrrbrbirlbel Dec 17 '13 at 14:15
  • @Qrrbrbirlbel: It is good enough :) The stealth' sure looks good though, don't you think? – Neil G Dec 17 '13 at 14:21
  • 1
    Cannot one just copy the definition \pgfarrowsdeclare{stealth'}{stealth'}... from pgflibraryarrows.code.tex? There are nothing but Bézier curves. – Symbol 1 Mar 2 '15 at 10:08
  • @Symbol1 Good idea! – Neil G Mar 2 '15 at 16:20
2

Thanks to @Symbol1, copied this code from pgflibraryarrows and started adapting it to arrows.meta. length, width, and inset don't work. It should be called as Stealthy[round].

\pgfdeclarearrow{
  name=Stealthy,
  defaults={
    length  = +3.6pt +5.4,
    width'  = +0pt +0.5,
    inset'  = +0pt 0.5,
    line width = +0pt 1 1,
  },
  setup code = {
    \pgfutil@tempdima=0.28pt%
    \advance\pgfutil@tempdima by.3\pgflinewidth%
    \pgfutil@tempdimb=6\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
    \pgfarrowsleftextend{+-\pgfutil@tempdimb}
    \pgfutil@tempdimb=2\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
    \pgfarrowsrightextend{+\pgfutil@tempdimb}
  },
  drawing code = {
    \pgfutil@tempdima=0.28pt%
    \ifdim\pgfarrowlinewidth=\pgflinewidth\else\pgfsetlinewidth{\pgfarrowlinewidth}\fi
    \advance\pgfutil@tempdima by.3\pgflinewidth%
    \pgfsetdash{}{+0pt}
    \ifpgfarrowroundjoin\pgfsetroundjoin\else\pgfsetmiterjoin\fi
    \pgfpathmoveto{\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}}
    \pgfpathcurveto
    {\pgfqpoint{-.5\pgfutil@tempdima}{.5\pgfutil@tempdima}}
    {\pgfqpoint{-3\pgfutil@tempdima}{1.5\pgfutil@tempdima}}
    {\pgfqpoint{-6\pgfutil@tempdima}{3.25\pgfutil@tempdima}}
    \pgfpathcurveto
    {\pgfqpoint{-3\pgfutil@tempdima}{1\pgfutil@tempdima}}
    {\pgfqpoint{-3\pgfutil@tempdima}{-1\pgfutil@tempdima}}
    {\pgfqpoint{-6\pgfutil@tempdima}{-3.25\pgfutil@tempdima}}
    \pgfpathcurveto
    {\pgfqpoint{-3\pgfutil@tempdima}{-1.5\pgfutil@tempdima}}
    {\pgfqpoint{-.5\pgfutil@tempdima}{-.5\pgfutil@tempdima}}
    {\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}}
    \pgfpathclose
    \ifpgfarrowopen\pgfusepathqstroke\else\ifdim\pgfarrowlinewidth>0pt\pgfusepathqfillstroke\else\pgfusepathqfill\fi\fi
  },
  parameters = {
    \the\pgfarrowlinewidth,%
    \ifpgfarrowopen o\fi%
    \ifpgfarrowroundjoin j\fi
  },
}
  • could you please provide an MWE how to use your solution and an example of rendered output it produces compared to stealth' ? – Fry Sep 6 '18 at 0:16
  • @Fry This is the code for stealth' – Neil G Sep 6 '18 at 13:22

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.