I expect this is either a duplicate or a silly question, but after some looking (30 mins+) I haven't found an easy answer. I didn't find this question particularly helpful, despite the title.
What's the most straightforward/idiomatic way to shift the text for the node West
a little to the left, so that there's a reasonable gap between the text for nodes West
and East
? I would like to keep the text for the node East
where it is, and for all the arrows to retain their present orientation.
I thought I might be able to use xshift
, as mentioned here, but I wasn't able to make that work. Maybe this is because West
is the node relative to which the others are placed?
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[node distance=1.5cm, auto]
\node (West) {
$\Gamma \vdash A, B, C, D, E, F, G$
};
\node (North) [right of=West, above of=West] {
$\Gamma'$
};
\node (South) [below of=West, right of=West] {
$\Delta'$
};
\node (East) [right of=North, below of=North] {
$\Delta \vdash I, J, K, L, M$
};
\draw[->] (West) to node [yshift=-1ex] {$f$} (North);
\draw[->] (West) to node [yshift=1ex,swap] {$g$} (South);
\draw[dotted,->] (North) to node [yshift=-1ex] {$f'$} (East);
\draw[dotted,->] (South) to node [yshift=1ex,swap] {$g'$} (East);
\end{tikzpicture}
\end{document}
Best Answer
Just add
\hspace{-2em}
to the node text forWest
.