Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [templates]

Questions on working with templates in Mathematica, File/String/Notebook/Expression Templates and the functions used for manipulations like TemplateApply.

0
votes
0answers
29 views

How to automatically see user defined function arguments list?

Having typed a user-created function's name I would like to be able to see either the concise syntax dropdown available for inbuilt functions (shown below left) or alternatively to be able to see the ...
3
votes
1answer
39 views

InitializationFunction for TemplateObject

Shortly, I want something like this to work: ...
1
vote
0answers
27 views

How can I launch GenerateDocument with a template file on multiple kernels in a batch fashion?

I am trying to do automated testing of my MMA package by launching test cases that are generated on-the-fly with GenerateDocument and a template document, and then evaluated with NotebookEvaluate. I ...
2
votes
0answers
70 views

How to refresh a TemplateSlot in a dynamic FormFunction?

I am building a FormFunction that makes use of a TemplateSlot to define a field. This minimal example demonstrates the issue. <...
2
votes
1answer
86 views

Building template object routines

I'm interested in building a website theme with Mathematica's XMLTemplate as proposed by C. E. here. The problem is, Mathematica's template syntax is verbose and a ...
3
votes
1answer
115 views

How to use StringTemplate for code?

Say, I want to write a MMA script using StringTemplate, so I can insert additional pieces of code / expressions wherever ...
4
votes
1answer
105 views

How to make TeXForm use TemplateBox to generate code?

If I define the TraditionalForm formatting of myFunction without TemplateBox, then ...
0
votes
0answers
18 views

Delete a Line that doesn't match any cell [duplicate]

I wrote my notebook using a mathematica style template. At the beginning I have that line, Confidential How can I delete that keeping the template?
7
votes
1answer
122 views

Changes in TemplateApply/StringTemplate in V11

Bug introduced in V11.0.0 and fixed in V11.2 [CASE:3821295] It seems that in v11+ arguments are not injected into held StringTemplate, in contrary to how it ...
10
votes
1answer
162 views

User defined template completion with symbols instead of placeholder

In Mathematica 9, the following usage definition generates the corresponding template (obtained by ctrl+shift+K after typing out ...
18
votes
1answer
324 views

The character sequence “\\. d” triggers line break in strings

Bug introduced in 7.0 or earlier and persists through 11.0.0 Bug isn't present in version 5.2 Update: Sjoerd pointed out that this happens with any string and it is not related to StringForm. Just ...
0
votes
1answer
97 views

How to generate a series of iterable slots in a template notebook?

How can I generate a seires of iterable slots in template notebook I can later loop over and assign values to? For example: I could generate this manually by typing out each one. However, it gets ...
5
votes
2answers
321 views

Simpler way to type Derivative[1, 0][u][0, x]

Though not unbearable, I always feel a little nervous when typing partial derivatives at a specified place e.g. $u^{(1,0)}(0,x)$, which happens a lot when setting initial/boundary conditions for PDEs. ...
1
vote
0answers
46 views

Why does TemplateApply create two identical notebook objects?

Bug introduced in 10.1 or earlier and fixed in 10.4 TemplateApply is new in 10.0 If you start a fresh Mathematica session (front end and all), and run the ...
10
votes
5answers
467 views

Backquote in string template?

I need to have backquotes in a StringTemplate. For example StringTemplate["``1``"][2] Returns ...
1
vote
0answers
241 views

In a Template Notebook how to make a Repeating Block loop over a local variable

I have a template notebook that takes in some parameters to get raw data and then process it. In this processing a few subsets of data are calculated. However, I don't know how many subsets will be ...
16
votes
2answers
437 views

What has changed in the Template system in 10.3?

Bug introduced in 10.3 and fixed in 11.0.0 There are couple of issues that are breaking my code after upgrading to 10.3. I wasn't able to narrow all of them down but this is what I've found. ...
0
votes
1answer
295 views

How can I make a new slide show template? [closed]

Mathematica comes with some built-in slide show templates. If you select File / New / Slide Show, the choices pop up. How can I make my own template?
1
vote
0answers
50 views

Problem of FileEncoding of the output file of FileTemplateApply

Problem of FileTemplateApply FileTemplateApply will change a file-encoding[UTF8] into a file-encoding[WindowsANSI], it seems it doen't accept CharacterEncoding ...
2
votes
2answers
83 views

How can I pass values to a NamedSlot in TemplateApply

str="``;`v`;`v`;``"; template=StringTemplate@str; TemplateApply[template,CharacterRange["A","Z"]] (*"A;;;D"*) I want to get the result as: ...
1
vote
0answers
72 views

generate a category bar with TemplateApply

Consider we are generating a category bar with 2 levels. This is an example about the XMLTemplate ...
6
votes
0answers
197 views

What is the difference between GenerateDocument and TemplateApply[NotebookTemplate[

Bug introduced in V10.0 and persisting through V10.4 Since V10.3 the bug still remains but additionally the Genarate and ...
4
votes
1answer
119 views

Is the use of StringTemplate with a styled string documented behavior?

I was pleasantly surprised to find out that StringTemplate appears to work with styled (formatted) strings, with the style of the slots applied to the inserted ...
9
votes
3answers
324 views

Disable templates for user defined functions with usages

It appears that fixing the template system is low on Wolfram Research's priority list. For my package, I have defined Usage info for my functions involving lots of ...
40
votes
1answer
1k views

What is the status of `::usage` and Templates in Mathematica v11?

Since Mathematica 9, a number of issues concerning the ::usage and templates were raised. In 9.0, there was a bug first reported here and better diagnosed here, ...
23
votes
3answers
876 views

Are there any tutorials on version 10 notebook templating and report generation? Are there missing docs?

Bug introduced in 10.0 and persisting through 10.2 or later I am trying to understand the new templating in version 10. While there is a general documentation page with links to docs for each new ...