aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANUAL.txt6
-rw-r--r--src/Text/Pandoc/PDF.hs4
2 files changed, 8 insertions, 2 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index 4594c1127..01d2b7bd3 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -753,6 +753,12 @@ General writer options {.options}
unless `-s/--standalone` is used, and it has no effect
on `man`, `docbook4`, `docbook5`, or `jats` output.
+ Note that if you are producing a PDF via `ms`, the table
+ of contents will appear at the beginning of the
+ document, before the title. If you would prefer it to
+ be at the end of the document, use the option
+ `--pdf-engine-opt=--no-toc-relocation`.
+
`--toc-depth=`*NUMBER*
: Specify the number of section levels to include in the table
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs
index 4f232bf4f..5826f9856 100644
--- a/src/Text/Pandoc/PDF.hs
+++ b/src/Text/Pandoc/PDF.hs
@@ -77,8 +77,8 @@ makePDF program pdfargs writer opts doc =
liftIO $ html2pdf verbosity program pdfargs source
"pdfroff" -> do
source <- writer opts doc
- let args = ["-ms", "-mpdfmark", "-e", "-t", "-k", "-KUTF-8", "-i",
- "--no-toc-relocation"] ++ pdfargs
+ let args = ["-ms", "-mpdfmark", "-mspdf",
+ "-e", "-t", "-k", "-KUTF-8", "-i"] ++ pdfargs
verbosity <- getVerbosity
liftIO $ generic2pdf verbosity program args source
baseProg -> do