Questions tagged [xtemplate]
{xtemplate} is a high-level interface for declaring document commands, written for the LaTeX3 project. The package provides a mechanism for defining _templates_, which are parameterised definitions of aspects of document design. Templates are the tool through which document designers can select the features of their document.
20 questions
0 votes
1 answer
48 views
lttemplates: emulating l3keys meta-property
I'm trying to emulate l3keys meta-property (.meta:n) in lttemplates. However, the implementation offered by the kernel does not meet my needs. At least I think so ... But maybe I've just got not the ...
4 votes
1 answer
135 views
How to use new template based blocks?
Traditionally in LaTeX, a lot of things are built on the \list macro. This structure provides a standard way to adjast margins and vertical spacing for blocks of text. But with the move to accesible ...
0 votes
0 answers
77 views
replace the default function in xtemplate
Here is the mwe: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{xtemplate} \begin{document} \ExplSyntaxOn % 1. create a new object type \DeclareObjectType{ObjA}{2} % 2. create a new ...
1 vote
0 answers
127 views
xtemplate - Can I factorise my code?
Here's a MWE which is a small example of the use of xtemplate. This lines will be used in my first public package I'm working on; in my package, the call of \UseTemplate will be done by standard LaTeX ...
11 votes
0 answers
236 views
Is still xtemplates recommended for document class writers?
Suppose I'd like to create a LaTeX class based on another one (say article), with e.g. quotations or theorems with specific designs (say as tcolorbox boxes): is it still nowadays recommended to rely ...
1 vote
1 answer
166 views
Error when using acro: 'long-short' of type 'acro-first' is (xtemplate) unknown
I just switched from overleaf to using vim for latex and executing everything on the commandline. My code previously compiled without errors in Overleaf, but now i am getting a problem with acro. MWE: ...
1 vote
2 answers
787 views
Write a derivative operator without denominator using diffcoef
I recently discovered the diffcoef package and the power of xtemplate. The first one encompasses almost everything I was doing with personal macros for derivative operators. However, I was wondering ...
2 votes
1 answer
120 views
instance seems to ignore key
Here's basic example showing a) "instance will set some key in the template", and b) "The key–value list of⟨parameters⟩applies in the⟨new template⟩and cannot be changed whencreating an ...
1 vote
0 answers
132 views
using \KeyValue in xtemplate for instance key-types
I came across a problem in xtemplate with using \KeyValue for keys of type instance. Instance key-types haven't been documented yet, so I could just be doing it wrong. Here's the smallest example I ...
2 votes
0 answers
82 views
Repeated instance names in xtemplate objects
It appears to be the case that instance names for an object in xtemplate need to be unique, even if these instances are created from different templates. Is this is intended behavior or a bug? I ...
5 votes
0 answers
216 views
Software Architecture and xtemplate
When writing a package, there may be the situation that several things need to interact to make a complete product. When using xtemplate, I can define each part as an object. This means that the ...
5 votes
1 answer
231 views
Making Environments Using xtemplate
The examples for xtemplate show how to make document commands, but I haven’t seen anything involving environments. If I were to define an environment using xtemplate, what would the best approach be? ...
5 votes
1 answer
1k views
Acro package provides "! Missing number, treated as zero." after update to acro-v2.7b
I ran an update on texlive 2017 (via tlmgr) and I got an error for the acro package that I have not experienced before. I have provided a MWE: \documentclass{article} \usepackage{acro} \...
3 votes
1 answer
407 views
How to patch result of \DeclareTemplateCode (for custom acro list style)
In trying to create a custom acro list style with a longtable and repeating heading, I started working my way through some LaTeX3 code more than I have in the past. I am used to patching with ...
8 votes
1 answer
632 views
How should I create complex objects using xtemplate?
Consider the following trivial example: \documentclass{article} \usepackage{xtemplate} \ExplSyntaxOn \DeclareObjectType { test } { 10 } \ExplSyntaxOff \begin{document} oh, nose! \end{document} ...