TemplateWith

TemplateWith["name"value,expr]
represents an element of a template object that evaluates expr after replacing TemplateSlot["name"] with value.

TemplateWith[{"name1"value1,"name2"value2, },expr]
evaluates expr with a list of key-value pairs.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Using TemplateSlot:

In[1]:=
Click for copyable input
Out[1]=

Binding multiple variables:

In[2]:=
Click for copyable input
Out[2]=

Hold evaluation with TemplateExpression:

In[3]:=
Click for copyable input
Out[3]=

Use TemplateWith to transform TemplateSlot data:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 2014
(10.0)