# Shorten both ends of a line with one key

Consider the following snippet:

\begin{tikzpicture}
\fill (0,0) circle (\ptRad);
\fill (1,1) circle (\ptRad);
\draw[<->, shorten <=\ptRad,shorten >=\ptRad] (0,0) -- (1,1);
\end{tikzpicture}


Is there a way to use only one shortening key for both ends at the same time?

-
@Jake: This is for sure nicer then my code. Should I understand from this that there is no build in way (at least currently) to shorten both end at once? – Dror Feb 18 '13 at 13:30
Yes, at the moment there is no built-in key for this. – Jake Feb 18 '13 at 13:35
pstricks provides this shortening via the single key nodesep. Separate end shortening can be set using nodesepA (for the source) and nodesepB (for the target). – Werner Feb 18 '13 at 15:02

You can define your own style that sets the shorten for both ends at the same time:
\tikzset{ shorten <>/.style={ shorten >=#1, shorten <=#1 } }