Latex: stretchable curly braces outside math

前端 未结 6 510
一个人的身影
一个人的身影 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 12:09

    I'd use tikz and make an overlay.

    First include the proper packages (you may not need to include tikz since this is a beamer question):

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

    Then when you make your list, give names to the places after each item:

    \begin{itemize}
        \item Issue 1     
            \tikz[remember picture] \node[coordinate,yshift=0.5em] (n1) {}; 
        \item Issue 2
            \tikz[remember picture] \node[coordinate] (n2) {};
        \item Issue 3
    \end{itemize}
    

    (Note: I shifted the y value up by 1/2 of a line maybe more would be better.)

    Because we used remember picture we can refer to these places in an overlay:

      \begin{tikzpicture}[overlay,remember picture]
          \path (n2) -| node[coordinate] (n3) {} (n1);
          \draw[thick,decorate,decoration={brace,amplitude=3pt}]
                (n1) -- (n3) node[midway, right=4pt] {One and two are cool};
      \end{tikzpicture}
    

    The path is there to deal with items that do not have the same width. This edit comes from ESultanik's answer.

    The result is:

    alt text

    Side note: You can remove all of the remember picture options and add the following to automatically add remember to all pictures:

    \tikzstyle{every picture}+=[remember picture]
    

提交回复
热议问题