I had a look at the relevant code for left delimiter
and right delimiter
, which is located in
$TEXMF/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex
and called \tikz@delimiter
.
It places a node left or right of the main node aligned to the lower level, measures the height of the node and then executes:
$\left#6\vcenter{\hrule height .5#8 depth .5#8 width0pt}\right#7$%
where #6
or #7
is the delimiter depending on the side (the other is then .
). Here #8
is the height of the box. As you can see it uses math code to draw the delimiter. I assume that these are only available in certain sizes and so they don't always fit. There is nothing to configure here. However, it would be possible to redefine the macro in question to scale the delimiter, e.g. using \resizebox*{!}{#8}{ .. }
.
\documentclass{article}
\usepackage{fullpage}
\usepackage{tikz}
\usetikzlibrary{shapes, matrix}
\makeatletter
\def\tikz@delimiter#1#2#3#4#5#6#7#8{%
\bgroup
\pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name}%
node[outer sep=0pt,inner sep=0pt,draw=none,fill=none,anchor=#1,at=(\tikz@last@fig@name.#2),#3]
{%
{\nullfont\pgf@process{\pgfpointdiff{\pgfpointanchor{\tikz@last@fig@name}{#4}}{\pgfpointanchor{\tikz@last@fig@name}{#5}}}}%
\delimitershortfall\z@% as suggested by morbusg (maximum space not covered by a delimiter = 0)
\resizebox*{!}{#8}{$\left#6\vcenter{\hrule height .5#8 depth .5#8 width0pt}\right#7$}%
}
\pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name}%
\egroup%
}
\makeatother
\begin{document}
\tikzset{
withparens/.style = {draw, outer sep=0pt,
left delimiter=(, right delimiter=),
above delimiter=(, below delimiter=),
align=center},
withbraces/.style = {draw, outer sep=0pt,
left delimiter=\{, right delimiter=\},
above delimiter=\{, below delimiter=\},
align=center}
}
\begin{tikzpicture}
\node[withparens] {make};
\node[right=1.5cm, withparens] {make \\ node};
\node[right=3.5cm, withparens] {make \\ node \\ higher};
\end{tikzpicture}
\vspace{2em}
\begin{tikzpicture}
\node[withbraces] {make};
\node[right=1.5cm, withbraces] {make \\ node};
\node[right=3.5cm, withbraces] {make \\ node \\ higher};
\end{tikzpicture}
\end{document}

I added the horizontal delimiters as well so you can see that they also work.
\delimitershortfall=0pt
(maximum space not covered by a delimiter)