I would like to draw an integration contour which is pretty easy I think, but I am a newbie at the Tikz package. The integration contour goes from

-iinfinity to +iinfinity

parallel to the Imaginary axis but not exactly on it, rather slightly to the left (or right) of it. The integration contour also has a semicircle on it somewhere near the origin but not exactly on the origin.

I guess I'm looking for an indented contour but not the usual ones where one go from -infinity to + infinity with a jump over a pole as in the following picture contour but like I said I would like it to go vertically.

Indented contour

I also found this picture, I want something very close to this. If I get some help getting what is in the picture in the link I think I can manage doing the rest myself.

indented integration contour

Please, any help would be appreciated, thanks.

  • 1
    Not sure of what you want. Could you provide a hand-made sketch? Also, perhaps this question can help: tex.stackexchange.com/questions/103176/…
    – JLDiaz
    Aug 31, 2013 at 20:35
  • Hey JLDiaz I just added a link with a picture. That's pretty close to what I want. Any suggestions where to start? Thanks.
    – Zkit
    Aug 31, 2013 at 20:40
  • @Zkit TeX syntax doesn't work on TeX-SX. It's a deliberate choice. So $$ is just noise.
    – percusse
    Aug 31, 2013 at 20:42
  • OK that sucks, but I fixed it now.
    – Zkit
    Aug 31, 2013 at 20:46
  • Zkit any reason for reverting back the edits?
    – percusse
    Aug 31, 2013 at 20:54

1 Answer 1


Here is a first approximation, based on the answer to the question Drawing complex integration.

Is this close to what you want?


\draw (0,-5.5) -- (0,5.5);  % Axis
\draw (-5.5,0) -- (5.5,0);   
\foreach \y in {-5,...,5} {
  \draw (-4pt,\y) -- (4pt,\y) node[pos=0,left] {\y};
  \draw (\y,-4pt) -- (\y,4pt) node[pos=0,below] {\y};

\node at (0,-1.5) {$\times$}; % Pole

% Contour line
decoration={ markings,  % This schema allows for fine-tuning the positions of arrows
      mark=at position 0.2 with {\arrow{latex}}, 
      mark=at position 0.6 with {\arrow{latex}},
      mark=at position 0.8 with {\arrow{latex}}, 
      mark=at position 0.98 with {\arrow{latex}}}, 
  (0,-5) -- (0,-1.7) arc (-90:90:.2) -- (0,5);
decoration={ markings,
      mark=at position 0.2 with {\arrow{latex}}, 
      mark=at position 0.4 with {\arrow{latex}},
      mark=at position 0.6 with {\arrow{latex}}, 
      mark=at position 0.8 with {\arrow{latex}}}, 
 (0,5) arc (90:-90:5) -- (0,-5);


  • Ohh that's beautiful brother, thank you for your effort! I will soon fill in with comments, let me just play around with your example for a minute. Thanks again bro.
    – Zkit
    Aug 31, 2013 at 21:53
  • For the markings at regular intervals, TikZ provides mark=between positions .2 and .8 step .2 with \arrow{latex}. For the irregular marking I’d define an style mark at as follows: \pgfset{decoration/mark at/.style 2 args={@mark/.style={mark=at position ##1 with {#2}},@mark/.list={#1}}} that can be used as mark at={.2,.6,.8,.98}{\arrow{latex}}} in the decoration key. (You can also use it for regular markings: mark at={.1,.2,...,.9}{\arrow{latex}}.) Aug 31, 2013 at 23:15

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.