Restructured Text Directives¶
-
.. ifslides::¶ Include the directive contents in the output only when building slides. That is, when one of the Hieroglyph Builders is used.
-
.. ifnotslides::¶ Exclude the contents of the directive from output when building slides. That is, when one of the Hieroglyph Builders is used.
Note
ifslides and ifnotslides were originally
named slides and notslides, respectively. They were renamed
prior to the addition of the slide directive, in order
to be more explicit.
The old names work, but will show a warning during the build process. Expect the old names to be removed in some future version.
-
.. slideconf::¶ Configure slide-related options for the current document.
Some of the Configuration Options options can be overridden on a per document basis.
The
themeoption, if present, will set the theme for document. See the theme documentation for more information on themes.The
autoslidesoption, if present, must beTrueorFalse. If set toTrue, slides will be generated from the document headings and contents. IfautoslidesisFalse, slides will only be created with Sphinx encounters the The slide directive.The
slide_classesoption allows you to specify classes that will be added to slides by default. This allows you, for example, to add a class that applies some styling to the slides. Note that if a slide has an explicit class set (ie, with therst-classdirective), the classes specified here will not be applied.See Per-File Configuration for more information and examples.
-
.. slide::title¶ Create a slide in the document. The directive takes the slide title as its argument, and some optional settings for the slide. For example:
.. slide:: Example Slide :level: 2 This is an example slide. * Bullet 1 * Bullet 2
The
leveloption, if present, will set the level of the slide, which is used for styling slides.By default, content contained in a
slidedirective will be excluded when building non-slide output. You can change this behavior by setting theinline-contentsoption toTrue. Wheninline-contentsis set toTrue, the contents of theslidedirective will be included in all output.The
classoption, if present, will add the given class to the slide output.The following example will set the class
red-slideon the slide output, and include the slide content (the sentence and the bulleted listed, but not the title) in HTML output... slide:: Warning! :level: 2 :class: red-slide :inline-contents: True This error can occur when: * Microwaving metal * Leaving the gas on * Using a frayed electrical cord
-
.. nextslide::title¶ Splits the content at the directive when building slides. An option title may be specified as an argument. If not specified, the title of the current section will be copied.
Consider the following example:
Section Title ============= some content .. nextslide:: additional content
When building slides, this will generate two slides with the name Section Title.
The
incrementargument, if present, will append an index to the slide title.The
classesarguments, if present, contains a list of classes that will be applied to the newly created section.