At present, you can set the inner sep globally, for both vertical borders or for the both horizontal borders, for example:
\documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node[draw] (A) {\colorbox{red}{Normal node}}; \node[draw, below=of A, inner sep=0pt] (B) {\colorbox{red}{Node with inner sep=0pt}}; \node[draw, below=of B, inner xsep=0pt] (C) {\colorbox{red}{Node with inner xsep=0pt}}; \node[draw, below=of C, inner ysep=0pt] {\colorbox{red}{Node with inner ysep=0pt}}; \end{tikzpicture} \end{document}
Is it possible to have an inner xsep
only for west or east side (i.e. inner xsep west
and inner xsep east
), and an inner ysep
only for the upper or lower border (i.e. inner ysep above
and inner ysep below
)?
See also this post on TeX.SE: https://tex.stackexchange.com/q/27893/101651
For details see https://github.com/pgf-tikz/pgf/issues/631