Add option to include source files in ConTeXt PDFs (#5578)
Add a metadata option (`includesource`) to attach the source documents to the resulting PDF.
This commit is contained in:
parent
5454aad324
commit
09f30d65e4
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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$
|
||||
|
|
Loading…
Add table
Reference in a new issue