在 Beamer 中逐项列出/枚举的球内书写

在 Beamer 中逐项列出/枚举的球内书写

我正在做一个 Beamer,但我不知道如何放置这样的东西:

\begin{enumerate}
\item item1
\end{enumerate}

\begin{itemize}
\item[1'] % I want that the 1' appears inside a ball.
\end{itemize}

\begin{enumerate}\setcounter{enumi}{1}
\item item2
\item item3
\end{enumerate}

答案1

自动编号的简便方法:在序言中使用适当的主题:

\usetheme{JuanLesPins} % or Madrid, or ...

同样的困难方式:记得写

\setbeamertemplate{items}[ball]

(...并设置更多内容以获得更有吸引力的演示)。

为了风俗解决方案可以是tikz宏,看起来几乎与默认编号项目一样,但在长项目中,球会变得巨大。在这种情况下,圆角框更优雅。还有其他可能的装饰,无需直接管理 tkiz。例如,menukeys或不带额外包,带\fbox\textcircle(但最后一个不允许超过一位数字)。使用pifont包可以在实心圆中打印一位数字,但任何额外的数字都必须在外面。本 MWE 对这些方法进行了比较:

\documentclass{beamer}
\usetheme{Madrid}
\setbeamercolor{structure}{fg=purple}  
\usepackage{menukeys} % for \keys
\usepackage{pifont}   % for \ding
\usepackage{tikz}

% tkiz ball item
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[circle,ball color=purple, shade, 
 color=white,inner sep=1.2pt] (char) {\tiny #1};}}

% tkiz rounded item
\newcommand*\rounded[1]{\tikz[baseline=(char.base)]{
            \node[draw=none,ball color=purple, shade, 
 color=white, rounded corners=3.5pt, inner sep=2.5pt] (char) {\scriptsize #1};}}


\begin{document}
\begin{frame}{}

 \begin{enumerate}
    \item Default item  
    \item[\circled{2}] Item with {\tt tikz} ball 
    (not so smooth)     
    \item[\circled{3'}] With {\tt tikz} ball (bigger)
    \item[\circled{3''b}] With {\tt tikz} ball (really big) 
    \item[\rounded{4}] With {\tt tikz} roundex box      
    \item[\rounded{4'}] With {\tt tikz} rounded box     
    \item[\rounded{4''b}] With {\tt tikz} rounded box 
    \item[\textcircled{\scriptsize{5}}'] With\textbackslash{\tt texcircled} item (not expandable)
    \item[\large\ding{187}'] With {\tt pifont} (\textbackslash{ding}\{\})   
    \item[\small\keys{7'}] With {\tt menukey}   
    \item[\small\fbox{8'}] With \textbackslash{\tt fbox}    
    \end{enumerate}

\end{frame}

\end{document}

平均能量损失

答案2

我的尝试是采用编程解决方案,即按照自己的喜好绘制项目符号。下面的代码基于 pgfmanual 中的代码(可能在您的磁盘上某处,或者这里), 第 5.1 节 “节点样式”(第 61 页)。

\documentclass[english]{beamer}

\usepackage{tikz}
\begin{document}
\def\bulletmark#1{%
\begin{tikzpicture}[baseline,%
    terminal/.style={ 
    % The shape is a rectangle with rounded corners
    rectangle,minimum size=6,rounded corners=3.8, 
    thin,draw=black!50,       % the width and color of the border 
    fill=blue!70,             % the fill color
            font=\scriptsize\bfseries,% the font size, possibly family
    scale=0.6         % scaling of the resulting drawing
}] 
\node [terminal] at (0,0.1) {\color{white} #1};
\end{tikzpicture} 
}

\begin{frame}
\begin{itemize}
\item [\bulletmark{1}] something
    \begin{itemize}
    \item [\bulletmark{1'}] something
    \item [\bulletmark{2''}] something
        \begin{itemize}
        \item [\bulletmark{3''}] something
        \end{itemize}
    \end{itemize}
\item [\bulletmark{example}] something else
\item [\bulletmark{ex}] something else
\end{itemize}

\end{frame}
\end{document}

结果如下: 子弹测试

相关内容