I use this code:

            label=above:$p_1^1$] (p11) at (-3,0) {};
            minimum width=1.5mm,
            minimum height=12mm,
            label=below:$t_1$] (t1) at (-1.5,0) {};
        \draw[thick] (p11) edge[post,bend left=30] (t1) 
            (t1) edge[post,bend left=30] (p11);

I want to add a label to each arrow, preferably like this:

simple pnet with arrow labels

I have tried using {label} after the receiving nodes of each arrow but it does not work.

  • 2
    Hello. As a rule on this site, please provide a complete (yet short) example, so that people can copy-paste it and compile it straight away. Not only is it more polite for the people who try to help you, it's also necessary to see which packages you're using. Thanks.
    – Miyase
    May 15 at 16:15
  • For example (p11) edge[...] node [above] {$q^1$} (t1) I suppose? (As in e.g. tex.stackexchange.com/questions/538590/midway-label-for-edge/…) May 15 at 16:29
  • Welcome to TeX.SX. When you post a question, always provide a "Minimal Working Example" (MWE) that starts with \documentclass, includes all relevant \usepackage commands, ends with \end{document} and compiles without errors, even if it does not produce your desired output.
    – Sandy G
    May 15 at 19:02
  • @TorbjørnT. it worked. Thank you!
    – alexq
    May 16 at 7:05
  • 4
    I’m voting to close this question because solved in comments.
    – CarLaTeX
    May 24 at 6:26


Browse other questions tagged or ask your own question.