{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
42 views

Counting the number of strings stored in array

I stored a list of strings (command strings) in an array following the answer here: http://tex.stackexchange.com/a/215571/61517 . Now I wanted to access them randomly, and therefore I added a random ...
2
votes
1answer
43 views

Can I temporarily clear the file search path in LaTeX3?

I'm using the following code to search for a file using LaTeX3: % List of known image extensions: \clist_new:N \l__htmv_grext_clist \clist_set:Nn \l__htmv_grext_clist {png,PNG,jpg,JPG,jpeg,JPEG,gif,...
0
votes
1answer
28 views

expl3 2016 .dtx files to .sty

I have a very similar problem to this old one, closed for being too specific: File expl3.sty not found when trying to compile a *.tex file with XeLaTeX But I have read a few people having it with no ...
15
votes
1answer
108 views

Is there a correct way to prevent a galley cutout from repeating later without modifying the body of the document?

Consider the following FMWE (Fairly Minimal Working Example): \documentclass[a4paper]{article} \usepackage{kantlipsum,xgalley} \usepackage[scale=.8]{geometry} \pagestyle{empty} \ExplSyntaxOn \...
4
votes
1answer
125 views

Good examples of \tl_case:Nn(TF) and \str_case:nn(TF)

While learning expl3, I'm having a hard time in using \str_case:nn(TF) and \tl_case:Nn(TF). I failed to find good examples online. (E.g., the ones in unravel are too complicated for me.) Could you ...
15
votes
4answers
215 views

\tl_replace_all:Nnn recurse subgroups

Suppose I had a token list variable containing abc{ab{abc}c}. I want to replace every occurrence of b with d. As you can see there are subgroups containing b which I also want to have replaced, so ...
6
votes
2answers
68 views

Latex3 equivalent csname endcsname

I would like to know how to create dynamic named macros (in a loop) in Latex3. Everythings ok in LaTeX2e. I look to something equivalent to that code with expl3 \stepcounter{N} \expandafter\def\...
12
votes
2answers
211 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 ...
6
votes
1answer
75 views

Save an active colon from within expl3

Is there a preferred way to realize the following without having to leave expl3 syntax? \documentclass{article} \usepackage{expl3} \usepackage[french]{babel} \begin{document} \ExplSyntaxOn % suppose ...
3
votes
1answer
42 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: \...
4
votes
2answers
77 views

What is the correct way to stack two coffins so that the vertical spacing between their contents is as it would be if they were set in one coffin?

Consider the following Minimal Working Example (MWE): \documentclass{article} \usepackage{xcoffins,kantlipsum} \begin{document} \NewCoffin \MyCoffin \NewCoffin \YourCoffin \SetVerticalCoffin \...
9
votes
2answers
85 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 ...
5
votes
2answers
182 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 ...
23
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 \...
7
votes
1answer
51 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, ...
4
votes
1answer
41 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 ...
6
votes
1answer
77 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 ...
1
vote
1answer
50 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
97 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
40 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
1answer
44 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
115 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
12k 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 ...
15
votes
0answers
124 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 {\coffin_typeset:Nnnnn\...
7
votes
2answers
107 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 ...
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 ...
9
votes
1answer
93 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 ...
4
votes
1answer
450 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
134 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
93 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
51 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 ...
8
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
43 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 \[ \frac{...
6
votes
1answer
48 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
65 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
82 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
52 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) \documentclass{...
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
43 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
70 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
66 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
198 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
166 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 (scrguide....
8
votes
1answer
78 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
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 ...