aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-08-08 11:20:26 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-08-08 11:20:26 -0700
commitc0b68b2030ecdb4ad006443a56ce99aebc92fbc5 (patch)
treeb6674dc9ec797417540e0a8cdd1fc014fb4bdd95
parent6acb674e899e37bbc352a493f956858f7102bc7d (diff)
downloadpandoc-c0b68b2030ecdb4ad006443a56ce99aebc92fbc5.tar.gz
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.
-rw-r--r--MANUAL.txt12
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs4
2 files changed, 9 insertions, 7 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index 8f57a36a4..d4f922529 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -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`
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index a6df12715..d2c12573c 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -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"