I'm back :-). After rethinking, what should be preserved and what should to be moved in desired image, I decided to edit my answer again ...
Edit (3):
Since the question has not been clear to me, in prevous version of answer (which I erase, since they are not help you) I from your solution guess, again, what you like to obtain. Below is my (last) proposition :-).
My analysis of your answer show me, that it is not quit in "spirit" of correct use of TikZ. Let see, what you really obtain with your solution:
[![enter image description here][1]][1]
To get above picture I only add to nodes option draw=red
that it can be seen, that text in West node protrude out of it. I like just to point out, that this is not good practice and should be avoided.
Possible solutions:
I after longer guessing assume, that you like to obtain, that arrow (seen from North and South node) touch West node on the same distance from its north east corner as at East node from its north west corner, i.e., that slope of arrows would be preserved. To obtain this property are more possibilities. For example:
guessin this distance and than use it as
\draw ([xshift=-guessed distance>] West.north east) to node ...
(North);
make measurement of this distance
- some other solution (which not cross my mind)
For second possibilities one can exploit three TikZ libraries: calc
, intersections
and positioning
. The last one is used for correct use node or coordinates placement sintax (right=of ...
instead right of = ...). With help
intersectiond˙ is determined intersection of arrow from North node with border of East node and with calc
is calculated distance (in x direction only) from middle point between West and East node to this intersection:
\documentclass[border=3mm,tikz]{standalone}
\usetikzlibrary{calc,intersections,positioning}
\begin{document}
\begin{tikzpicture}[
node distance=1.5cm,
]
\node (West) {$\Gamma \vdash A, B, C, D, E, F, G$};
\node (East) [right=4mm% <-- distance between nodes West and East
of West] {$\Delta \vdash I, J, K, L, M$};
% coordinate in the middle of the West and EAST node
\coordinate (a) at ($(West.east)!0.5!(East.west)$);
%
\node (North) [above=of a] {$\Gamma'$};
\node (South) [below=of a] {$\Delta'$};
% determination of intersection between arrow from North to East
% with node East
\path[name path=curve 1] (East.north west) -- (East.north);% auxiliary path
\path[name path=curve 2] (North) -- (East);% auxiliary path
\path[name intersections={of=curve 1 and curve 2, by={b}}] (b);
% caluculation of distance to intersection
\path let \p1 = (a),
\p2 = (b |- a),
\n1 = {veclen(\y2-\y1,\x2-\x1)} in
coordinate[left=\n1 of a ] (c);
% arrows
\draw[->] (c |- West.north) to node[above] {$f$} (North) ;
\draw[->] (c |- West.south) to node[below] {$g$} (South) ;
\draw[dotted,->] (North) to node[above] {$f'$} (East);
\draw[dotted,->] (South) to node[below] {$g'$} (East);%,
\end{tikzpicture}
\end{document}
With this solution the slope of arrows between nodes preserve their slope, the distance between West and East node can be explicit set and North and west node are always on the north and south of middle point between West and East node.
Below are two images, first with 4mm distance between West and East node, and second with 16mm. The MWE above is for the first image.
\hspace{-2em}
to the node text forWest
, but is there anything closer to idiomatic Tikz?\node[] (West) { $\Gamma \vdash A, B, C, D, E, F, G\qquad$ };
. Usexshift
but forEast
:\node (East) [xshift=1em,right of=North, below of=North] { $\Delta \vdash I, J, K, L, M$ };
.above of=…
and so on are considered deprecated and thepositioning
library withabove=of …
should be used. See Q9386 and Q94396. Since you've updated this question anyway: Do you want the connecting lines to be orthogonal to each other but just more horizontal space between the nodes?