Allow --slide-level=0.

When the slide level is set to 0, headings won't be used at all
in splitting the document into slides. Horizontal rules must be
used to separate slides.

Closes #7476.
This commit is contained in:
John MacFarlane
2021-08-08 11:20:26 -07:00
parent 6acb674e89
commit c0b68b2030
2 changed files with 9 additions and 7 deletions
+7 -5
View File
@@ -1025,11 +1025,13 @@ header when requesting a document from a URL:
: Specifies that headings with the specified level create
slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headings
above this level in the hierarchy are used to divide the
slide show into sections; headings below this level create
subheads within a slide. The default is to set the slide level based
on the contents of the document; see [Structuring the slide
show].
above this level in the hierarchy are used to divide the slide show
into sections; headings below this level create subheads within a slide.
Valid values are 0-6. If a slide level of 0 is specified, slides will
not be split automatically on headings, and horizontal rules must be used
to indicate slide boundaries. If a slide level is not specified
explicitly, the slide level will be set automatically based on
the contents of the document; see [Structuring the slide show].
`--section-divs`
+2 -2
View File
@@ -576,10 +576,10 @@ options =
(ReqArg
(\arg opt ->
case safeStrRead arg of
Just t | t >= 1 && t <= 6 ->
Just t | t >= 0 && t <= 6 ->
return opt { optSlideLevel = Just t }
_ -> E.throwIO $ PandocOptionError
"slide level must be a number between 1 and 6")
"slide level must be a number between 0 and 6")
"NUMBER")
"" -- "Force header level for slides"