aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANUAL.txt3
-rw-r--r--data/templates/default.context5
2 files changed, 8 insertions, 0 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index a623fddfd..9e582b69d 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1828,6 +1828,9 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
`whitespace`
: spacing between paragraphs, e.g. `none`, `small` (using [`setupwhitespace`])
+`includesource`
+: include all source documents as file attachments in the PDF file
+
[ConTeXt Paper Setup]: https://wiki.contextgarden.net/PaperSetup
[ConTeXt Layout]: https://wiki.contextgarden.net/Layout
[ConTeXt Font Switching]: https://wiki.contextgarden.net/Font_Switching
diff --git a/data/templates/default.context b/data/templates/default.context
index f54b55e74..dcd2dde5d 100644
--- a/data/templates/default.context
+++ b/data/templates/default.context
@@ -105,6 +105,11 @@ $endif$
\setupxtable[body][]
\setupxtable[foot][bottomframe=on]
+$if(includesource)$
+$for(sourcefile)$
+\attachment[file=$curdir$/$sourcefile$,method=hidden]
+$endfor$
+$endif$
$for(header-includes)$
$header-includes$
$endfor$