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.

Details

Examples

Basic Examples  (1)

Using TemplateSlot:

Binding multiple variables:

Hold evaluation with TemplateExpression:

Use TemplateWith to transform TemplateSlot data:

Wolfram Research (2014), TemplateWith, Wolfram Language function, https://reference.wolfram.com/language/ref/TemplateWith.html.

Text

Wolfram Research (2014), TemplateWith, Wolfram Language function, https://reference.wolfram.com/language/ref/TemplateWith.html.

CMS

Wolfram Language. 2014. "TemplateWith." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TemplateWith.html.

APA

Wolfram Language. (2014). TemplateWith. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TemplateWith.html

BibTeX

@misc{reference.wolfram_2024_templatewith, author="Wolfram Research", title="{TemplateWith}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/TemplateWith.html}", note=[Accessed: 18-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_templatewith, organization={Wolfram Research}, title={TemplateWith}, year={2014}, url={https://reference.wolfram.com/language/ref/TemplateWith.html}, note=[Accessed: 18-November-2024 ]}