{expl3} is the programming "language" written for the LaTeX3 project. It is a library of common functions for storing and manipulating data and performing higher-level logical tasks than commonly provided for in TeX and LaTeX.

learn more… | top users | synonyms

36
votes
2answers
586 views

How “safe” is it to use LaTeX3 (l3packages, l3kernel)?

Are l3kernel and l3packages present in most of the LaTeX distributions? Are they "stable enough"? I am asking this because I am preparing a .tex document for a client. I have found convenient to use ...
7
votes
1answer
54 views

expl3: \tl_put_right:Nx chokes on \{

I am trying to compose a command into a token list. \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \tl_new:N \__a \tl_new:N \__b \tl_new:N \__c \tl_set:Nn \__a { ...
5
votes
1answer
55 views

expl3: Look at peeked ahead token

With expl3, I can \peek_charcode:NTF. For debugging, I would like to actually see the peeked-ahead tokens for each iteration of my loop, but have not seen a suitable token variable in the ...
2
votes
1answer
122 views

l3regex usage throws __scan_new:N error

Using TeXLive, with this MWE \documentclass{article} \usepackage{expl3} \usepackage{l3regex} \begin{document} a \end{document} I get an error for an undefined control sequence ...
2
votes
1answer
120 views

How can I pass optional arguments as optional arguments?

I have the following environments which are being used in my document. As you can see, a lot of unnecessary complexity is being added by my arcane optional argument handling using \IfValueTF. Is there ...
10
votes
1answer
159 views

Processing a sequence of pairs

I want to process a list of pairs like this: {{a1,b1},{a2,b2},{a3,b3}} where the first items in each pairs are distinct. So, for each pair of those {ai,bi} I would need the following data: ...
10
votes
1answer
98 views

How to dynamically give key names with expl3?

I have a property list which associate names with values name 1 -> value 1 name 2 -> value 2 ... I want to use names from the property list to dynamically create keys. The following code ...
7
votes
1answer
91 views

Filling a table by iterating over a sequence produces an orphan cell

I'm trying to fill a table with content that is stored in a sequence by a custom command. \documentclass{article} \usepackage{xparse} \usepackage{expl3} \ExplSyntaxOn \seq_new:N \my_sequence ...
1
vote
1answer
266 views

Defining a `\subtitle` macro - `\reserved@e` undefined

I want to define a general-ish \subtitle macro that simply adds to the \@title macro set by the user-level \title. Here is what I've got: \documentclass{article} \RequirePackage{xparse,expl3} ...
5
votes
1answer
133 views

How to renew section commands in latex3

I'm trying to rewrite section commands using LaTeX3. For testing purpose, what I did is basically this: \ProvideDocumentCommand \p { o m } { \IfNoValueTF{#1} { % \paragraph{\textsf{#2}} ...
2
votes
0answers
112 views

Sorting a list of tokens (not necessarily numerals) in expl3/LaTeX3

I'd like to sort a list of words according to their lexicographical order using expl3 code. My words are in a seq variable that I access in a stack-like manner (this is not relevant, though). I've ...
2
votes
0answers
160 views

Creating title page with xcoffins [closed]

I want to create a title page like in the Tschichold example: using this code: https://github.com/latex3/svn-mirror/blob/master/l3experimental/xcoffins/xcoffins-tschichold-example.tex in MiKTeX ...
4
votes
1answer
83 views

Is there / should there be a naming convention for expl3 extensions?

In other programming languages, there is a (sometimes pretty loose) standard on how to name modules / packages / etc. Does expl3 have such a convention in place or, if not, what should it be? Say you ...
2
votes
0answers
51 views

Is there a `sty2dtx` for LaTeX3 syntax?

sty2dtx is a CLI tool to convert a commented style file into a Documented TeX file (dtx). It was written and works wonderfully for LaTeX2e packages, but expl3 offers a lot of happy times for package ...
8
votes
1answer
138 views

A Couple of Tidbits about the LaTeX3 \tl_case:??? Function

On p. 95 of my interface3 documentation, dated July 28, 2013, the \tl_case:??? function is first introduced as having a signature \tl_case:NnnTF, but on its extended description for usage it appears ...
6
votes
1answer
141 views

Shell-escape with LaTeX 3

What is the LaTeX 3 equivalent to \write18 if there is one? I want to call lilypond from within my TeX document.
6
votes
1answer
61 views

Scanning l3key with document catcodes?

Similar to the way TikZ attempts to use unknown keys as values for the color key, I would like to interpret an unknown key as the value for one of my own keys, decoration (not to be confused with the ...
5
votes
1answer
118 views

About catcodes and Family in LaTeX3/expl3

This is not so much the display of an issue or problem I'm facing out of my wish to use as much LaTeX3/expl3 as possible in my TeX-based work, as a request for advice on the proper ways in that ...
3
votes
1answer
144 views

Math-mode inception: creating a list environment for individually referenced equations

I'm trying to create a list-like environment properties that could be used as such: \begin{properties} \item[Lemonade Rule] \forall \text{lemons} \exists \text{lemonade} \item a^2 + b^2 = c^2 ...
7
votes
1answer
68 views

Confusion about Data Retrieval from a LaTeX3 Stack

I'm trying to perform a very simple processing task in LaTeX3, namely, defining a series of functions named in terms of the token lists retrieved from a clist as a stack. Each function will set ...
2
votes
0answers
105 views

How can I manipulate data in a PGFPlots Table using l3int?

I need to provide statistical functionality to some of my TeX-trainees and I'd like to leverage the intuitiveness of l3int and the expressiveness of pgfplots and its table helper package. So, as a ...
5
votes
1answer
75 views

Confusing Problems with LaTeX3/expl3 \pdftex_if_engine:TF Switch

For a number of days I've been confused with some problems I had when using the \pdftex_if_engine:TF switch in a LaTeX3/expl3 class of my own. I thought it would be equivalent to the \ifpdf switch, ...
5
votes
2answers
72 views

Conflict between Geometry Ratio-Setting Keys and expl3 Syntax

I have found that when I try to use proportions-setting keys of the geometry package, like hmarginratio = 1:1, in the midst of a expl3 class or package (i.e., such as declared with ...
13
votes
1answer
184 views

Using calc-like (calc Package) Commands within LaTeX3/expl3

In my pursue to switch as much as possible from LaTeX2e code to LaTeX3/expl3, I got stuck with the usage of some of the calc package facilities. I've read of the l3calc package, but it seems it is ...
6
votes
1answer
69 views

LaTeX3: l3keys Multiple-Choices Keys and Startup Value for Predefined Choice Integer Variable

In the interface3 documentation it can be read (what follows is not a literal quotation) that the variable \l_keys_choice_int is available to be used as an index register for a multiple-choices key ...
3
votes
0answers
75 views

Difficulty saving formatting to a sequence to be called later in my code

I had an idea about how to answer this question and started putting some things together. I wanted to put something together that was fairly powerful and could handle simplification of linear ...
4
votes
1answer
119 views

I need a fully expandable function to expand in an “f” type argument

I really hope that I'm asking the correct question. What I'm actually working on if far more convoluted than what's happening in the MWE here. I think I've narrowed down things to real problem. I ...
7
votes
1answer
103 views

Driving the Options of a Given Package from Another Package or Class in LaTeX3/expl3

I'm afraid I still don't get how I'm supposed to handle the communication of options among packages in a LaTeX3/expl3 context. Let us say I have a package pkg1 where I define an option opt_pkg1 that ...
5
votes
2answers
85 views

How can I refer to an absent value in expl3?

The xparse package has a concept of -NoValue-, a kind of '\null' token used to represent the absence of any value (where \null would probably be considered a value). If I would like to manually use ...
6
votes
1answer
107 views

Is there something like a scope of \NewDocumentCommand?

Following along the line of my (confused) post on xparse and expl3, but this time hopefully with no typos or missing characters, I've devised a small package just to check a l3keys-based definition ...
8
votes
1answer
102 views

Why is my list showing up twice

Why does the following code result in my list being strangely, but not quite duplicated? \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \ExplSyntaxOn \clist_new:N \l_ae_number_clist ...
4
votes
1answer
139 views

Dazzled and confused about xparse and LaTeX3 Booleans

I'm just starting my journey with LaTeX3/expl3, and although fascinated by the great work that the LaTeX3 team is doing, and by the enormous difference it brings about with respect to "classical" ...
7
votes
1answer
158 views

How is expl3 typed?

In developing an expl3 add-on package, I want to continue the trends set in the language I'm working in and not introduce new patterns. Can anybody speak for the typing model (if any) that is ...
38
votes
3answers
974 views

LaTeX3-sensitive editors

I'm starting to embed LaTeX3 code in my custom classes and packages -- and enjoying it more the further I learn about it --, but at least to me it would make for an even better experience if, as it is ...
5
votes
1answer
103 views

Need for loading of expl3 code?

Consider the following example: \documentclass{article} \usepackage{pst-plot} \usepackage[locale=DE]{siunitx} % Self-brewed macro. \def\andel#1{% ...
5
votes
3answers
177 views

How can I remove outer brackets without expanding content?

I'm trying to use pgfkeys to collect information that will be passed to a clist. But, I'm not able to get this to work correctly. It seems that I'm getting brackets around the list and is prevent ...
10
votes
1answer
63 views

Log all keys in a module

Using l3keys, is there any way to inspect the keys currently in a (sub)module? I'm looking for something like \clist_show, but for keys. \keys_show sounded promising, but requires that you already ...
5
votes
1answer
57 views

Is there any way to add a key to a sub/module in l3keys?

I need to loop through a comma-separated list, creating them all as keys for a data structure. I can't think of a way to loop through the keys inside \keys_define:nn, so the only other option I see is ...
2
votes
0answers
738 views

Attempting to use moderncv, get wrong version of expl3 and l3kernel too old errors [closed]

I'm relatively new with LaTeX. I've been trying to use moderncv, but when I do I get the following errors: LaTeX Warning: You have requested, on input line 53, version `2013/07/28' of ...
5
votes
2answers
61 views

How to use the width of some text in \dim_compare:nTF directly?

Is it possible to use the width of some text directly inside of a <dimension expression>. I found this way using a temporary box but it seems not very elegant … \documentclass{article} ...
5
votes
2answers
192 views

How can I use `catchfile` package to gobble first characters on a line

When using the fancyvrb environment Verbatim, you can gobble the first n characters of each line before printing it out. I'd like to be able to do something similar, but not via verbatim. In the ...
2
votes
1answer
78 views

What is the right number of #’s for nested sequence mappings?

Im trying to nest two sequence mappings, which works so far but I want to use them inside a command definition so the <items> should be accessible as ##1 and ###1 but this won’t work. Is it ...
3
votes
1answer
856 views

TeX Live, Ubuntu - Update expl3 to l3kernel problem

I'm a noob with LaTeX. Trying to get my import package to work, I came across a dependency on the ExplFileVersion macro. Googling this issue, I realized I need to update my l3kernel package. The ...
7
votes
2answers
124 views

Is it possible to set a particular item of a LaTeX3 seq?

I want to use a seq as an array and then set a particular item of this array by its index. I know that I can access an item via \seq_item:Nn but didn’t find out if there's something like ...
7
votes
2answers
138 views

How to count the frequency of a token in a token list

Is it possible to count the number of a token in a token list? \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \tl_new:N \tobi_list_tl \tl_set:Nn \tobi_list_tl {foo~bar~baz} ...
8
votes
1answer
128 views

Use LaTeX3 variables within TikZ picture

I’m new to LaTeX3 and don’t understand why the following doesn’t work \documentclass{article} \usepackage{xparse} \usepackage{tikz} \ExplSyntaxOn \tl_new:N { \g_tobi_color_tl } \tl_set:Nn { ...
5
votes
0answers
89 views

What are best practices when augmenting and building on the keys provided by someone else's package

The situation is one where I'm developing my own commands and environments which build on the commands and environments provided by another package: for ease of talking let's call this other package ...
12
votes
2answers
122 views

How can I access the depth of a given sectioning command?

In the LaTeX Wikibook, we can see a table that gives the depths of the sectioning commands: part: -1 chapter: 0 section: 1 subsection: 2 etc. Is there any way to access this information dynamically ...
6
votes
3answers
181 views

White space unexpectedly lost when trimming a string

I'm trying to follow the example given here \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \seq_new:N \l_ae_insertQuotedMatter_seq \tl_new:N \l_ae_insertQuotedMatter_trash_tl ...
3
votes
1answer
107 views

LaTeX3: insert macro after (unknown unknown number of) parameters?

I've just played with expl3 for a couple of hours. Many things are much more convenient than with 2e. There are functions for things that I thought to be impossible with LaTeX. However, I am missing ...