GenerateDocument
GenerateDocument[nb]
generates a document by evaluating all template elements in the notebook nb.
GenerateDocument[nb,args]
generates a document using args to fill template slots.
GenerateDocument[nb,output]
writes the generated document in the output file represented by output.
GenerateDocument[nb,args,output]
uses args to fill template slots and puts the result in output.
Details

- The notebook nb can be an explicit notebook expression, a NotebookObject, or a file name.
- GenerateDocument typically works with template notebooks, which can usually be created interactively.
- If the notebook nb does not contain any template elements, GenerateDocument effectively operates like NotebookEvaluate.
- If the notebook nb contains template elements, GenerateDocument will fill template slots from args.
- A positional template slot i is filled from the i
position of args.
- A named template slot "name" is filled from an element with key "name" in an association appearing in the first position of args.
- A blank template notebook suitable for use with GenerateDocument can be opened in the front end using CreateNotebook["Template"].
Examples
open allclose allSee Also
TemplateApply NotebookTemplate XMLTemplate FileTemplate NotebookEvaluate NotebookPut Export DocumentGenerator
Related Guides
Introduced in 2014
(10.0)