{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

3
votes
1answer
33 views

How can I have (or emulate) 'normal' behavior with \ParallelPar when working across pages (on a spread)?

The parallel package is able to set parallel columns and align them at \ParallelPar tokens: \documentclass{article} \usepackage{parallel} \usepackage{mwe} \begin{document} ...
3
votes
3answers
91 views

Problem with ExplSyntax

I'm trying to define a flexible "delimiter styling" command. I tried it in a package, and \str_case:nnF returned Undefined Control Sequence, whereas using \str_case:nnn went further and caused a ...
9
votes
1answer
49 views

LaTeX3 Property lists and expansion

So, I'm trying to pass the "date" value associated with the current environment to a property list defined by a macro. It doesn't seem to work and I'm not sure why. Here's a MWE: ...
5
votes
1answer
51 views

How can I combine \seq_use:Nn and \seq_map_inline:Nn?

The following 'naïve' solution throws the error: ERROR: Misplaced \omit. --- TeX said --- \multispan ->\omit \@multispan l.13 } \\ --- HELP --- From the .log ...
7
votes
1answer
30 views

Built arguments not getting properly passed

I've got some rather complicated arguments that I must build gradually and then pass to another macro. The MWE is greatly simplified. Here's my attempt using expl3. The problem is that no matter ...
8
votes
1answer
68 views

Why is \str_if_eq_p:nn not evaluating to true?

In the following MWE, \str_if_eq_p:nn is not evaluating to true when \l_aepoly_presentation_style_tl is set to ABC. Why? \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \tl_new:N ...
4
votes
2answers
112 views

Manipulate a LaTeX2e counter with LaTeX3

I have some expl3 code where I want to manipulate a counter which is defined by a package using LaTeX2e code. If I want to manipulate the counter foo, I could either mixing up LaTeX2e code with ...
6
votes
1answer
47 views

Is there a way to pad zeros to the end of a rounded number with Expl3?

I've been able to put a table of trig values together using expl3. However, I would like to pad zeros to the end so that all values have four decimal places. Is there a straight-forward way to do ...
9
votes
1answer
82 views

\hbox_overlap_right:n{} vs. \makebox[0pt][l]{}

I stumbled about some, to my understanding, unexpected behaviour of the expl3 command \hbox_overlap_right:n. I was expecting all examples below to produce the same result, that is, the frame box ...
7
votes
3answers
500 views

Command that changes its definition the nth time it's used

I need a command to behave differently the first time than the next times it's called. Right now I use \newcommand\foo{First\gdef\foo{Next}}, that is, it redefines itself the first time. Moreover, I ...
5
votes
1answer
63 views

Scientific Notation Only For Large Numbers — with uncertainty

I've been using Betohaku and Bruno Le Floch's answer to Scientific Notation Only For Large Numbers to turn scientific notation of as follows: \documentclass{standalone} \RequirePackage[ ...
5
votes
2answers
85 views

expl3 code with tabularx

In a nutshell: I've seen code for creating tables programmatically using tabular. Can it be done using tabularx? If so, how? I'm a math teacher, and I'd like to create a "problem set" environment in ...
4
votes
1answer
69 views

\int_incr:N inside tabular environment

I started learning LaTeX3 a few weeks ago and I'm currently playing around with tables. Here is my code: \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \cs_new_protected:Npn ...
5
votes
0answers
62 views

Convert sequence to table [duplicate]

I'm trying to write a macro that converts a sequence to a table. The following code works fine: \documentclass{article} \usepackage{expl3} \begin{document} \noindent \ExplSyntaxOn \seq_new:N ...
3
votes
0answers
24 views

Sequence empty right after setting [closed]

\documentclass{article} \usepackage{expl3,xparse} \ExplSyntaxOn \ProvideDocumentCommand \Union { O{\cup} O{,} m } { \typeout{#3} \seq_set_split:Nnn \l_lmpa_seq { #2 } { #3 } \seq_show:N ...
1
vote
0answers
31 views

Why does \iow_shipout: introduce typeset whitespace (where \iow_now: does not)?

For my resume, I have an environment that lays out information in two minipages—one for position/education data, one for the environment contents. The class I wrote also produces plain text ...
10
votes
1answer
132 views

Is it reasonable to expect an expl3-compatible release of TikZ/PGF in the future? / Workarounds for using TikZ under expl3 syntax

Keeping in mind: TikZ uses space tokens significantly, and expl3 syntax completely disregards whitespace and will only become more prevalent, is it reasonable to expect a future version of TikZ ...
7
votes
1answer
61 views

Clash between fontspec and l3keys2e with multichoice keys

Consider the minimal example: \begin{filecontents}{test.cls} \NeedsTeXFormat{LaTeX2e}[1994/06/01] \RequirePackage{expl3,l3keys2e} \ProvidesExplClass {test} {2013/12/23} {1.0} {A test class} ...
6
votes
1answer
59 views

How can I 'double-dip' environment contents to an external file with expl3?

I'd like to capture the contents of a particular environment and copy them, verbatim (n- type expansion), to an external file already set up as an iow output stream. My first thought was to simply ...
11
votes
2answers
68 views

How can I insert an entire input stream (up to EOF) into an output stream?

I am trying to automate the generation of a text version of my resume. I'd like to incorporate a note to any potential human readers (most plain text resumes are, to my understanding, simply scanned ...
8
votes
1answer
64 views

How can I expand macros and write the expansion to an external file?

I'm trying to do a bit of single-sourcing with my resume, and would like to write given information to an external text file. \documentclass{article} \usepackage{expl3,xparse} \ExplSyntaxOn ...
4
votes
1answer
39 views

Expl3 prop doesn't seem to work when the key is a macro value

I'd expect this example code to give two identical lines, however \usevalue{\xyz} doesn't result in XYZ as the other. Can I force the key to be expanded to make \usevalue{\xyz} and \usevalue{0} refer ...
13
votes
1answer
141 views

How do I insert a tie (~) under expl3 syntax?

I need to define a token list of the form \tl_new:N \g_silly_tl \tl_set:Nn \g_silly_tl { Text ~ and ~ a ~ tie:?? } How do I do this? More generally, is there a reference where one can see how ...
11
votes
1answer
78 views

Processing document class options with l3keys

How can I parse (that is, access) the entire option list given to the current document class with l3keys? This would obviously need some sort of \keys_define:nn { document-class-?? } { default ...
7
votes
1answer
64 views

Trim spaces in a macro with expl3

I'm inserting graphics from data in a csv-file and due to lazy input I have to get rid of leading and trailing spaces. It works fine with the trimspaces package. \documentclass{article} ...
7
votes
1answer
123 views

Using cleveref for cross-referencing to exsheets questions

I really like the functionalities offered by exsheets, a package for typesetting exercise sheets and exam papers (and their solutions). One particularly nice feature is the possiblity of assigning ...
6
votes
1answer
82 views

Expanding a macro as many times as possible without error

I'd like compute cosets using the permute package. Here's what I have so far: \documentclass{article} \usepackage{expl3,xparse,permute} \ExplSyntaxOn % Create a new command to compute the right ...
36
votes
2answers
540 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
47 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
41 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
79 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
92 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
140 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
92 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
81 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
134 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
109 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
89 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
110 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 ...
0
votes
0answers
57 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
45 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
125 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
130 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
54 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
100 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 ...
2
votes
1answer
101 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
59 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
69 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
70 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
63 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 ...