6

I've a second question about TikZ or Pstricks. How can I type the code to obtain like this ? thank you

enter image description here

6

You could use TikZ and its decorations.markings library. Please see Section 48.5, page 592+, in the TikZ3 manual, http://ftp.cvut.cz/tex-archive/graphics/pgf/base/doc/pgfmanual.pdf. I enclose an example of this approach with help of the postaction option.

\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[x=1cm, y=1cm, decoration={markings, mark=at position 0.7 with {\arrow[scale=3]{>}}}, m/.style={blue,line width=1pt}]
\node[font=\bfseries] at (0,1.5) {Sexe};
\node[font=\bfseries] at (3,1.5) {Types d'\'etudes};
\node (f) at (0,0) {F};
\node (m) at (0,-1) {M};
\node (l) at (3.75,0.5) {Litt.};
\node (s) at (3.75,-0.5) {SC};
\node (t) at (3.75, -1.5) {Tech.};
\draw[m, postaction={decorate}] (f) to [bend left=20] (l);
\draw[m, postaction={decorate}] (m) to [bend left=20] (s);
\draw[m, postaction={decorate}] (m) to [bend left=-10] (t);
\end{tikzpicture}
\end{document}

mwe

9

Run with xelatex

\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{pstricks-add}

\begin{document}

\def\arraystretch{1.7}
\begin{tabular}{@{} c @{\hspace{1.5cm}} c @{}}
\bfseries\itshape Sexe & \bfseries\itshape Types d'\'etudes \\
                       & \rnode{l}{Litt.}                   \\
\rnode{f}{F}                                                \\
                       & \rnode{s}{SC~~}                    \\
\rnode{m}{M}                                                \\
                       & \rnode{t}{Tech.}
\end{tabular}
\psset{ArrowInside=->,ArrowInsidePos=0.7,arrowscale=2,angleB=180}
\nccurve{f}{l}  \nccurve{m}{s}  \nccurve{m}{t}

\end{document}

enter image description here

7

This is one possible solution where myarrow style is defined for arrow decoration at position=0.7. One may use bend left/right=xx, xx=some angles of choices.

enter image description here

Code

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.markings,arrows,positioning}

\tikzset{myarrow/.style={decoration={markings,
%mark=at position 0.3 with {\arrow{stealth'}},
mark=at position 0.7 with {\arrow{stealth'}}
},postaction={decorate}
}}  
\begin{document}
\begin{tikzpicture}
\node (A) {Sexe};
\node[right =2cm of A] (B) {Types};

\node [below= 1cm of A](A1){F}; 
\node [below= 1.5cm of A1](A2){M};

\node [below= 1cm of B](B1){Litt}; 
\node [below= 1cm of B1](B2){SC};
\node [below= 1cm of B2](B3){Tech}; 

\draw (A1) edge[myarrow,bend left] (B1);

\draw (A2) edge[myarrow,bend left] (B2);
\draw (A2) edge[myarrow,bend right] (B3);
\end{tikzpicture}

\end{document}
4

A variant of the pstricks solution, using the makecell package, that produces a different alignment for the right column:

        \documentclass[a4paper]{article}
        \usepackage[utf8]{inputenc}
        \usepackage[T1]{fontenc}
        \usepackage{MinionPro}
        \pagestyle{empty}
        \usepackage{makecell}
        \renewcommand*\theadfont{\bfseries\itshape}
        \usepackage[pdf]{pstricks}%
        \usepackage{pstricks-add}

        \begin{document}

        \begin{tabular}{c@{\hskip2.5cm}c}
         \thead{Sexe} & \thead{Types d'études} \\%
                        \makecell{\rnode{F}{F}\\[12pt] \rnode{M}{M}} & \makecell*{\makecell[l]{\rnode{L}{Litt.}\\[15pt] \rnode{S}{SC}\\[15pt] \rnode{T}{Tech.}}} \\
        \end{tabular}

        \psset{ArrowInside = ->, ArrowInsidePos = 0.6,linewidth = 1.5pt, linecolor = blue}
        \ncarc[nodesep = 6pt ]{F}{L}
        \nodexn{(M) + (9pt,0)}{M}
        \ncarc[nodesepA = 0pt, nodesepB = 6pt]{M}{S}
        \ncarc[ArrowInside = -<, ArrowInsidePos = 0.4,nodesepA = 6pt, nodesepB = 0pt ]{T}{M}

        \end{document} 

enter image description here

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.