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.

DetailsDetails

  • 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^(th) position of args.
  • A named template slot is filled from an element with key 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"].
Introduced in 2014
(10.0)