3

My Latex code is below:

\documentclass{article}
\usepackage{geometry}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}
\begin{document}
\begin{tikzpicture}
\draw (0,0)--(0,4);
\draw (0.5,0)--(0.5,4);
\draw(-0.5,1.5)--(0.25,2);
\draw(0.25,2)--(1,1.5);
\draw(1.5,1.6)--(2.5,1.6);
\draw(1.5,1.9)--(2.5,1.9);
\end{tikzpicture}
\end{document}

It works well. The result is like that:

propagator

How can I draw this picture using double arrow? Thank you.

3

The resolution on your dropbox image is a little low, but I think that you are trying to make something like this:

enter image description here

If this is what you want then you can get it using the double option to the \draw command. This draws "double lines" rather than single lines. You can control the distance between the lines using double distance. Here's the full code:

\documentclass{article}
\usepackage{geometry}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}
\begin{document}
\begin{tikzpicture}
\draw (0,0)--(0,4);
\draw (0.5,0)--(0.5,4);
\draw[double,double distance=1mm](-0.5,1.5)--(0.25,2)--(1,1.5);
\draw(1.5,1.6)--(2.5,1.6);
\draw(1.5,1.9)--(2.5,1.9);
\end{tikzpicture}
\end{document}

Notice that I also combined your two \draw commands for the left and right hand side of the "arrow" into one command because \draw accepts a series of coordinates.

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.