{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

5
votes
2answers
178 views

Create a sequence using space as delimiter

expl3 swallow spaces but I wonder to build a sequence using space as a delimiter. So if I want to print '!' after each item the output should be 'A!simple!sentence!has!only!one!clause!'. The current ...
22
votes
1answer
1k views

How can I clean my coffin?

Seriously, the name is a goldmine. I have a coffin that I'd like to 'clean up' and keep only the default poles. For example, here's a coffin I built using an auxiliary coffin: Size of coffin ...
4
votes
1answer
34 views

tcolorbox as a style

I’m using a tcolorbox to mark some keywords. I want to control when these keywords have to be marked. So I created a Boolean variable \l_style_bool. The instruction \bool_set_true:N \l_style_bool ...
7
votes
1answer
45 views

How can I generate precisely one warning within a tabularx environment?

I realise this is an unholy mix of expl3 and LaTeX-2e, but most of my code is like this at the moment, unfortunately. I want to be warned when I fail to set a particular variable. More specifically, ...
6
votes
1answer
66 views

xgalley breaks memoir and ntheorem

Another question from me about the experimental expl3 package xgalley: This time, simply loading the package causes problems with memoir and ntheorem. Consider the below MWE. When I load xgalley, the ...
5
votes
0answers
62 views

Best way to wrap text around figures in expl3

As remarked in another question from today, I am trying to find a more flexible way to get text wrapped around figures than standard solutions like wrapfig or manual use of \parshape, and my eyes are ...
1
vote
1answer
47 views

Vertical break of a tcolorbox

I’m using an example from the tcolorbox manual (v 3.91) to highlight some text. The problem is that line breaking is not allowed. So I tried to use a tcolorbox for each word of the highlighted text. ...
11
votes
1answer
78 views

Why does an empty \textwidth coffin lose width when joined with another?

I'm trying to understand coffins. Well, actually, I'm trying to use them. Trying to understand them is a purely instrumental goal. I wanted to create one coffin of width \textwidth and one of a bit ...
4
votes
2answers
94 views

Labelling confusion in expl3: (public, private) Vs (global, local)

The expl3 manual shows that LaTeX3 is based on conventions. Among them conventions to correctly label variables and functions. They could be public/private or global/local. If there is someone who ...
5
votes
2answers
38 views

\clist and hyperref

using package xparse I stored the author of a certain paper in a \clist in the following way \NewDocumentCommand\addauthor{m}{% \clist_put_right:Nn\l_allauthors{#1}% ...
4
votes
2answers
114 views

Spurious `.pdf' added to the first argument of \href if inside \ExplSyntaxOn/Off

The following MWE shows that a spurious ".pdf" is added to the URL given in the first argument of \href if (and only if, AFAICS) the latter is used inside \ExplSyntaxOn/\ExplSyntaxOff (it also shows ...
4
votes
1answer
42 views

Modify contents of environment using l3regex and then write to file

I want to define an environment (in a class file, as it happens) the contents of which are both displayed on-screen as they are written, but they are also modified (e.g. using the l3regex package) and ...
14
votes
0answers
115 views

Globally assigning a coffin

There is no macro \vcoffin_gset:Nnw. How can I achieve that result? MWE \documentclass{article} \usepackage{expl3}\ExplSyntaxOn \usepackage{mwe} \newcommand\typesetit ...
9
votes
2answers
83 views

\ref with macro as parameter

I would like to write a macro (using Latex3/expl3) that can automatically refer to say plot using several key-value parameters. Here is what I currently have: \keys_define:nn{label}{ Re .tl_set:N ...
7
votes
1answer
85 views

real colons in a expl3 context

I'm fighting to find a good way to use colons in an expl3 context. The example uses tcolorbox for a demonstration but I ran into the problem also in other places where a colon was used to delimit an ...
1
vote
0answers
47 views

siunitx: Problems with xparse after update on 2016-03-31 [duplicate]

Dear community members, after today's (2016-03-31) update of packages via TexLive Utility severe problems with siunitx showed up on Mac OS 10.10.5 + TexShop. siunitx calls xparse, which then outputs ...
0
votes
0answers
29 views

TeX Live: xsparse and l3kernel. [duplicate]

My Tex Live installation is up-to-date. I ran tlmgr update --all today (2016-03-31). However, I get many errors on documents that used to compile just fine. It seems to boils down to xsparse.sty ...
5
votes
1answer
91 views

LaTeX3 string with umlaute

I was wondering how to properly use LaTeX3 strings. Consider the following code: \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \tl_new:N \l_foo \tl_set:Nn \l_foo {\"a} ...
7
votes
2answers
101 views

Write LaTeX3 variable to aux file and recover it

I was wondering how to write a LaTeX3 variable to an aux file and read it in at the very beginning of a document. The motivation of this problem is that I would like to get rid of my LaTeX2 counters ...
5
votes
3answers
130 views

Create tabular depending on counter

I want to create a tabular with i+2 many columns where i is a counter. The tabular should have the following layout: ------------------------------- | 1 | 2 | ... | i | foo | bar | ...
3
votes
1answer
45 views

How can I set the PDF TrimBox dynamically (with a macro) and compiler independent?

Introduction At the moment I’m preparing a custom class which is likely to be compiled with XeTeX or LuaTeX. It is for a book layout that should be professionally printed and therefor I want to set ...
2
votes
1answer
40 views

expl3 property lists and expansion

Trying to keep this simple. Given that the following, what is wrong with the commented out code (neither one works unfortunately), and what is an alternative way to do that? "That" being access a ...
6
votes
1answer
47 views

l3doc adds unwanted backslash in margin box of {function}

I'm using l3doc for documenting some packages (I know it is not officially stable, but I like it …). I came to the problem that {function}{<list>} adds a backslash for every item in <list> ...
5
votes
1answer
62 views

expl3 par and sequences

Having been exploring expl3 I have been updating some of my code to it, and I ran into a interesting issue that I was not predicting. I get a strange error that I think is from trying to store ...
5
votes
1answer
80 views

How can I use a tl variable in TikZ options

Im setting up a command with some options via l3keys. One of the options is tikz-options and it should take a list of TikZ options and pass them to a {tikzpicture}. \documentclass{article} ...
4
votes
1answer
47 views

XParse: Command, which creates a command

SE, lately I'm playing around with expl3 and xparse a little and I encountered following problem: I want to create a command which creates a new command -- similar to this post. This is not as hard, ...
7
votes
1answer
67 views

How can update this code for print number with different colors?

I have this code for highlight the diagonal, the first row and the first column with different colours! (This code has been build from egreg on this community :-D in a past question) ...
3
votes
1answer
38 views

Why do I need \fp_to_dim:n in my dimension expression?

I’m trying to use an expel floating point variable (\l_@@_last_machine_row_x_fp) inside a calculation of a dimension (\l_@@_bar_width_dim). In the following code \BarA works (with a solution from this ...
4
votes
1answer
41 views

expl3 empty token list

Im sure this must be something very simple but it is eluding me. The following code outputs F. Shouldn't it output T? \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn ...
3
votes
1answer
68 views

expl3 expressions and returns

In my attempts to get grasp on expl3 I have come into a wall, I cannot figure out how store the result of a function. For example in pseudocode of what I want to do is this, store the second ...
2
votes
1answer
65 views

In a table, give an empty line the height 0, so that it virtually disappears

I am using an add-on to Stata in order to generate Latex-Tables that show estimation results and significance levels for some models. On of these programs creates table of the following form, which ...
9
votes
3answers
186 views

expl3 variables and functions

I am trying to learn how to use expl3 and am a little confused and could use some direction. I'm trying to figure out this whole naming scheme for variables and functions as addressed in the expl3 ...
2
votes
0answers
24 views

How to make \tl_upper_case:n in section's argument bookmark compliant?

Thanks to recent revision of the coverage of UTF-8 input for pdfTeX and accents with the expl3 (see updated answer of http://tex.stackexchange.com/a/286703/18401), the following code works nicely: ...
2
votes
0answers
138 views

mhchem wants expl3

I am on Ubuntu using TexLive and I cannot compile this .tex file: \documentclass[ letter, 12pt %% set default font size to 12 point ]{scrartcl} %% article, see KOMA documentation ...
8
votes
1answer
76 views

Does expl3 key-setting syntax have an equivalent of TikZ/PGF's .cd?

This question has the following form: 'I know how to do X using Y. I can also do X using Z but not so elegantly as using Y. Can I do X using Z in the same way that I can do X using Y, for a more ...
3
votes
2answers
56 views

Creating a command that builds a 1 dimensional diagram from tokens

This question is indeed very similar to Creating a command that concatenates an input string token by token, but the solution probably looks different and I have difficulties reading up on the ...
3
votes
1answer
42 views

How to manipulate items of a SplitList while processing?

I've defined a new macro using xparse and expl3 to generate a set of two lists. The idea was to have a macro with the same output as an old macro which was very user unfriendly because I had to write ...
3
votes
2answers
42 views

How to process only tokens containing a lower case letter?

The goal is to have a macro with single argument, that looks at all tokens in turn and if it sees a lower-case letter it is wrapped in \texttt{<token>}. All other tokens are passed through ...
4
votes
1answer
57 views

How to make \tl_upper_case:n applied to diacritics work in section argument?

The LaTeX3 Interfaces' documentation claims, page 224: In package mode, the case change system will also convert text stored using the LaTeX 2ε “LICR” approach. This will upper/lower case tokens ...
7
votes
1answer
125 views

LaTeX3 best practice: using newed commands within package code

I'm quite new to LaTeX programming and currently looking into LaTeX3 and how to write a small ExplClass. This class should provide an allcaps command that I defined as follows: ...
17
votes
2answers
210 views

How to \let an xparse defined command?

Let \example be an xparse defined command, which takes one optional and one mandatory argument. The definition of \example cannot be modified (e.g. because it comes from a third-party package). The ...
1
vote
1answer
271 views

ERROR: You can't use a prefix with `\begingroup'

Here is a minimal example of a document which does not compile. \documentclass{report} \usepackage[francais]{babel} \usepackage{expl3} \usepackage{appendix} \usepackage{multicol} ...
3
votes
1answer
67 views

Producing expandable environments with only optional arguments with LaTeX3 syntax

I am trying to create a new document environment to complete the assembly of a table (simplified for MWE) but I am having a problem combining an expandable environment with an optional only argument. ...
0
votes
0answers
21 views

MiKTeX - broken package combination fontspec / expl3 [duplicate]

I have some problems after installing the latest 64bit-MiKTeX as well as the latest packages through the package manager. It seems that there is a problem with the combination of fontspec and expl3 ...
10
votes
2answers
164 views

Misunderstanding from l3keys documentation

Based on the interface3 documentation and a nice article in TUGboat, Volume 31 (2010), No. 1 called Programming key–value in expl3 by Joseph Wright, I have been trying to put together a MWE that will ...
3
votes
1answer
52 views

In expl3, how to reset a seq variable when content is placed in footer or float?

This answer explains how to use expl3 to store a seq variable to place content later in a document. I'd like to write a command that: Writes the first argument to the main flow of the page. Writes ...
5
votes
1answer
83 views

Is \int_step_inline:nnnn inserting something after it finished?

The following snippet \RequirePackage{xparse} \documentclass{article} \usepackage{tabu} \ExplSyntaxOn \NewDocumentCommand\trop{}{ \int_step_inline:nnnn{0}{1}{3}{ a & b & c & ...
6
votes
1answer
57 views

How can I transform a sequences by mapping?

In Lisps, I can usually say (map some-function [some list here]) and this will be the same as [(some-function some) (some-function list) (some-function here)] Note that I'm giving map a sequence ...
0
votes
0answers
81 views

media9 consistently gives an error when trying to include an mp4 file

I'm trying to insert an mp4 video into a presentation I'm making in Beamer. However, I'm having some difficulty; it keeps giving me an error when trying to compile the document. The error I'm getting ...
4
votes
1answer
68 views

Why is it impossible to format items of a LaTeX3 comma list?

Trying to adapt the 1st code of this answer in order to format (say in bold) items of a LaTeX3 comma list, I stumbled upon an unexpected error: the following MWE works like a charm: ...