> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/latex/zh-cn/yan-shi-wen-gao/02-powerdot.md).

# Powerdot

**Powerdot** 是一个功能强大的 LaTeX 演示文稿类。它提供了若干特性，使演示者能在很短时间内更轻松地创建外观专业的幻灯片。本文将介绍如何使用 `powerdot`.

## 引言

在 **powerdot**，要创建一张新幻灯片，对应的文本和图片必须放在一个特殊环境中。见下面的示例。

```latex
\documentclass[paper=smartboard]{powerdot}
\title{Powerdot Presentation}
\author{Overleaf}
\date{\today}

\begin{document}

\maketitle

\begin{slide}{Slide Title}
  \begin{itemize}
  \item This is an item
  \item Second item
  \item Third item
  \end{itemize}
\end{slide}
\end{document}
```

&#x20;[打开这个基础 `powerdot` Overleaf 中的示例](https://www.overleaf.com/docs?engine=latex_dvipdf\&snip_name=Minimal+Powerdot+example\&snip=%5Cdocumentclass%5Bpaper%3Dsmartboard%5D%7Bpowerdot%7D%0A%5Ctitle%7BPowerdot+Presentation%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7B%5Ctoday%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cmaketitle%0A%0A%5Cbegin%7Bslide%7D%7BSlide+Title%7D%0A++%5Cbegin%7Bitemize%7D%0A++%5Citem+This+is+an+item%0A++%5Citem+Second+item%0A++%5Citem+Third+item%0A++%5Cend%7Bitemize%7D%0A%5Cend%7Bslide%7D%0A%5Cend%7Bdocument%7D)

打开上面的示例将创建一个项目，生成这两张幻灯片：

![OLPowerdot1f.png](/files/31c096f07b2d3b6b8559a964392e1d34dda5cca6)

![OLPowerdot2f.png](/files/11edc8d2d9ce2247e0c44f19f2c7b5d19bdc4c69)

在一个 `powerdot` 文档中，第一条命令必须是加载 `powerdot` 类；例如：

```latex
\documentclass[paper=smartboard]{powerdot}
```

其中 `[paper=smartboard]` 用于设置演示幻灯片的尺寸。参见 [`powerdot` 文档](http://mirrors.ctan.org/macros/latex/contrib/powerdot/doc/powerdot.pdf) 以获取更多 `paper` 选项值。之后，常规数据（作者、标题和日期）可以包含在导言区中。在文档中，命令 `\maketitle` 和 `\section` 将创建一张新幻灯片来显示相应的信息。

在标签之间 `\begin{slide}` 和 `\end{slide}` 新幻灯片的内容必须输入。幻灯片标题可以在打开命令后面的花括号中作为可选参数设置。在示例中，标题是 "Slide Title"。

**注意**：要编译一个 `powerdot` 文档（例如，在 Overleaf 上），你需要使用 `latex` 编译器，而不是 `pdflatex` 或 `xelatex`.

## 基本用法

可以向类声明命令添加一些额外参数。

```latex
\documentclass[
    mode=print,
    paper=smartboard,
    orient=landscape
]{powerdot}

% 演示文稿元数据
\title{Powerdot Presentation}
\author{Overleaf}
\date{\today}

\begin{document}
\maketitle

% section: 标题占据整张幻灯片
\section{First section}

\begin{slide}{Slide Title}
    \begin{itemize}
    \item This is an item
    \item Second item
    \item Third item
    \end{itemize}
\end{slide}

\begin{slide}{Slide N 2}
    这是第 2 张幻灯片的内容。
    Math $x=2\pi r$。
\end{slide}
\end{document}
```

&#x20;[打开此 `powerdot` Overleaf 中的文档](https://www.overleaf.com/docs?engine=latex_dvipdf\&snip_name=Powerdot+document+example\&snip=%5Cdocumentclass%5B%0A++++mode%3Dprint%2C%0A++++paper%3Dsmartboard%2C%0A++++orient%3Dlandscape%0A%5D%7Bpowerdot%7D%0A%0A%25+Presentation+metadata%0A%5Ctitle%7BPowerdot+Presentation%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7B%5Ctoday%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A+++++%0A%25+section%3A+title+takes+up+full+slide%0A%5Csection%7BFirst+section%7D%0A+++++++++++%0A%5Cbegin%7Bslide%7D%7BSlide+Title%7D%0A++++%5Cbegin%7Bitemize%7D%0A++++%5Citem+This+is+an+item%0A++++%5Citem+Second+item%0A++++%5Citem+Third+item%0A++++%5Cend%7Bitemize%7D%0A%5Cend%7Bslide%7D%0A+++++++++++++++++++++++++++++++++++++++++%0A%5Cbegin%7Bslide%7D%7BSlide+N+2%7D%0A++++This+is+the+content+of+slide+2.%0A++++Math+%24x%3D2%5Cpi+r%24.%0A%5Cend%7Bslide%7D%0A%5Cend%7Bdocument%7D)

在此示例中，若干选项在命令的方括号内设置 `\documentclass[...]{powerdot}`:

**mode=print**

此模式可用于打印幻灯片，它会删除叠层和过渡效果。还有其他模式，其中 presentation 是演示的默认模式；handout 会生成幻灯片的黑白概览，每页打印两张幻灯片。

**paper=smartboard**

这是在电子白板或宽屏上进行演示时使用的纸张尺寸。其他纸张尺寸包括 screen（4/3 比例）、a4paper 和 letterpaper。

**orient=landscape**

文档方向。可能的值有 landscape 和 portrait

**注意**：如果你想查看更完整的示例，请在 Overleaf 中打开以下项目：

&#x20;[打开一个更大的 `powerdot` Overleaf 中的示例](https://www.overleaf.com/project/new/template/19031?id=63931899\&templateName=Powerdot+Presentation+Example\&latexEngine=latex_dvipdf\&texImage=texlive-full%3A2020.1\&mainFile=main.tex)

## 添加注释

在 `powerdot` 可以为幻灯片添加注释，以帮助演示者。

```latex
\documentclass[
    display=notes,
    mode=print,
    paper=smartboard,
    orient=landscape
]{powerdot}

% 演示文稿元数据
\title{Powerdot Presentation}
\author{Overleaf}
\date{\today}

\begin{document}
\maketitle

% section: 标题占据整张幻灯片
\section{First section}

\begin{slide}{Slide Title}
    \begin{itemize}
    \item This is an item
    \item Second item
    \item Third item
    \end{itemize}
\end{slide}
\begin{note}{About items}
    指出项目列表可以自定义。
\end{note}
\end{document}
```

&#x20;[打开此 `powerdot` Overleaf 中的示例](https://www.overleaf.com/docs?engine=latex_dvipdf\&snip_name=Powerdot+example+with+notes\&snip=%5Cdocumentclass%5B%0A++++display%3Dnotes%2C%0A++++mode%3Dprint%2C%0A++++paper%3Dsmartboard%2C%0A++++orient%3Dlandscape%0A%5D%7Bpowerdot%7D%0A%0A%25+Presentation+metadata%0A%5Ctitle%7BPowerdot+Presentation%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7B%5Ctoday%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A+++++%0A%25+section%3A+title+takes+up+full+slide%0A%5Csection%7BFirst+section%7D%0A+++++++++++%0A%5Cbegin%7Bslide%7D%7BSlide+Title%7D%0A++++%5Cbegin%7Bitemize%7D%0A++++%5Citem+This+is+an+item%0A++++%5Citem+Second+item%0A++++%5Citem+Third+item%0A++++%5Cend%7Bitemize%7D%0A%5Cend%7Bslide%7D%0A%5Cbegin%7Bnote%7D%7BAbout+items%7D%0A++++Mention+that+lists+of+items+can+be+customised.%0A%5Cend%7Bnote%7D%0A%5Cend%7Bdocument%7D)

要创建注释，必须在相应幻灯片的正下方使用 `note` 环境。其语法与 `幻灯片` 环境相同，你也可以为注释设置标题。

要仅渲染注释，需将选项 `display=notes` 传递给文档类命令。此参数的其他值有： `slidesnotes` ，它会同时打印注释和幻灯片，以及 `幻灯片` ，它只打印幻灯片。

**注意**：如果你想查看更完整的示例，请在 Overleaf 中打开以下项目：

&#x20;[打开一个更大的 `powerdot` Overleaf 中的示例](https://www.overleaf.com/project/new/template/19031?id=63931899\&templateName=Powerdot+Presentation+Example\&latexEngine=latex_dvipdf\&texImage=texlive-full%3A2020.1\&mainFile=main.tex)

## 样式和调色板

Powerdot 演示文稿的外观可以通过样式和调色板来改变。样式决定演示文稿的整体外观，而调色板决定样式中使用的颜色集合。

```latex
\documentclass[
    style=sailor,
    paper=smartboard
]{powerdot}

\pdsetup{palette=Chocolate}

...
```

![PowerdotEx4Chocolate.PNG](/files/ca0c1c3d82b2a61bef0b8c20414f5a15c567cd83)

可以将一些额外选项传递给 `\documentclass` 上一个示例中的，用于改变幻灯片外观：

**style=sailor**

设置 sailor 样式。

其他选项，例如 `palette` 可以包含在 `\pdsetup{...}`.

**\pdsetup{palette=Chocolate}**

设置巧克力色调色板。

请参见 [参考指南](#reference-guide) 了解可用样式和调色板的列表。

&#x20;[在 Overleaf 中打开 powerdot 宏包的示例](https://www.overleaf.com/project/new/template/19031?id=63931899\&templateName=Powerdot+Presentation+Example\&latexEngine=latex_dvipdf\&texImage=texlive-full%3A2020.1\&mainFile=main.tex)

## 过渡效果

可以为 powerdot 演示文稿添加过渡效果，使其更具视觉吸引力。

```latex
\documentclass[
    style=sailor,
    display=slides,
    paper=smartboard,
    orient=landscape,
]{powerdot}

\pdsetup{trans=Split}
...
```

![PowerdotEx5.png](/files/70fc2684ed7c5ce9b821c64bf8633e0689b85170)

在此示例中，一种名为 `Split` 的过渡效果通过命令添加到演示文稿中

```latex
\pdsetup{trans=Split}
```

它通过将新幻灯片分割开，并使两半分别动画显示在屏幕上。此类效果依赖于 PDF 查看器，并且在全屏模式下受最常见的查看器支持。

其他可能的过渡效果有

* `Blinds`
* `Box`
* `Wipe`
* `Dissolve`
* `Glitter`
* `Replace`
* `Fly`
* `Push`
* `Cover`
* `Uncover`
* `Fade`

&#x20;[在 Overleaf 中打开 powerdot 宏包的示例](https://www.overleaf.com/project/new/template/19031?id=63931899\&templateName=Powerdot+Presentation+Example\&latexEngine=latex_dvipdf\&texImage=texlive-full%3A2020.1\&mainFile=main.tex)

## 叠层

特殊命令可用于只显示幻灯片的某些元素，而不是整个内容。实现这一点有两种方式。

|                                                                                                                                                                                                                                                                                             |                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `latex<br>\begin{slide}{Slide Title}<br>You can see a list of items below. \pause \\<br>There are commands to make them appear sequentially<br> \begin{itemize}[type=1]<br> \item<2> This is an item<br> \item<3> Second item<br> \item<4> Third item<br> \end{itemize}<br>\end{slide}<br>` | ![PowerdotEx6.gif](/files/3f480e79553f25e049f92672a09979ae5a76e0fb) |

与叠层相关的两个命令是：

* `\pause` 它会显示从该命令开始直到下一叠层之前的文本，
* `\begin{itemize}[type=1]` 额外参数使 `itemize` 和 `enumerate` 环境中的叠层成为可能。可以使用 `\pause` 命令，或者像示例中那样，为每个 `条目`。此额外参数决定哪些叠层显示当前条目。例如，第一个条目仅出现在第二个叠层上。

在 `\item` 命令中，其他可能的额外参数语法示例如下：

* `\item<-2>`。此条目将显示在除第二个之外的所有叠层中。
* `\item<2->`。此条目将出现在从第二个叠层开始的所有叠层中。
* `\item<2-5>`。此条目将从第 2 个叠层打印到第 5 个叠层。

&#x20;[在 Overleaf 中打开 powerdot 宏包的示例](https://www.overleaf.com/project/new/template/19031?id=63931899\&templateName=Powerdot+Presentation+Example\&latexEngine=latex_dvipdf\&texImage=texlive-full%3A2020.1\&mainFile=main.tex)

## 幻灯片中的原样文本

演示文稿中的某些内容需要特殊命令。例如，要将原样文本添加到幻灯片中，必须向 `powerdot` \usepackage{listings} `幻灯片` 环境中。

```latex
\documentclass[
    style=sailor,
    display=slides,
    paper=smartboard,
    orient=landscape,
]{powerdot}

\lstnewenvironment{code}{%
\lstset{frame=single,escapeinside=`',
backgroundcolor=\color{yellow!20},
  basicstyle=\footnotesize \ttfamily}
  \begin{slide}[method=direct]{Slide 2}
}{}

\begin{document}
\begin{slide}[method=direct]{Slide 2}
 步骤 1 和 2：
 \begin{code}
    compute a;

    compute b;
 \end{code}
\end{slide}
\end{document}
```

&#x20;[打开此 `powerdot` Overleaf 中的文档](https://www.overleaf.com/docs?engine=latex_dvipdf\&snip_name=Verbatim+code+in+Powerdot\&snip=%5Cdocumentclass%5B%0A++++style%3Dsailor%2C%0A++++display%3Dslides%2C%0A++++paper%3Dsmartboard%2C%0A++++orient%3Dlandscape%2C%0A%5D%7Bpowerdot%7D%0A%0A%5Cusepackage%7Blistings%7D%0A%5Clstnewenvironment%7Bcode%7D%7B%25%0A%5Clstset%7Bframe%3Dsingle%2Cescapeinside%3D%60%27%2C%0A++backgroundcolor%3D%5Ccolor%7Byellow%2120%7D%2C%0A++basicstyle%3D%5Cfootnotesize+%5Cttfamily%7D%0A%7D%7B%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bslide%7D%5Bmethod%3Ddirect%5D%7BSlide+2%7D%0A+Steps+1+and+2%3A%0A+%5Cbegin%7Bcode%7D%0A++++compute+a%3B%0A%0A++++compute+b%3B%0A+%5Cend%7Bcode%7D%0A%5Cend%7Bslide%7D%0A%5Cend%7Bdocument%7D)

![PowerdotEx7.png](/files/09cc095a93320f4dec754d130e4b7ee715261a06)

方括号中的参数 `method=direct` 对于向幻灯片中添加原样文本是必需的，但不允许使用叠层。另一种选择是使用 `method=file` 它允许原样文本和叠层，但如果许多幻灯片都使用此方法，可能会很慢。

&#x20;[在 Overleaf 中打开 powerdot 宏包的示例](https://www.overleaf.com/project/new/template/19031?id=63931899\&templateName=Powerdot+Presentation+Example\&latexEngine=latex_dvipdf\&texImage=texlive-full%3A2020.1\&mainFile=main.tex)

## 参考指南

下面列出了所有官方 **powerdot** 样式以及对应样式的所有可用调色板。

|           | 主页                                                                | 内页                                                                | 调色板                                                                                                    |
| --------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| simple    | ![Style1P1.png](/files/364c883119df1883f831c677a7a9198680653684)  | ![Style1P2.png](/files/8ca43001d04951561890339773d1131bdda53315)  |                                                                                                        |
| tycja     | ![Style2P1.png](/files/c00692e03489e29130131d5c49e8a5c57c8204ec)  | ![Style2P2.png](/files/fb1012d8c34ab963613aed2c22d8560fd77d3dc1)  |                                                                                                        |
| ikeda     | ![Style3P1.png](/files/b689d2a3e053fb8d47248955a88e6beefa024957)  | ![Style3P2.png](/files/60ec6784d114aee265724c48a1fb5a502e330eb1)  |                                                                                                        |
| fyma      | ![Style4P1.png](/files/c5f70f8e3edbaf97d3bdc981b53b04d017bc48cc)  | ![Style4P2.png](/files/c201a9478b56ac38ebff5b2c21ce8a6554c2316e)  | 蓝色、绿色、灰色、棕色、橙色                                                                                         |
| ciment    | ![Style5P1.png](/files/997408b42aefcb73ad67d6f0aa15b1babd364bac)  | ![Style5P2.png](/files/be72d3f750495c51c4b849e93a1411c59dc1d9e3)  |                                                                                                        |
| elcolors  | ![Style6P1.png](/files/4903a206d49c36b0b76c713276239ec56ec90433)  | ![Style6P2.png](/files/2d67b5f220e232f37167e08d0419fa92e8226743)  |                                                                                                        |
| aggie     | ![Style7P1.png](/files/6a3ece52d53534cd7c4615cbd6be0b814ed3f800)  | ![Style7P2.png](/files/de71139ab555303e72dfe938a57d77492a1fef35)  |                                                                                                        |
| husky     | ![Style8P1.png](/files/4ebb75ee1569c52c4d0099440d9301e05c838cdb)  | ![Style8P2.png](/files/0e89b02bd0b205a39238532f5db51ab8c3f10c3b)  |                                                                                                        |
| sailor    | ![Style9P1.png](/files/35c3830854324d3dc93326d004c9bcba96a50e4f)  | ![Style9P2.png](/files/727826a7601ab9c7157a2e6e06db02f76bedf288)  | 河流、葡萄酒、巧克力、鸡尾酒                                                                                         |
| upen      | ![Style10P1.png](/files/bb691038e4b8a75f7f80540d7c2f7e740bc37ef7) | ![Style10P2.png](/files/117fa1d2ecd16e852b7a73e30fdbd4a4dd6e8833) |                                                                                                        |
| bframe    | ![Style11P1.png](/files/7a77cfa2ac6751fe0e4b7f366492a70f9888cf00) | ![Style11P2.png](/files/005f88c8242cb8f62b821502e9d11fd8159415bd) |                                                                                                        |
| horatio   | ![Style12P1.png](/files/26aef79654765ee4049e1696246af97b17d68ec0) | ![Style12P2.png](/files/5e0d455bc2ceb64e5e782cff2dba9315f0f1d588) |                                                                                                        |
| paintings | ![Style13P1.png](/files/bf291cde361dc31b0713308b6d1368b2275994d3) | ![Style13P2.png](/files/c554ca51b09592701b96c9693538d4c7c8295428) | Syndics, Skater, GoldenGate, Moitessier, PearlEarring, Lamentation, HolyWood, Europa, MayThird, Charon |
| klope     | ![Style14P1.png](/files/b3be8397f9dd6e48ac16d867247abc29b02b9356) | ![Style14P2.png](/files/321461540b5e72ca05bc256b1f8452dd86d20b21) | Spring, PastelFlower, BlueWater, BlackWhite                                                            |
| jefka     | ![Style15P1.png](/files/d7f098e5073f4a4d58a0de2176e53d0a159d191d) | ![Style15P2.png](/files/c4dca78fd4b011816a8a7f40f231162f1efee08c) | 棕色、海绿色、蓝色、白色                                                                                           |
| pazik     | ![Style16P1.png](/files/6f4c0d575de985dd247b48aa49b37aa1aeaced02) | ![Style16P2.png](/files/877bd1234a1c23fe4daa70668bbe10d850ad9228) | 红色、棕色                                                                                                  |

## 进一步阅读

更多信息请参见

* [Beamer](/latex/zh-cn/yan-shi-wen-gao/01-beamer.md)
* [海报](/latex/zh-cn/yan-shi-wen-gao/03-posters.md)
* [粗体、斜体和下划线](/latex/zh-cn/latex-ji-chu/03-bold-italics-and-underlining.md)
* [字体大小、字体族和样式](/latex/zh-cn/zi-ti/01-font-sizes-families-and-styles.md)
* [文本对齐](/latex/zh-cn/ge-shi-hua/06-text-alignment.md)
* [字体类型](/latex/zh-cn/zi-ti/02-font-typefaces.md)
* [插入图片](/latex/zh-cn/geng-duo-zhu-ti/27-inserting-images.md)
* [在 LaTeX 中使用颜色](/latex/zh-cn/ge-shi-hua/13-using-colors-in-latex.md)
* [LaTeX 中的长度](/latex/zh-cn/ge-shi-hua/01-lengths-in-latex.md)
* [国际语言支持](/latex/zh-cn/yu-yan/03-international-language-support.md)
* [该 **powerdot** 文档](ftp://bay.uchicago.edu/tex-archive/macros/latex/contrib/powerdot/doc/powerdot.pdf)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/latex/zh-cn/yan-shi-wen-gao/02-powerdot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
