Lasse Kliemann | 21 Nov 06:41

inner separation left and right

There is 'inner xsep', but can I also specify left and right 
separation separately? For example 'inner leftsep = 1cm, inner 
rightsep = 2cm' to have 1cm separation on the left side and 2cm 
on the right side.

Thank you!
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Mark Wibrow | 21 Nov 08:26
Picon

Re: inner separation left and right

Hi,

The short answer is no. But you could fake it as follows:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\makeatletter
\tikzset{%
	inner xseps/.style 2 args={%
		inner xsep={min(#1,#2)},
		execute at begin 
node={\pgfmathparse{(#1-#2)<0?0:(#1-#2)}\hskip\pgfmathresult pt},
		execute at end 
node={\pgfmathparse{(#2-#1)<0?0:(#2-#1)}\hskip\pgfmathresult pt}
	}
}
\begin{tikzpicture}[every node/.style={draw}]
\node [inner xseps={1cm}{1cm}] at (0,0) {A};
\node [inner xseps={1cm}{2cm}] at (0,1) {B};
\node [inner xseps={2cm}{1cm}] at (0,2) {C};
\end{tikzpicture}

\end{document}

However, this may not work in all circumstances.

Regards

Mark
(Continue reading)


Gmane