[Tex/LaTex] How to put curly brace in front of even number of bullets

bracesitemize

I need to put curly braces in front of even number of bullets.
The following post works perfectly for odd number of bullets.

Bullet points and curly braces

how can we modify it to for even number of bullets?

Update:

  • Is is possible to have a general solution that adjusts automatically for the number of bullets that we have.

  • I am using a \documentclass{beamer}. But this should not matter. I ma putting this piece of information since all posted solutions had \documentclass{article}

Snapshot of my editor(left pannel) and PDF(right panel)

enter image description here

Best Answer

enter image description here

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

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

\end{document}

For beamer class, \linewidth is much smaller and you need to put the text into a \parbox to allow text wrap. Note also that itemize environment in beamer is totally different from that in normal classes, so, you may need some manual adjustments:

enter image description here

\documentclass{beamer}
\usepackage{amsmath,lmodern}
\begin{document}

\newcommand{\insm}{%
\smash{\raisebox{.5\dimexpr3\baselineskip+4\itemsep+2\parskip}{$\left.\rule{0pt}{.5\dimexpr4\baselineskip+3\itemsep+3\parskip}\right\}$\ \parbox{5.5cm}{Newton Cotes formulae of different degrees}}}
}

\begin{frame}
\begin{itemize}
  \item Riemann Sum 
  \item Trapezoidal Rule 
  \item Simpson's 1/3 Rule
  \item Simpson's 3/8 Rule \insm
\end{itemize}
\end{frame}

\end{document}

Finally, a flexible tikz solution (since I'm personally fond of tikz, I decided to post an alternative beautiful solution with tikz):

enter image description here

\documentclass{beamer}
\usepackage{amsmath,lmodern,calc,tikz,textcomp}
\usetikzlibrary{tikzmark,calc}
\begin{document}

\newcommand\insm{%
$\left.\rule{0pt}{2.5\baselineskip}\right\}$\parbox{\textwidth-2ex}{%
\begin{itemize}
\item[\textbullet] Newton Cotes formulae ...
\item[\textbullet] Newton Cotes formulae ...
\end{itemize}}
}    
\begin{frame}
\begin{itemize}
  \item Riemann Sum 
  \item Trapezoidal Rule\tikzmark{S}
  \item Simpson's 1/3 Rule\tikzmark{E}
  \item Simpson's 3/8 Rule 
\end{itemize}    
\tikz[remember picture, overlay]{%
\node [shift={(1ex,.6ex)},text width=6.5cm,anchor=west] at ($(pic cs:S)!.5!(pic cs:E)$){\insm};}
\end{frame}

\end{document}