6

In the following examples,

how can I put the curly braces at the left side?

\begin{itemize}
  \item Riemann Sum
  \item Trapezoidal Rule
  \item
  Simpson's 1/3 Rule
    $\smash{\left.\rule{0pt}{.5\dimexpr3\baselineskip+2\itemsep+2\parskip}\right\}
      \text{Newton Cotes formulae of different degrees}}$
  \item Simpson's 3/8 Rule
\end{itemize}

BTW, is there any method which avoids using math mode?

latex curly braces

I have tried the following which has failed as well:

$\left\{\text{
\begin{itemize}
\item item 1
\item item 2
\item item 3
\end{itemize}
}\right.$
3
  • The solutions with tikz avoid math mode, but tikz is a big machine too. Commented Feb 18, 2017 at 8:30
  • @AndrewSwann, is there any available example?
    – ar2015
    Commented Feb 18, 2017 at 11:18
  • tikz code added to answer, but it is not simpler. Commented Feb 18, 2017 at 11:36

1 Answer 1

10

You can use a minipage as follows:

Sample output

\documentclass{article}

\begin{document}

\begin{itemize}
\item Riemann Sum
\item Newton Cotes formulae of different degrees
  \(
  \left\{ \quad
    \begin{minipage}[c]{0.3\linewidth}
    \item Trapezoidal Rule
    \item Simpson's \( 1/3 \) Rule
    \item Simpson's \( 3/8 \) Rule
    \end{minipage}
  \right.
  \)
\end{itemize}

\end{document}

Alternatively you can use a tabular:

\documentclass{article}

\begin{document}

\begin{itemize}
\item Riemann Sum
\item Newton Cotes formulae of different degrees
  \(
  \left\{
    \begin{tabular}{@{\textbullet\enspace}l}
      Trapezoidal Rule \\
      Simpson's \( 1/3 \) Rule \\
      Simpson's \( 3/8 \) Rule
    \end{tabular}
    \right.
  \)
\end{itemize}

\end{document}

Sample output

This avoids having to specify the width, but means that you have to provide the itemize-like markup yourself.

As Schweinebacke points out there is also the varwidth environment from the varwidth package, that will replace minipage and you just specify a maximum width. However it behaves slightly differently: the itemize list is now at second level, so by default bullets are replaced by dashes, and there is a considerable left margin indentation. So if want the same type of appearance as before you need to modify the itemize style, e.g. via the enumitem package:

\documentclass{article}

\usepackage{varwidth}
\usepackage{enumitem}

\begin{document}

\begin{itemize}
\item Riemann Sum
\item Newton Cotes formulae of different degrees
  \(
  \left\{
    \begin{varwidth}{\textwidth}
      \begin{itemize}[label=\textbullet,leftmargin=1em]
      \item Trapezoidal Rule
      \item Simpson's \( 1/3 \) Rule
      \item Simpson's \( 3/8 \) Rule
      \end{itemize}
    \end{varwidth}
    \right.
  \)
\end{itemize}

\end{document}

If you really want to avoid math mode and use tikz then you can use

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calc}

\begin{document}

\begin{itemize}
\item Riemann Sum
\item Newton Cotes formulae of different degrees
  \begin{tikzpicture}[baseline]
    \node[inner ysep=0pt] (A) at (0,0) {
    \begin{tabular}{@{\textbullet\enspace}l}
      Trapezoidal Rule \\
      Simpson's \( 1/3 \) Rule \\
      Simpson's \( 3/8 \) Rule
    \end{tabular}};
    \draw [decoration={brace,amplitude=0.5em},decorate,thick]
    (A.south west) -- (A.north west);
  \end{tikzpicture}
\end{itemize}

\end{document}

which is at tabular at heart. In my opinion, the math mode option is easier.

4
  • is there also a possibility which does not require specifying a width?
    – jakun
    Commented Feb 18, 2017 at 8:34
  • 2
    @jakun Try varwidth with varwidth instead of minipage. Commented Feb 18, 2017 at 8:37
  • 2
    A suggestion: Load the amsmath package and wrap the material from \left\{ thru \right. in a \smash[t]{...} macro. This will give tighter spacing between the two "outer" itemize entries.
    – Mico
    Commented Feb 18, 2017 at 10:44
  • @Mico Yes, that would give the posters overlapping layout, but would not be appropriate if the previous line is longer. Commented Feb 18, 2017 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .