Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


generates a document by evaluating all template elements in the notebook nb.

generates a document using args to fill template slots.

writes the generated document in the output file represented by output.

uses args to fill template slots and puts the result in output.


  • 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