{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

4
votes
1answer
36 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 ...
4
votes
2answers
111 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 ...
14
votes
3answers
11k views

How do I get expl3 from CTAN?

My real problem is that I am trying to use a package which depends on siunitx, and it complains on compiling with the following error: (/usr/share/texmf/tex/latex/siunitx/siunitx.sty ! Package ...
13
votes
0answers
106 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 ...
7
votes
2answers
94 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 ...
50
votes
3answers
1k 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 ...
9
votes
2answers
55 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 ...
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 ...
7
votes
1answer
80 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
46 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 ...
4
votes
1answer
418 views

xeCJK l3-too-old

I started using XeTeX and whenever I use the xeCJK package I get the following error: ! Critical xeCJK error: "l3-too-old" ! ! ! Support package 'expl3' too old. ! ! Please update an up to date ...
5
votes
3answers
125 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 | ...
5
votes
1answer
89 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} ...
3
votes
1answer
39 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 ...
7
votes
1answer
2k views

Latest MiKTeX-Update broke XeLaTeX with fontspec

I updated MiKTeX a few days ago and since then I cannot compile XeLaTeX with fontspec anymore. \documentclass{article} \usepackage{fontspec} \begin{document} Hello world! \end{document} When I try ...
2
votes
1answer
38 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 ...
28
votes
5answers
1k views

Reducing fractions automatically using LaTeX 3

Consider the following code: \documentclass{article} \begin{document} \noindent Can I make \LaTeX{} reduce a fraction automatically?\\[\baselineskip] For example, I would like the fraction \[ ...
6
votes
1answer
45 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
57 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
74 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
43 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
66 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
67 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
175 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
23 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
117 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
74 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
1answer
39 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
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 ...
4
votes
1answer
56 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 ...
3
votes
2answers
40 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 ...
7
votes
1answer
121 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: ...
9
votes
3answers
591 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 ...
17
votes
2answers
197 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
211 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} ...
15
votes
1answer
228 views

How do I insert a tie (~, non-breaking space, tilde) 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 ...
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. ...
9
votes
2answers
232 views

Workaround how to use expl3 functionality in tikz

What I want to do I want to create a command \planfigur{<edges>}{<angles>} which draws a triangle using TikZ. \planfigur should have 2 mandatory arguments, which let me specify edges ...
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
163 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
80 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
77 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
66 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: ...
7
votes
1answer
111 views

Has LaTeX3 syntax possibly changed since this question was last answered

I am adapting the LaTeX3 answer in this question: http://tex.stackexchange.com/a/61603 But I can't get the original MWE answer to compile using xelatex. I have renamed the variables, but the error ...
2
votes
0answers
47 views

Access xparse's \BooleanTrue via latex3 expl3

I'm implementing a command with xparse's boolean token processing \NewDocumentCommand{\op}{s o t' t. t^ g}{ % Here I need to check for % (#3 || #4 || #5) && !(#3 && #4 ...