Considering the following code:
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\begin{document}
\pagestyle{empty}
% Define block styles
\tikzstyle{block} = [rectangle, draw, node distance=3cm,
text width=5em, text centered, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\begin{tikzpicture}[node distance = 2cm, auto]
% Place nodes
\node [block] (A) {A};
\node [block, right of=A] (B) {B};
\node [block, below of=A] (C) {long text long text long text long
text long text long text long text };
% Draw edges
\path [line] (A) -- (C);
\path [line] (B) -- (C);
\end{tikzpicture}
\end{document}
Give as output:
How can I have the two arrow from A and B to be on the same side of the long text block?
Since it is a MWE, I want to keep the same code as possible (so no macro if able) and two straight lines.
Best Answer
You can use the anchors for the nodes (and shiftings if required); for example,
<name>.north
or<name>.<angle>
, or something like(requires the
calc
library).An example showing some of these possibilities: