I've looked around and surprisingly haven't found a clear answer to this question. I have some boxes I'm drawing with tikz. I would like the text (in this case D
) for the bigbox
boxes to be in the bottom right, without having to do anything to give any coordinates on a case by case basis. Instead the text is appearing in the center of the box. I don't seem to have control over that except through putting a lot of white space before the text.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows, decorations.markings,shapes,arrows,fit}
\tikzstyle{box}=[draw, minimum size=2em, text width=4.5em, text centered]
\tikzstyle{bigbox}=[draw, inner sep=20pt]
\begin{document}
\begin{tikzpicture}
\node[box] (A) at ( -2,1) {$A$};
\node[box] (B) at ( 1,1) {$B$};
\node[box] (C) at ( 4,1) {$C$};
\node[bigbox, fit=(A)(B)(C)] (D) {D};
\end{tikzpicture}
\end{document}