5

i constructed using the picture environment a simple Dynkin diagram of type A_n, which looks like :

o---o---o ... o---o---o

I would like to connect the first and last vertices of this diagrame with a rounded arrow (arrow on both sides), but i'm unable to make bezier arrrows with the picture environment. I would prefer not using Tikz.

Here is a rough code for my diagram :

   \documentclass{amsart}

\begin{document}
\begin{picture}(7,2)
 \put(0,1){\circle*{5}}
 \put(0,1){\line(1,0){20}}
 \put(20,1){\circle*{5}}
 \put(20,1){\line(1,0){20}}
 \put(40,1){\circle*{5}}
 \put(53,-1){\mbox{$\cdots$}}
 \put(80,1){\circle*{5}}
 \put(80,1){\line(1,0){20}}
 \put(100,1){\circle*{5}}
 \put(100,1){\line(1,0){20}}
 \put(120,1){\circle*{5}}
\end{picture}
\end{document}
7
  • Hi and welcome to TeX.sx. Can you add the code for the output you have shown? Makes helping much easier if there is something to start with.
    – Johannes_B
    Sep 16, 2014 at 18:35
  • I was about to offer a TiKZ solution, but then I noticed that you prefer not to use it. IMHO it gives much nicer output than the picture environment and it's much easier to use...
    – user30471
    Sep 16, 2014 at 20:51
  • Well i'm interested to see this, even if i would prefer to avoid this. Sep 16, 2014 at 20:56
  • I trick I used to use was to draw the line then overlay the ends with very short vectors. Sep 16, 2014 at 21:34
  • Do you want to avoid TiKZ altogether or do you just not want to have to redo your existing diagrams?
    – cfr
    Sep 16, 2014 at 22:40

3 Answers 3

3

Here is a method using the basic picture environment, extended via package pict2e. I had to put the arrow head a bit manually, do not know if there is some other approach in this context.

Dynkin

About the shape of the diagram I don't know if it is what was asked for, I did as in cfr's answer

\documentclass{amsart}
\usepackage{pict2e}% extension of LaTeX2e's picture abilities
\begin{document}
% \the\unitlength % 1pt by default

\begin{picture}(7,2)% <-- are sure you want the picture declared with 7pt of
                     % width and 2pt of height?
 \linethickness{1pt}
 \put(0,1){\circle*{5}}
 \put(0,1){\line(1,0){20}}
 \put(20,1){\circle*{5}}
 \put(20,1){\line(1,0){20}}
 \put(40,1){\circle*{5}}
 \put(53,-1){\mbox{$\cdots$}}
 \put(80,1){\circle*{5}}
 \put(80,1){\line(1,0){20}}
 \put(100,1){\circle*{5}}
 \put(100,1){\line(1,0){20}}
 \put(120,1){\circle*{5}}
 \cbezier (0,3)(40,25)(80,25)(120,3)% cubic Bezier curve
 \put(116,5){\vector(2,-1){5}}% trial and error..
 \cbezier (120,-1)(80,-23)(40,-23)(0,-1)
 \put(4,-3){\vector(-2,1){5}}% trial and error..
\end{picture}
\end{document}
6

I know you prefer to avoid TiKZ but you expressed interest in seeing a solution even so.

This method uses tikzmark which means you don't have to recode existing diagrams but you do have to compile twice to see the effect:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
  \begin{picture}(7,2)
    \put(0,1){\tikzmark{a}\circle*{5}}
    \put(0,1){\line(1,0){20}}
    \put(20,1){\circle*{5}}
    \put(20,1){\line(1,0){20}}
    \put(40,1){\circle*{5}}
    \put(53,-1){\mbox{$\cdots$}}
    \put(80,1){\circle*{5}}
    \put(80,1){\line(1,0){20}}
    \put(100,1){\circle*{5}}
    \put(100,1){\line(1,0){20}}
    \put(120,1){\tikzmark{b}\circle*{5}}
  \end{picture}
  \begin{tikzpicture}[remember picture, overlay]
    \draw [->] ({pic cs:a}) +(0,5pt) coordinate (c)  [out=45, in=135] to (c -| {pic cs:b});
    \draw [<-] ({pic cs:a}) +(0,-5pt) coordinate (d)  [out=-45, in=-135] to (d -| {pic cs:b});
  \end{tikzpicture}
\end{document}

tikzmark solution

Alternatively, a TiKZ-only solution:

\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\begin{document}
  \begin{tikzpicture}
    \path [fill] foreach \i in {0,20,40,80,100,120} {(\i pt,0) coordinate (c\i) circle (2.5pt)};
    \path [draw] (c0) -- (c20) -- (c40) (c80) -- (c100) -- (c120);
    \node [anchor=center] at ($(c40)!1/2!(c80)$) {$\cdots$};
    \draw [->] (c0) +(0,5pt) coordinate (p)  [out=45, in=135] to (p -| c120);
    \draw [<-] (c0) +(0,-5pt) coordinate (q)  [out=-45, in=-135] to (q -| c120);
  \end{tikzpicture}
\end{document}

pure tikz solution

2
  • @LouisLaBrocante Sorry I can't give you a non-TiKZ solution. I would not mark this as accepted. (Can you unaccept it?) That will discourage other people from providing a solution which better fits your requirements. (If you have enough reputation, you can up-vote it if you wish. That does not have the same deterrent effect!) If nobody offers anything in a few days, then by all means accept it. But I would not do so yet.
    – cfr
    Sep 16, 2014 at 23:54
  • this is already very kind to have helped me, thank you all. Sep 17, 2014 at 12:08
1

This is not really what you are looking for, because it uses TikZ by way of using the dynkin-diagrams package:

An Dynkin diagram, with some arrows

\documentclass{amsart}
\usepackage{dynkin-diagrams}
\newcommand{\ar}[1]{
    \draw[thick,gray!75,stealth-stealth] 
        (root 1) to [out=#1 45,in=#1 135] (root 6);}
\begin{document}
    \begin{dynkinDiagram}{A}{ooo.ooo}
    \ar{-}\ar{+}
    \end{dynkinDiagram}
\end{document}

If you want the circles to be solid dots, replace ooo.ooo by ***.***

You must log in to answer this question.

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