乳胶:数学之外的可伸缩花括号

ckn*_*oll 17 latex beamer tikz

我正在制作一些乳胶投影仪幻灯片(但我认为这本身并不是一个特定于投影仪的问题).

我有以下内容:

\begin{itemize}
\item Issue1
\item Issue2
\item Issue3
\end{itemize}
Run Code Online (Sandbox Code Playgroud)

现在,我希望在issue1 issue2上传播的项目背后有一个正确的大括号(即'}').当然,我想在大括号后面写点东西.

在一个完美的世界里,我会写一些类似于:

\begin{itemize}
\left .
\item Issue1
\item Issue2
\right \} One and Two are cool
\item Issue3
\end{itemize}
Run Code Online (Sandbox Code Playgroud)

这不起作用,因为我不在数学环境中而且我不能将整个片段放在数学环境中,因为在这种情况下,itemize不起作用.

是否有一个干净的解决方案或黑客来产生我想要的结果?

此致,巴斯蒂安.

Geo*_*off 21

我会使用tikz并制作叠加层.

首先包括正确的包(您可能不需要包括,tikz因为这是一个投影仪问题):

\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
Run Code Online (Sandbox Code Playgroud)

然后,当您创建列表时,为每个项目后的位置命名:

\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}
Run Code Online (Sandbox Code Playgroud)

(注意:我将y值向上移动了一条线的1/2可能会更好.)

因为我们使用过,remember picture我们可以在叠加中引用这些地方:

  \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}
Run Code Online (Sandbox Code Playgroud)

路径用于处理宽度不同的项目.此编辑来自ESultanik的答案.

结果是:

替代文字

附注:您可以删除所有remember picture选项并添加以下内容以自动添加记住所有图片:

\tikzstyle{every picture}+=[remember picture]
Run Code Online (Sandbox Code Playgroud)


Bar*_*ers 11

您可以(ab)使用表格:

\documentclass{article}
\usepackage{multirow}

\begin{document}

\begin{tabular}{ll}

\textbullet Issue 1 & \multirow{2}{*}{{\LARGE \}} One and Two are cool} \\
\textbullet Issue 2                                                     \\
\textbullet Issue 3                                                     \\

\end{tabular}

\end{document}
Run Code Online (Sandbox Code Playgroud)

生产:

删除死了Imageshack链接

  • 使用`\ textbullet`而不是`$\bullet $` (2认同)

ckn*_*oll 6

这是Geoffs代码的一些小适应(仅适用于其他beamer用户)

\begin{frame}{Example}

\begin{itemize}
\item The long Issue 1
\tikz[remember picture] \node[coordinate,yshift=0.7em] (n1) {}; \\
spanning 2 lines


\item Issue 2
  \tikz[remember picture] \node[coordinate, xshift=1.597cm] (n2) {};
\item Issue 3

\end{itemize}

\visible<2->{
\begin{tikzpicture}[overlay,remember picture]
  \draw[thick,decorate,decoration={brace,amplitude=5pt}]
        (n1) -- (n2) node[midway, right=4pt] {One and two are cool};
\end{tikzpicture}
 } % end visible

\end{frame}
Run Code Online (Sandbox Code Playgroud)

Ressult(那帧的第二张幻灯片):

投影仪结果

适应性是:

  • 添加了可见命令(因为我认为以后混合括号是有用的)
  • 使项目变得更加复杂,因此xshift的使用变得必要(我只是通过尝试和错误来计算xshift值以便产生一点苦味)编辑2018-12-23:手动尝试错误移位可以通过使用来克服这个方法:(n1 -| n2) -- (n2)而不是(n1) -- (n2).