> For the complete documentation index, see [llms.txt](https://overleaf-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://overleaf-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 演示}
\author{Overleaf}
\date{\today}

\begin{document}

\maketitle

\begin{slide}{幻灯片标题}
  \begin{itemize}
  \item 这是一个条目
  \item 第二项
  \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 演示}
\author{Overleaf}
\date{\today}

\begin{document}
\maketitle

% section：标题占据整张幻灯片
\section{第一节}

\begin{slide}{幻灯片标题}
    \begin{itemize}
    \item 这是一个条目
    \item 第二项
    \item 第三个条目
    \end{itemize}
\end{slide}

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

&#x20;[在 Overleaf 中打开此 `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**

此模式可用于打印幻灯片，它会删除叠加层和过渡效果。还有其他模式，其中 present 是演示的默认模式；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 演示}
\author{Overleaf}
\date{\today}

\begin{document}
\maketitle

% section：标题占据整张幻灯片
\section{第一节}

\begin{slide}{幻灯片标题}
    \begin{itemize}
    \item 这是一个条目
    \item 第二项
    \item 第三个条目
    \end{itemize}
\end{slide}
\begin{note}{关于条目}
    提到条目列表可以自定义。
\end{note}
\end{document}
```

&#x20;[在 Overleaf 中打开此 `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}{幻灯片标题}<br>你可以在下方看到一个条目列表。 \pause \\<br>有一些命令可以让它们按顺序出现<br> \begin{itemize}[type=1]<br> \item<2> 这是一个条目<br> \item<3> 第二个条目<br> \item<4> 第三个条目<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>`。该条目会从第二层打印到第五层。

&#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}

\usepackage{listings}
\lstnewenvironment{code}{%
\lstset{frame=single,escapeinside=`',
  backgroundcolor=\color{yellow!20},
  basicstyle=\footnotesize \ttfamily}
}{}

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

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

&#x20;[在 Overleaf 中打开此 `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)  | River、Wine、Chocolate、Cocktail                                                                 |
| 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) | brown、seagreen、blue、white                                                                     |
| pazik     | ![Style16P1.png](/files/6f4c0d575de985dd247b48aa49b37aa1aeaced02) | ![Style16P2.png](/files/877bd1234a1c23fe4daa70668bbe10d850ad9228) | red、brown                                                                                     |

## 进一步阅读

更多信息请参见

* [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://overleaf-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.
