Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In the MWE below:

\documentclass{report}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{tikz,pgf}


\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%
    decorations.pathreplacing,decorations.pathmorphing,shapes,%
    matrix,shapes.symbols,automata}

\begin{document}

\begin{center}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto, node distance=3cm ,semithick]

    \node [draw,  rounded corners=2pt,rectangle, initial, initial text=\textbf{Query},initial where=above](timing) {Timing};
    \node [draw,  rounded corners=2pt,rectangle](indep)[right of=timing] {Independent};
    \node [draw,  rounded corners=2pt,rectangle](caching)[right of=indep] {Caching};
    \node [draw,  rounded corners=2pt,rectangle](pc)[right of=caching] {PC Logging};

    \node [draw, node distance=3cm, rounded corners=2pt,rectangle](stp)[right of= pc] {STP};

    \path (timing) edge[]   node{} (indep);

    \path (indep) edge[]   node{} (caching);

    \path (caching) edge[]   node{} (pc);

    \path (pc) edge[]   node{} (stp);

\end{tikzpicture}\\
\end{center}

\end{document}

How can I put a vertical arrow, that is pointing upwards, on the arrow (preferably at its mid point) between the PCLogging and STP boxes ?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Adding

\draw[->] ($(stp.west)!0.5!(pc.east)$) -- ++(0,1cm) node[above] {Text}; 

is sufficient to find the midpoint and adding text at the end.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.