3

My minimal demo is given as follows

\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}

$$ \begin{aligned} \text{quantitative} &= \left{ \begin{gathered} \text{continuous}\ \text{discret} \end{gathered} \right. \ \text{qualitative} &= \left{ \begin{gathered} \text{nominal}\ \text{ordinal} \end{gathered} \right. \end{aligned} $$

\end{document}

I want to a right barce categorical for three lines over discret,nominal and ordinal, like enter image description here

How can I get there via basic latex commands or particular packages?

cabohah
  • 11,455

2 Answers2

4

You could use a NiceArray (provided by the nicematrix package) which offers much more flexibility:

\documentclass{article}
\usepackage{nicematrix}
\begin{document}

[ \renewcommand{\arraystretch}{1.2} \begin{NiceArray}{rcl} \Block{2-1}{\text{quantitative} =} & \text{continuous} & \ & \text{discret} & \Block{3-1}{= \text{categorical}} \ \Block{2-1}{\text{qualitative} =} & \text{nominal} & \ & \text{ordinal} & \ \CodeAfter \SubMatrix.{1-1}{2-1}{ \SubMatrix.{3-1}{4-1}{ \SubMatrix}{2-3}{4-3}. \end{NiceArray} ]

\end{document}

enter image description here

3

I'm not sure this is an effective way to present ideas. Anyway, with a bit of visual formatting for a one-shot case

\documentclass{article}
\usepackage{amsmath}

\begin{document}

[ \hbox{\valign{\vfil#\cr \hbox{$\begin{aligned} \text{quantitative} &= \left{\begin{aligned}&\text{continuous} \ &\text{discrete}\end{aligned}\right. \ \text{qualitative} &= \left{\begin{aligned}&\text{nominal} \ &\text{ordinal}\end{aligned}\right. \end{aligned}$} \cr \hbox{% \hspace{-1em}% $\left.\vphantom{\begin{matrix} 0 \ 0 \ 0 \ 0 \end{matrix}}\right}\text{categorical}$% } \cr }} ]

\end{document}

enter image description here

egreg
  • 1,121,712