2

I've been trying to make a multilevel boxes for my project, but I can't get them to look right. Here is how they look now

enter image description here

And here is the code I used to make them:

\boxed{
    \!\begin{aligned}
    &\textbf{FULL}

    &The patient had mutation in \emph{HFE}.

        \boxed{
            \!\begin{aligned}
            &\textbf{GENERAL}

            &We found links between \emph{ABO}, \emph{BRAC1} and \emph{TP53}.

            \boxed{
                \!\begin{aligned}
                &{\textbf{STRICT}

                &We detected \emph{BRAC1} and \emph{BRAC2} in the patient.}
                \end{aligned}
            }
            \end{aligned}
        }
    \end{aligned}
}

I want the biggest box to enclose all smaller boxes and so on and so forth. Any advice would be appreciated.

  • Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Thruston May 20 '17 at 17:08
  • surely the posted code didn't make the output shown? aligned is a math construct so for example would set The patient had mutation in in math italic with no spaces. – David Carlisle May 20 '17 at 17:46
2

You could use \parboxes of increasing size (or decreasing, depending on how you look at it).

\documentclass{article}  
\begin{document}
\fbox{\parbox{4.5in}{\parindent=1em\relax\noindent\textbf
{FULL}

The patient had mutation in \emph{HFE}.

  \fbox{\parbox{4in}{\parindent=1em\relax\noindent\textbf
  {GENERAL}

  We found links between \emph{ABO}, \emph{BRAC1} and \emph{TP53}.

    \fbox{\parbox{3.5in}{\parindent=1em\relax\noindent\textbf
    {STRICT}

    We detected \emph{BRAC1} and \emph{BRAC2} in the patient.
    }}
%
  }}
%
}}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.