Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In PStricks... (edited after view the answer about tikz)

How can I draw an arrow similar to this?

enter image description here

to make an sketch os a progresion in 4 steps, similar to

A => B => C => D

but A;B;C;D is images, and => is an arrow to fill

share|improve this question

4 Answers 4

up vote 6 down vote accepted

with current pstricks-add.tex from http://texnik.dante.de/tex/generic/pstricks-add/

\documentclass{article}
\usepackage{pstricks-add}
\usepackage{graphicx,mwe}

\begin{document}
\includegraphics[scale=0.2]{example-image}
\makebox[4cm]{%
  \psBigArrow[fillstyle=solid,fillcolor=blue!30,doublesep=5mm,
          linecolor=blue,linewidth=2pt](-1,1)(1,1)}
\includegraphics[scale=0.2]{example-image}

\includegraphics[scale=0.2]{example-image}

\vspace{2cm}
\makebox[2cm]{%
  \psBigArrow[fillstyle=solid,fillcolor=blue!30,doublesep=5mm,
          linecolor=blue,linewidth=2pt](0,0.2)(0,2)}

\includegraphics[scale=0.2]{example-image}

\end{document} 

enter image description here

All optional arguments for lines and filling are possible:

\documentclass{article}
\usepackage{pstricks-add}

\begin{document}
\begin{pspicture}(5,5)
\psset{doublesep=1cm}
\psBigArrow[fillstyle=solid,fillcolor=blue!30,linecolor=blue](0,3)(5,3)
\psBigArrow[fillstyle=solid,opacity=0.3,fillcolor=red,linecolor=red,linewidth=3pt](0.5,0.5)(5,5)
\end{pspicture}

\end{document}

enter image description here

share|improve this answer
    
Is not neccesary type \being{pspicture} ...\end{pspicture}? to dran ps objects??? It´s the first time I view this with \beign{},....\end{} –  Mika Ike Apr 17 at 21:15
1  
Without the pspicture environment it reserves no space! It is put in box of 0pt für height and width. That's the only difference. You can also reserve space with \makebox[...] or \vspace –  Herbert Apr 17 at 21:20
1  
It is in texnik.dante.de/doc/generic/pstricks-add, but will be soon on CTAN. However, you have to specify the two coordinates Start-End. Valid options are doublesep (the inner width), linewidth, linecolor, fillcolor, fillstyle. –  Herbert Apr 18 at 6:39
1  
Follow the link and you'll find it on page 98. See also my edited answer –  Herbert Apr 18 at 7:31
1  
the width is controlled by doublesep, preset to 1cm –  Herbert Apr 18 at 7:51

One option using TikZ and single arrow from the shapes.arrows library:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}

\begin{document}

\begin{tikzpicture}[]
\node (a) {A};
\node at (2,0) (b) {B};
\node at (4,0) (c) {C};
\node at (6,0) (d) {D};
\foreach \Xcoor in {1,3,5}
\node at (\Xcoor,0) [draw=green,fill=green!30,single arrow] {\phantom{aaa}};

\end{tikzpicture}

\end{document}

enter image description here

With images (place \includegraphics inside a node):

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

\begin{document}

\begin{tikzpicture}[]
\node (a) {\includegraphics[width=1cm]{example-image-a}};
\node at (3,0) (b) {\includegraphics[width=1cm]{example-image-a}};
\node at (6,0) (c) {\includegraphics[width=1cm]{example-image-a}};
\node at (9,0) (d) {\includegraphics[width=1cm]{example-image-a}};
\foreach \Xcoor in {1.5,4.5,7.5}
 \node at (\Xcoor,0) [draw=green,fill=green!30,single arrow] {\phantom{aaa}};

\end{tikzpicture}

\end{document}

enter image description here

share|improve this answer
    
ok, but.. in PStricks? –  Mika Ike Apr 17 at 20:12
    
I think that these answers may be usefulll for tikz users, so... If the moderator want can change de labels and the main post. –  Mika Ike Apr 18 at 5:29

An automatic solution with TikZ, based on Connecting nodes with brace in TikZ:

\documentclass{article}
\usepackage{tikz,mwe}
\usetikzlibrary{calc,shapes.arrows,decorations.pathreplacing,shadows}

% list of keys
\newif\ifbraceon
\pgfkeys{/tikz/.cd,
  arrow color/.store in=\arrowcol,
  arrow color=green!80!blue,
  items distance/.store in=\itemdistance,
  items distance=3cm,
  border color/.store in=\bordercol,
  border color=green!80!black,
  fill color/.store in=\fillcol,
  fill color=green!80!lime!20,
  brace color/.store in=\bracecol,
  brace color=green!80!blue,
  brace distance/.store in=\bracedistance,
  brace distance=5pt,
  display brace/.is if=braceon,
  display brace=true
}

% list of styles
\tikzset{my arrow/.style={
    single arrow, draw, minimum height=0.5cm,
    minimum width=0.05cm,
    single arrow head extend=0.1cm
  },
  module/.style={
    rounded corners,
    draw=\bordercol,
    fill=\fillcol,
    minimum height=1cm,
    minimum width=1.5cm,
    text width=1.45cm,
    align=center,
    general shadow={shadow yshift=-.4ex,opacity=.4, fill=black!50, every shadow}, 
  },
  brace/.style={
    decoration={brace,raise=\bracedistance,amplitude=0.75em},
    decorate,
    draw=\bracecol,
    very thick,    
  }
}

% arrows between two modules        
\newcommand{\guparrow}{
node[my arrow,top color=\arrowcol!10,bottom color=\arrowcol,midway] {}
}

% bracediagram:
% #1 options, optional argument
% #2 list of items,
% #3 brace comment
\newcommand{\braceddiagram}[3][]{
  \begin{tikzpicture}[#1]% here we can pass the options to customize the colors
     % counting all the items to be displayed
     \foreach \items [count=\xi] in {#2}{\global\let\maxnumitem\xi}

     \foreach \items [count=\xi] in {#2}{%
       \path let 
         \n1={0+\xi*\itemdistance} in
         node[module] (module\xi) at +(\n1,0) {\items};
     }

     \foreach \items [count=\xi] in {#2}{%
       \pgfmathtruncatemacro{\xj}{mod(\xi, \maxnumitem) + 1)}
       \ifnum\xi<\maxnumitem % to not have the path from the last module 
                             % directed to the first one
         \path (module\xj) -- (module\xi) \guparrow;
       \fi
     }

     \ifbraceon
       % at the end we draw the brace with the comment
       \draw[brace] (module1.north west)--(module\maxnumitem.north east)
        node[above=3*\bracedistance, midway]{#3};
     \fi

  \end{tikzpicture}
}


\begin{document}

\braceddiagram[module/.style={},display brace=false]{A,B,C}{}

\vspace{1cm}

\braceddiagram[module/.style={},display brace=false]{
\includegraphics[scale=0.1]{example-image},
\includegraphics[scale=0.1]{example-image-a},
\includegraphics[scale=0.1]{example-image-b}}{}

\end{document}

The result:

enter image description here

share|improve this answer
    
in PStricks. I don´t use tikz –  Mika Ike Apr 17 at 20:19
    
@MikaIke: let us wait PSTricks gurus then ;) –  Claudio Fiandrino Apr 17 at 20:34

Here is one, with round corners and gradient fill:

\documentclass[a4paper,x11names, svgnames]{article}%

\usepackage[pdf]{pstricks}%
\usepackage{pstricks-add, pst-grad}
\definecolor[ps]{bordercolor}{rgb}{0.06 0.42 0.11}
\definecolor[ps]{greenbegin}{rgb}{0.47 0.94  0.151}
\definecolor[ps]{greenend}{rgb}{0.23 0.65  0.02}
\begin{document}
\psset{unit = 1mm}
\begin{pspicture}(-5,-10)(30,10) %
\psset{unit = 1mm, linearc = 0.05,linewidth = 1.2, linecolor =bordercolor}%SeaGreen4
\pnode(0,0){O}
\pnodes{A}(10.5,9.6)(10.5,5.5)(26,5.5)
\pnodes{B}(10.5,-9.6)(10.5,-5.5)(26,-5.5)
\pspolygon[fillstyle = gradient, gradangle=-45, gradbegin=PaleGreen1!60!, gradend=Chartreuse3! 50! SpringGreen4 ](O)(A0)(A1)(A2)(B2)(B1)(B0)%
 \end{pspicture}

\end{document} 

enter image description hereZ.png

share|improve this answer
    
:-) It´s so good. What detail level!! :-)) I can´t believe that high detaill level!!! :-) I understand in gneral, but I can´t understand (A0)(A1)(A2)(B1) because I can´t view that defined in the code. –  Mika Ike Apr 18 at 5:38
1  
(A0)(A1)(A2) is related to the \pnodes{A}(…,…)(…,…)(…,…) syntax: it defines a sequence of nodes all prefixed by A,that are numbered starting from 0. It's defined p. 6 of the pst-node documentation. –  Bernard Apr 18 at 10:28
    
ok, I couldn´t understand that first(,) is A0; second (,)is A1;.... I was surprised because I didn´t know that. Thank you. –  Mika Ike Apr 18 at 16:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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