5

EDIT -

I'm not sure what these are called but how would one go about doing something like this in LaTeX :

enter image description here

enter image description here

Cheers

EDIT #1

This partially works - not very well though

\documentclass{book}
\usepackage{amsmath}
\begin{document}
\[
\left.
\begin{minipage}{2cm}
\begin{itemize}
\item One
\item Two
\item Three
\end{itemize}
\end{minipage}
\right\} \text{Description}
\]
\[
\left.
\begin{minipage}{2cm}
\begin{itemize}
\item One
\item Two
\item Three
\end{itemize}
\end{minipage}
\right\} \text{Description}
\]
\end{document}
4

Here I introduce the itemized list through \braceditems[width]{items} and the commentary via \mycomment[width]{commentary}. The default widths can be re-specified via \leftwidth and \rightwidth. The brace is just a scaled \} glyph, limited in width to 1.5ex, as specified in the \scalerel* optional argument (see addendum for alternative brace style).

If I knew more about environments, I'm sure I could automate it, but an \addgap is required before the first \braceditems list.

\documentclass{article}
\usepackage{scalerel,lipsum}
\def\leftwidth{.6\textwidth}
\def\rightwidth{.35\textwidth}
\newsavebox\tmpbox
\newcommand\braceditems[2][\leftwidth]{%
  \noindent\savebox{\tmpbox}{%
  \begin{minipage}{#1}
    \begin{itemize}
      #2
    \end{itemize}
  \end{minipage}%
  }%
  \usebox{\tmpbox} \scalerel*[1.5ex]{\}}{\usebox{\tmpbox}}
}
\newcommand\mycomment[2][\rightwidth]{%
  \parbox{#1}{\raggedright #2}\addgap%
}
\newcommand\addgap{\par\bigskip}
\begin{document}
\lipsum[3]
\addgap
\braceditems[2in]{
\item This is 
\item just some text
\item that I'm
}
\mycomment[.15\textwidth]{talk a bit about those}
\braceditems[2in]{
\item using as an 
\item example so that
\item people know what
}
\mycomment[.15\textwidth]{talk a bit about these ones as well}
\braceditems[2in]{
\item I mean as it 
\item might be tricky
\item to describe
\item even when the region is larger than the OP specified.
}
\mycomment[.15\textwidth]{and talk about these}
\lipsum[4]
\end{document}

enter image description here

ADDENDUM:

If by chance you wanted extensible braces common to LaTeX, then this redefinition (requiring the graphicx package) will suffice:

\usepackage{graphicx}
\newcommand\braceditems[2][\leftwidth]{%
  \noindent\savebox{\tmpbox}{%
  \begin{minipage}{#1}
    \begin{itemize}
      #2
    \end{itemize}
  \end{minipage}%
  }%
  \usebox{\tmpbox} \scalerel*[1.5ex]{%
    \raisebox{2pt}{\rotatebox[origin=c]{90}{%
    \makebox[\dimexpr\ht\tmpbox+\dp\tmpbox\relax]{\upbracefill}}}%
    }{\usebox{\tmpbox}}
}

enter image description here

  • thanks a lot Steven I'm off now but I'll get chance to test it tomorrow it looks really good though. Not too sure what you're referring to by 'common to latex' (unless its the style of the brace). Ace, cheers @Steven B. Segletes – baxx Dec 19 '14 at 21:44
  • @user3130747 Yes I mean the style of the brace. Many cringe at the sight of a stretched glyph. For them, the addendum solution would be preferred. – Steven B. Segletes Dec 19 '14 at 22:12
  • works @Steven, thank you! I think the addendum part you added looks better, maybe it's just zoomed in idk - seems a bit 'fuller' though. – baxx Dec 20 '14 at 13:17
  • @user3130747 To make the first version look "fuller", you can change the [1.5ex] argument to \scalerel* to something like [2ex]. But I agree that for most applications, the addendum approach would be preferable. – Steven B. Segletes Dec 20 '14 at 13:25
4

Here are two variants, that use the blkarray and listliketabpackages, and enumitem for the variant that uses an itemize environment. The other variant only mimicks itemize, and is designed for one-lined ‘items’: \documentclass[12pt, a4pape, leqno]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}

\usepackage{blkarray}
\usepackage{enumitem}
\usepackage{listliketab}

\begin{document}


Some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text.

\storestyleof{itemize}
\begin{listliketab}
\begin{blockarray}{@{\hskip\parindent} >{ \arraybackslash}p{6cm}}%
\begin{block}{@{}l<{\enspace}\Right{\}\enspace}{\parbox{2.5cm}{\raggedright talk a bit about these}}}%
\parbox{4cm}{\raggedright\begin{itemize}[leftmargin=1.8em, itemsep = 0ex, topsep = 0pt]
\item this is
\item just some
\item text that I’m
\end{itemize}}\\[4ex]
\end{block}
%
\begin{block}{@{}l<{\enspace}\Right{\}\enspace}{\parbox{2.5cm}{\raggedright talk a bit about these ones as well}}}%
\parbox{4cm}{\raggedright\begin{itemize}[leftmargin=1.8em, itemsep = 0ex, topsep = 0pt]
\item using as an
\item example so that text text text text
\item people know what
\end{itemize}}\\[4ex]
\end{block}
%
\begin{block}{@{} >{}l<{\enspace}\Right{\}\enspace}{\parbox{2.5cm}{\raggedright and talk about these}}}%
\parbox{4cm}{\raggedright\begin{itemize}[leftmargin=1.8em, itemsep = 0ex, topsep = 0pt]
\item I mean as it
\item might be tricky
\item to describe
\end{itemize}}\\
\end{block}
\end{blockarray}
\end{listliketab}

\storestyleof{itemize}
\begin{listliketab}
\renewcommand\arraystretch{1.333}
\begin{blockarray}{@{}>{\arraybackslash}l}%
\begin{block}{@{\hskip0.3\parindent}>{\textbullet\hskip\labelsep}l<{\enspace}\Right{\}\enspace}{\parbox{2.5cm}{\raggedright talk a bit\\ about these}}}%
  this is \\
 just some \\
 text that I’m \\
\end{block}
%
\begin{block}{@{}>{\hskip0.3\parindent\textbullet\hskip\labelsep}l<{\enspace}\Right{\}\enspace}{\parbox{2.5cm}{\raggedright talk a bit about these ones as well}}}%
 using as an \\
example so that text text text text\\
 people know what \\
\end{block}
%
\begin{block}{@{} >{\hskip0.3\parindent\textbullet\hskip\labelsep}l<{\enspace}\Right{\}\enspace}{\parbox{2.5cm}{\raggedright and talk about these}}}%
 I mean as it \\
 might be tricky \\
  to describe\\
\end{block}
\end{blockarray}
\end{listliketab}
\end{document}

enter image description here

  • ace cheers @Bernard – baxx Dec 20 '14 at 13:19
3

If you don't mind the overhead involved in loading TiKZ (or if you are using it for something else anyway), you could use the tikzmark library. The following code defines a new environment, braced which takes a single argument which should be the description you want typeset to the right of the list of items. You then use \item to define the items, as you would in a regular itemize environment. You place \bracefirst after the first item you want included in the braces, \bracelast after the last one, and \bracewidest after the widest one. This means that you can, if you wish, brace a subset of the items in a list:

braced lists

\documentclass{book}
\usepackage{tikz,enumitem}
\usetikzlibrary{tikzmark,decorations.pathreplacing,calc}
\newlist{braceditems}{itemize}{1}
\setlist[braceditems,1]{%
  label=\textbullet,
  before={\stepcounter{braced}},
}
\newcounter{braced}
\setcounter{braced}{0}
\newcommand\bracefirst{\tikzmark{first braced \thebraced}}
\newcommand\bracelast{\tikzmark{last braced \thebraced}}
\newcommand\bracewidest{\tikzmark{widest braced \thebraced}}
\newenvironment{braced}[1]{%
  \providecommand{\braceddescriptor}{#1}%
  \begin{braceditems}%
  }{%
  \end{braceditems}%
  \begin{tikzpicture}[overlay,remember picture]
    \draw [decorate, decoration=brace, xshift=10pt] ($({pic cs:first braced \thebraced} -| {pic cs:widest braced \thebraced}) + (0,1em)$) -- ($({pic cs:last braced \thebraced} -| {pic cs:widest braced \thebraced}) - (0,.5em)$) node [right, midway, xshift=5pt] {\braceddescriptor} ;
  \end{tikzpicture}
}
\begin{document}
  \begin{braced}{Description 1}
    \item One\bracefirst
    \item Two
    \item Three\bracelast\bracewidest
  \end{braced}
  \begin{braced}{Description 2}
    \item One\bracefirst
    \item Two and a bit\bracewidest
    \item Three\bracelast
  \end{braced}
  \begin{braced}{Description 3}
    \item Nought (an unbraced item)
    \item One\bracefirst
    \item Two and a bit\bracewidest
    \item Three\bracelast
    \item Final (outside the braces)
  \end{braced}
\end{document}
  • cheers @cfr, haven't used TiKZ yet though I've seen a few people mention it for drawing things (think I saw some christmas trees with it) – baxx Dec 20 '14 at 13:20
2

A quick solution that comes to my mind is to abuse the cases environment:

\documentclass{minimal}
\usepackage{amsmath}
\begin{document}
$
\mbox{\begin{minipage}{3cm}some long description braking to next line\end{minipage}}
\begin{cases}
\mbox{item 1} \\
\mbox{item 2} \\
\mbox{item 3} 
\end{cases}
$
\end{document}

Yielding this (with a brace on the left side, however):

enter image description here

(Of course, this is not what the cases environment is intended to do... but it does work.)

  • cheers @lukas - I've edited the OP with something similar, it's still not quite there though (the formatting looks off) and in the example you gave the list isn't itemized and the brace is on the left... thanks though! – baxx Dec 19 '14 at 19:17
  • Can you clarify why the edited solution is not good enough? – lukas.coenig Dec 19 '14 at 19:24
  • the format looks off - they don't line up very nicely – baxx Dec 19 '14 at 19:33
  • haven't tested this, but i don't see why you couldn't use a minipage on the right-hand side. then the baselines would line up. (i know there have been answers to similar questions with the brace facing the other direction, but i can't find them.) – barbara beeton Dec 19 '14 at 20:48
  • Please don't use minimal for examples as it is not suitable for this purpose... – cfr Dec 19 '14 at 22:41

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.