aboutsummaryrefslogtreecommitdiff
path: root/pandoc-lua-engine
diff options
context:
space:
mode:
authorAkash Patel <[email protected]>2024-09-22 13:49:52 -0500
committerGitHub <[email protected]>2024-09-22 11:49:52 -0700
commitca348940e3197180b25a64fdba16df7a62e88b6e (patch)
treebdb537d0750d7db697c1bdaf1ffece568f7063bd /pandoc-lua-engine
parent46ebe25b69d59a670d3b3e2ff61d93c80bfad7f3 (diff)
Add support for list of figures (lof) and list of tables (lot) (#10029)
Two new command-line options are added: `--lof[=true|false]`, `--list-of-figures[=true|false]` `--lot[=true|false]`, `--list-of-tables[=true|false]` Only docx, latex, and context are supported at this point. Setting the `lof` and `lot` variables will also work for the formats that are currently supported. [API changes] + Lua: `list_of_figures` and `list_of_tables` can now be used in writer options. + Text.Pandoc.Options: add `writerListOfFigures` and `writerListOfTables` fields to `WriterOptions`. + Text.Pandoc.App.Opt: add `optListOfFigures` and `optListOfTables` to `Opt`. Closes #8245. Co-authored-by: John MacFarlane <[email protected]>
Diffstat (limited to 'pandoc-lua-engine')
-rw-r--r--pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs
index 16118e8c2..0375059b0 100644
--- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs
+++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs
@@ -145,6 +145,16 @@ typeWriterOptions = deftype "WriterOptions"
(pushBool, writerIncremental)
(peekBool, \opts x -> opts{ writerIncremental = x })
+ , property "list_of_figures"
+ "Include list of figures"
+ (pushBool, writerListOfFigures)
+ (peekBool, \opts x -> opts{ writerListOfFigures = x })
+
+ , property "list_of_tables"
+ "Include list of tables"
+ (pushBool, writerListOfTables)
+ (peekBool, \opts x -> opts{ writerListOfTables = x })
+
, property "listings"
"Use listings package for code"
(pushBool, writerListings)