TemplateSlot

TemplateSlot[n]
represents a template slot to be filled from the n^(th) argument when the template is applied.

TemplateSlot[name]
represents a template slot to be filled from an element with key name in an association appearing in the first argument.

Details and OptionsDetails and Options

  • In a string template given as a string, or in a file template, successive indicate TemplateSlot[i] for successive i.
  • The form for integer n corresponds to TemplateSlot[n]. This is analogous to the form #n for Slot.
  • The form for an alphanumeric string name not beginning with digits corresponds to TemplateSlot[1,"name"]. This is analogous to #name for Slot.
  • Within in a string template given as a string, any #p that appear are effectively interpreted as TemplateSlot[p,].
  • In an XMLTemplate, TemplateSlot can be indicated using <wolfram:slot> ... </wolfram:slot>.
  • TemplateSlot supports the following options:
  • InsertionFunctionInheritedhow the value should be formatted
    DefaultValueMissingthe default value to use
Introduced in 2014
(10.0)