题
我正在生产一些乳胶束机幻灯片(但我认为这本身不是比梁特定的问题)。
我有以下内容:
\begin{itemize}
\item Issue1
\item Issue2
\item Issue3
\end{itemize}
现在,我想在散布在第1期中的物品背后有一个正确的卷发(即'}') 和 第2期。当然,我想在那个卷曲的支撑背后写一些东西。
在一个完美的世界中,我会写类似的东西:
\begin{itemize}
\left .
\item Issue1
\item Issue2
\right \} One and Two are cool
\item Issue3
\end{itemize}
这是不起作用的,因为我不在数学环境中,也不能将整个片段放在数学环境中,因为在这种情况下逐项不起作用。
是否有干净的解决方案或骇客来产生我的期望结果?
问候,巴斯蒂安。
解决方案
我会用 tikz
并做一个覆盖。
首先包括适当的包装(您可能不需要包括 tikz
由于这是一个临时问题):
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
然后,当您列出列表时,将每个项目之后的位置命名:
\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}
(笔记: 我转移了 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}
路径在那里处理没有相同宽度的项目。该编辑来自 Esultanik的答案.
结果是:
边注: :您可以删除所有 remember picture
选项并添加以下内容以自动添加到所有图片:
\tikzstyle{every picture}+=[remember picture]
其他提示
您可以(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}
生产:
删除了死去的ImageShack链接
这是带有一些小规模的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}
Ressult(该框架的第二张幻灯片):
改编是:
- 添加了 可见的 命令(因为我认为稍后在支架中混合很有用)
- 使项目更加复杂,因此使用 x shift 变得有必要(我仅通过尝试和错误就弄清了X什的价值,所以那一滴苦涩) 编辑2018-12-23: 可以通过使用手动尝试转移来克服 这 方法:
(n1 -| n2) -- (n2)
代替(n1) -- (n2)
.
解决此问题的一种方法是使用像Align这样的数学环境,手工将子弹点(用 bullet)放置,然后将数学环境的资源用于大括号等。
我曾经做过类似的事情。我让列表在左侧的一列中,在右列中,我做了 $\right\}$
- 以便像某些人一样高 \mbox
或某些东西(我决定 \vphantom
或类似的东西)。不幸的是,我没有时间挖掘它...我实际上现在没有时间来了;)
我在下面尝试了我的想法。它行不通:不幸的是,逐项环境产生的Vbox都有宽度 \textwidth
.
我的建议的UI很好,通过重新定义 \item
应该可以使项目Vbox具有合理的宽度。或计算包含项目的Vbox的合理宽度。但是,由于已经有功能解决方案,所以我将不再花时间了。
\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}