13

I'm trying to write this chart chart I have to copy

I have to make it as close as possible as it is a transcription of a manuscript, so the text must be aligned as in the picture. I can omit the underscores.

I tried using cases in equation mode but the cases at the right side are not aligned vertically. This is the code:

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

\[
\text{Idee}

\begin{cases}
    \text{variabili} & \text{(lettere)}\\
    \text{costanti} 
    \begin{cases}
        \text{generali} & \text{(idee deduttive)}\\
        \text{particolari}
        \begin{cases}
            \text{non definite} & ({}_{"} \text{primitive})\\
            \text{definite} & ({}_{"} \text{derivate})\\
        \end{cases}
    \end{cases} \\  
\end{cases}

\]

\end{document}

I also tried using the shemata package but I couldn't even write the "cases" on the right. Any suggestions? Thanks

1
  • 1
    Welcome to TeX.SE. Commented Feb 2 at 15:39

4 Answers 4

16

You can do it with nicematrix.

\documentclass[a4paper]{article}
\usepackage{nicematrix}

\begin{document}

\begin{center}
\renewcommand{\arraystretch}{1.5}
\begin{NiceTabular}{*{4}{>{\itshape}l}ll}
\Block{3-1}{Idee} & variabili &\multicolumn{3}{c}{\Ldots}& (lettere) \\
& \Block{3-1}{costanti} & generali &\multicolumn{2}{c}{\Ldots} & (idee deduttive) \\
&& \Block{2-1}{particolari} & non definite & \Ldots & (idee primitive) \\
&&& definite & \Ldots & (idee derivabili) \\
\CodeAfter
\SubMatrix\{{1-2}{3-2}.
\SubMatrix\{{2-3}{4-3}.
\SubMatrix\{{3-4}{4-4}.
\end{NiceTabular}
\end{center}

\end{document}

the table

I'd avoid the “ditto marks”, which are really ugly.

2
  • It's a very nice and clean answer, but it hinges a bit on the fact that the words are of similar length, no? If, say, "variabili" were a much longer word (or "costanti" a shorter one), we'd have a big white gap between "costanti" and the brace to the right. What I mean is, in this particular case it was possible to neatly arrange things in a lattice but, in general, I reckon it wouldn't quite be. Commented Feb 2 at 19:08
  • @impresso Such diagrams require a bit of visual formatting. Not that I'd use them myself, though. Commented Feb 2 at 20:38
12

This could be done using forest:

enter image description here

\documentclass{article}
\usepackage[edges]{forest} 

\forestset{mybrace/.style={
    for children={forked edge, edge=rounded corners, fork sep=1mm, align=left, 
        if n=1{child anchor=north west}{if n'=1{child anchor=south west}{no edge}}}
    }
}

\begin{document}

\begin{forest}
for tree={grow'=east, anchor=base west, l sep=3mm, if n children=0{edge=dashed, tier=leaf}{font=\itshape}}
[Idee, mybrace
    [variabili[(lettere)]]
    [costanti, mybrace
        [generali[(idee deduttive)]]
        [particolari, mybrace
            [non definite[(${}_{"}$ primitive)]]
            [definite[(${}_{"}$ derivate)]]
        ]
    ]
]
\end{forest}

\end{document}
10

I tried to see how far one can go with OP's original idea with the cases structure, without extra packages:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\negphantom}[1]{\settowidth{\dimen0}{#1}\hspace*{-\dimen0}}

\begin{document}

\[
\text{Idee}
\begin{cases}
    \text{variabili}  \dotfill  \phantom{\quad(idee deduttive)} & \negphantom{\quad(idee deduttive\,)} \text{(lettere)}\\
    \text{costanti} 
    \begin{cases}
        \text{generali} \dotfill \phantom{non definite.} & \negphantom{\quad non definite\,}  \text{(idee deduttive)}\\
        \text{particolari}
        \begin{cases}
            \text{non definite}   &   ({}_{"} \text{primitive})\\
            \text{definite}  &    ({}_{"} \text{derivate})\\
        \end{cases}
    \end{cases} \\  
\end{cases}
\]

\end{document}

enter image description here

Credit for negative phantom goes to @Werner's comment to this answer: https://tex.stackexchange.com/a/67914

4

The following solution uses three nested single-column array environments. Each one is delimited by \left\{ on the left and by \right. on the right.

enter image description here

If you desire upright rather than italic lettering, simply replace all instances of \textit with \textup.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}

\begin{document}

\[
\renewcommand\arraystretch{1.1} % optional
\textit{Idee}
\left\{ 
   \begin{array}{@{}l@{}}
   \textit{variabili}\dotfill \\
   \textit{costanti}
   \left\{ 
      \begin{array}{@{}l@{}}
      \textit{generali}\dotfill \\
      \textit{particolari}
      \left\{ 
         \begin{array}{@{}l@{}}
         \textit{non definite\dots} \\
         \textit{definite}\dotfill
         \end{array} 
       \right.
      \end{array} 
   \right. 
   \end{array} 
\right.
\begin{tabular}{l@{}}
  (\textit{lettere})         \\
  (\textit{idee deduttive})  \\
  (\textit{idee primitive})  \\
  (\textit{idee derivative})
\end{tabular}
\]

\end{document}

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.