I need to write multiple brackets but not in mathematical mode; i need to write some texts inside, like the picture. I am trying everything but it seems impossible. I tried using package schemata, tkiz, showframe. I think i am probably not using in the right way.
- 9,333
- 3
- 42
- 69
- 301
-
how did you use it? – naphaneal Mar 28 '16 at 12:46
-
\newsavebox{\leftbox} \newsavebox{\rightbox}% \NewDocumentCommand{\lrboxbrace}{s O{{} O{}} O{0.1\linewidth} m O{0.8\linewidth} m}{% %\lrboxbrace[
][ – Poli Tolstov Mar 28 '16 at 13:47][ ]{ }[ ]{ } \begin{lrbox}{\leftbox}% Left box \IfBooleanTF{#1}% starred/unstarred {\begin{varwidth}{#4}#5\end{varwidth}} {\begin{minipage}{#4}#5\end{minipage}} \end{lrbox} \begin{lrbox}{\rightbox}% Right box \IfBooleanTF{#1}% starred/unstarred {\begin{varwidth}{#6}#7\end{varwidth}} {\begin{minipage}{#6}#7\end{minipage}} \end{lrbox} \ensuremath{\usebox\leftbox\left#2,\usebox\rightbox,\right#3}} -
I insert this comand by using the \usepackage{showframe} \usepackage{tikz,lipsum} – Poli Tolstov Mar 28 '16 at 13:48
-
the problem with the package schemata is that when i try to insert an bracket inside another it becomes tiny and is impossible to write a text inside – Poli Tolstov Mar 28 '16 at 13:50
1 Answers
Perhaps this way might work, using a nesting of \BL[<bullet>]{entry} and , for bracing, \level{<row 1> \cr <row 2> ...}. Column width is defined by \levelwidth.
\documentclass{article}
\def\levelwidth{0.7in}
\newcommand\BL[2][$\bullet$]{#1\,\parbox[t]{\levelwidth}{\raggedright#2}}
\def\level#1{\unskip $\left\{\vcenter{\hbox{\shortstack{#1}}}\right.$\ignorespaces}
\begin{document}
\BL[]{Text here blah blah}
\level{
\BL{text text here here something}
\level{
\BL{number}\cr
\BL{other word}\cr
\strut
}
\cr
\BL{another text here}
\level{
\BL{something}\cr
\strut\cr
\strut
}
}
\end{document}
FOLLOW UP
[NOTE: an even better version of this is presented at Is there a better way of setting this tree?
Here, I address two extensions: 1) if some rows employ different numbers of columns, and 2) if columns need to be different widths (my latest EDIT).
If there are to be some entries with different numbers of columns, I introduce \skipcol[<bullet>]{<column number>}, which should be employed (perhaps successively) after a \BL{} of the last filled column. The column number must be specified as an argument, since different columns can now have different widths. The [<bullet>] optional argument may be needed, since different bullets have different widths, as well.
The column widths must be pre-specified in the definitions: \levelwidth (left most column width), \levelwidthi (width after left-most brace), \levelwidthii (width after 2nd brace), \levelwidthiii, etc. in the way of roman numerals.
\documentclass{article}
\newcounter{levelcount}
\def\levelwidth{0.7in}
\def\levelwidthi{1.7in}
\def\levelwidthii{.9in}
\def\levelwidthiii{.3in}
\newcommand\BL[2][$\bullet$]{#1\,\parbox[t]{%
\csname levelwidth\romannumeral\thelevelcount\endcsname}{\raggedright#2}}
\def\level#1{\stepcounter{levelcount}%
\unskip $\left\{\vcenter{\hbox{\shortstack{#1}}}\right.$%
\addtocounter{levelcount}{-1}\ignorespaces}
\newcommand\skipcol[2][$\bullet$]{\unskip\mbox{} %
\hphantom{$\left\{\hbox{#1\,\parbox[t]{%
\csname levelwidth\romannumeral#2\endcsname}{\mbox{}}}\right.$}%
\ignorespaces}
\begin{document}
\BL[]{Text here blah blah}
\level{
\BL{text text here here something}
\level{
\BL[$\spadesuit$]{number} \skipcol{3}\cr
\BL[$\spadesuit$]{other word}
\level{
\BL{A}\cr
\BL{B}
}
\cr
\strut
}
\cr
\BL{another text here}
\level{
\BL[$\spadesuit$]{something}\cr
\strut\cr
\strut
}\skipcol{3}
\cr
\BL{here is a 1-column entry, must use \textbackslash skipcol}
\skipcol[$\spadesuit$]{2}\skipcol{3}
}
\end{document}
- 237,551
-
-
@PoliTolstov by "large" do you mean big letters or long strings of text? – Steven B. Segletes Mar 28 '16 at 14:37
-
-
-
@PoliTolstov Does increasing the value of
\def\levelwidth{0.7in}help, which is the column width? – Steven B. Segletes Mar 28 '16 at 14:40 -
yes. it is helping. However i think it is increasing the width of all the three columns – Poli Tolstov Mar 28 '16 at 14:43
-
i need to decrease the width of the first column and increase only the width of the third – Poli Tolstov Mar 28 '16 at 14:45
-
@PoliTolstov Then set the value of
\levelwidthto a value suitable for columns 2, 3, etc, and replace the opening line of the construct,\BL[]{Text here blah blah}with\parbox[t]{.7in}{\raggedright Text here blah blah}, where[.7in]is the desired width of column 1. – Steven B. Segletes Mar 28 '16 at 15:00 -
and if i wish to change the width of the second column too i have to proceed in the same way? – Poli Tolstov Mar 28 '16 at 15:05
-
@PoliTolstov If you want to arbitrarily use different column widths, then I have to try to rework a solution allowing for that as a parameter. – Steven B. Segletes Mar 28 '16 at 15:07
-
ok. Could you explain to me what means "in" in [0.7in]? And raggedright, \BL, \shortstark and \cr? Because I am new in latex, and i think i could try making some changes here by understanding what means each thing. nevertheless i am already greatful. – Poli Tolstov Mar 28 '16 at 15:15
-
@PoliTolstov "in" is inches (American length units),
\raggedrightprevents full justification of a paragraph,\BLis what I define in the preamble to print a bullet and then a paragraph box,\shortstackis a intrinsic TeX macro for stacking things vertically, where\cris the row delimiter of the stack (I think it stand for "carriage return"). – Steven B. Segletes Mar 28 '16 at 15:20 -
@PoliTolstov See update for different column width entries. – Steven B. Segletes Mar 29 '16 at 10:01

