# Nested boxes of different thickness

I would like to create nested boxes in LaTeX that look like this:

I know how to create the outside boxes, but I don't know how to create the thick black box inside.

## 2 Answers

With the CreateMySpace environment which is a LaTeX genetic picture environment, one can design a box that has several boxes within its structure.

Via the \fixedBoX{width}{height}{contents} command, one can determine the height and width of a box and its content.

Via the \itemNUNERALS commands, one can put the fixed-box at any position.

Via the \fboxrule one can change the thickness of a box.

\documentclass[A4paper]{report}
% generate a box of fixed height and width
\newcommand\fixedBOX[3]
{\fbox{\hbox to #1
{\parindent 0pt
\hsize=#1
\vtop to #2
{\strut #3%
\vfil
}}}}
\newenvironment{CreateMySpace}{
\fboxrule=1pt
\clearpage
\noindent
\setlength{\unitlength}{3mm}
\begin{picture}(50,60)(10,0)
\footnotesize
}{
\normalsize
\end{picture}
}
\newcommand\itemONE[3]{\put(0,60){\fixedBOX{#1}{#2}{#3}}}
\newcommand\itemTWO[3]{\put(2,58){\fixedBOX{#1}{#2}{#3}}}
\newcommand\itemTHREE[3]{\put(4,56){\fixedBOX{#1}{#2}{#3}}}
\newcommand\itemFOUR[3]{\put(6,54){\fixedBOX{#1}{#2}{#3}}}
\newcommand\itemFIVE[3]{\put(8,52){\fixedBOX{#1}{#2}{#3}}}
\newcommand\itemSIX[3]{\put(10,50){\fixedBOX{#1}{#2}{#3}}}
\newcommand\itemSEVEN[3]{\put(27,54){\fboxrule=2pt\fixedBOX{#1}{#2}{#3}}}

\begin{document}

\begin{CreateMySpace}
\itemONE{15cm}{9cm}{\bfseries Topological Space $\mathbf {(X,\tau)}$\hfill   (homeomorphism)}
\itemTWO{14cm}{8cm}{\bfseries Hausdorff Space $\mathbf{T_2}$}
\itemTHREE{13cm}{7cm}{\bfseries Normal Space $\mathbf{T_4}$}
\itemFOUR{12cm}{6cm}{\bfseries Metric Space $\mathbf{(X,d)}$\hfill (isometry)}
\itemFIVE{11cm}{5cm}{\bfseries Normed Space $\mathbf{(X,|\cdot|)}$}
\itemSIX{10cm}{4cm}{\bfseries Inner-product Space $\mathbf{(X,<\cdot,\cdot>)}$}
\itemSEVEN{3cm}{2cm}{\bfseries Complete MS \par \bigskip Banach Space \par\bigskip Hilbert Space}
\end{CreateMySpace}

\end{document}


The key to this solution (apart from the nesting boxes), is using \stackinset to overlay the second box atop the original image. I guess the second key is the use of \Longstack, which allows the interline baselineskip to be set (as it was here to 1.4\baselineskip).

\documentclass{article}
\usepackage[usestackEOL]{stackengine}[2013-09-11]
\def\stackalignment{l}
\setstackgap{L}{1.4\baselineskip}
\fboxsep=4pt\relax
\begin{document}
\stackinset{c}{.5in}{t}{.73in}{%
\fboxrule=3pt\relax\framebox[1in][t]{%
\Longstack{Complete MS\\Banach Space\\Hilbert Space\\ }}}{\fboxrule=.75pt%
\fbox{\stackunder{Topological Space $(\mathbf{X},\tau)$%
\hspace{2.3in}(homeomorphism)}%
{\fbox{\stackunder{Hausdorff Space $(\mathbf{X},\mathbf{T}_2)$}%
{\fbox{\stackunder{Normal Space $(\mathbf{X},\mathbf{T}_4)$}%
{\fbox{\stackunder{Metric Space $(\mathbf{X},\mathbf{d})$%
\hspace{2.7in}(isometry)}%
{\fbox{\stackunder{Normal Space $(\mathbf{X}, \left|.\right|)$}%
{\framebox[4.5in][l]{Inner-product Space $(\mathbf{X}, <\dots>)$%
\rule[-10ex]{0ex}{10ex}}}%
}}}}}}}}}
}
\end{document}