Latex: stretchable curly braces outside math

前端 未结 6 571
一个人的身影
一个人的身影 2021-02-05 11:38

I am producing some latex beamer slides (but I think it is not a beamer specific question per se).

I have the following:

\\begin{itemize}
\\item Issue1
\         


        
6条回答
  •  甜味超标
    2021-02-05 11:50

    I tried my idea, below. It doesn't work: unfortunately, the vboxes produced by the itemize environment all have width \textwidth.

    The UI of my suggestion is nice, and by redefining \item it should be possible to get the item vboxes be of reasonable width. Or calculate a reasonable width for the vboxes containing the items. But since there are functional solutions already, I won't spend anymore time on this.

    \documentclass{article}
    
    \def\setgrouptext#1{\gdef\grouptext{#1}}
    \newenvironment{groupeditems}{\begin{displaymath}\left.\vbox\bgroup\setgrouptext}{%
      \egroup\right\rbrace\hbox{\grouptext}\end{displaymath}}
    
    \begin{document}
    
    \begin{itemize}
    \item Line 1
    \begin{groupeditems}{Lines 2 and 3 together!}
    \item Line 2
    \item Line 3
    \end{groupeditems}
    \item Line 4
    \end{itemize}
    
    \end{document}
    

提交回复
热议问题