{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

0
votes
0answers
12 views

l3doc adds unwanted backslash in margin box of {function}

Im using l3doc for documenting some packages (I know it is not officially stable, but I like it …). I cam to the problem that {function}{<list>} adds a backslash for every item in <list> ...
4
votes
1answer
44 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
62 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
36 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
55 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
34 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
40 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
63 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
63 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
155 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
21 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
49 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
60 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
51 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
34 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
38 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
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 ...
7
votes
1answer
100 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
174 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
93 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
59 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
157 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
50 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
76 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
58 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
64 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
109 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
40 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 ...
4
votes
1answer
47 views

creating an alias for existing key

In there an easy way to define an alias for an existing key which does exactly the same, but without the need to duplicate the code of the existing key? That is, something like: \keys_define:nn { ...
1
vote
0answers
32 views

Error interception

The code in the MWE allows \myMacro to process either a tokenlist, integer, or floating point item by setting the appropriate optional #2 parameter. My question at the outset was going to be: (1) ...
7
votes
2answers
100 views

how to space after LaTeX3 commands

I am trying to define a message that includes a computed number. \RequirePackage{expl3} \ExplSyntaxOn \int_set:Nn \l_tmpa_int { 42 } \msg_new:nnn { package } { message } { The~number~ \int_use:N ...
1
vote
0answers
20 views

Looping through elements in a sequence [duplicate]

In a follow up of Highlighting words only the first time they appear it was suggested to use \seq_use:Nn to display the content of a sequence. It works really nice but it concatenates the items with a ...
10
votes
1answer
141 views

Translate \typeout to LaTeX3

The command \typeout{argument} expands its argument and writes the result to the log and the terminal. Writing l3build tests, I sought for an equivalent command in LaTeX3, but only found \iow_log:x ...
2
votes
2answers
60 views

Strange behaviour of \tl_if_eq:NNTF

In the MWE below NewDocumentCommands \myComparison and \myNewComparison both use a control sequence \cookbook_Compare:nn which is fed two tokenlist parameters to be compared. These parameters are ...
2
votes
1answer
37 views

How to use \makebox in \tl_map_function?

While trying to answer LaTeX for music I came to the problem that I can’t use a \makebox inside the function for a \tl_map_function:NN call. The problematic line is commented out in the following ...
3
votes
1answer
94 views

Saving a value between successive macro calls

I want to save a variable value between calls of a macro, the intention being not to have to repeat a whole lot of parameters in successive calls. It all works as intended if in textmode. If I invoke ...
5
votes
1answer
90 views

How can the knots TikZ library be used with current l3 (e.g. TeX Live 2015)?

The knots library for TikZ seems to be incompatible with the current l3 packages as provided, for example, by TeX Live 2015. The following example, taken from the library's documentation compiles ...
16
votes
1answer
252 views

Patching commands in LaTeX3

Is there some facility in the LaTeX3 kernel to modify existing commands like etoolbox's \preto \appto and \patchcmd do?
8
votes
2answers
154 views

'Missing \begin{document}' when using the \lowercase trick

Mostly for fun, I'm trying to make % comments manipulatable using the \lowercase trick. For some reason, I'm getting a strange (to me) error: ERROR: LaTeX Error: Missing \begin{document}. --- TeX ...
1
vote
0answers
45 views

LaTeX3 \clist_sort:Nn — How has this function been implemented?

I have recently read in the documentation of package l3sort about the usage of \clist_sort:Nn to sort lists. I would like to know how and where \clist_sort:Nn has been implemented. In l3sort.dtx I ...
3
votes
1answer
59 views

\seq_push and \seq_pop functions behaving badly, undoubtedly due to misuse

For my own good reasons I am loading \param_seq with an array of parameters, then want to transfer the content of \param_seq to \aux_seq by popping \param_seq, storing the popped item temporarily in ...
7
votes
2answers
99 views

user-defined markup aliases with l3

I would like to write a package providing semantic markup for scholarship in the humanities (loosely following TEI-XML). In the source code, users would use macros like \term for a foreign term or ...
5
votes
1answer
37 views

Usage of \seq_map_inline:Nn and/or \tl_clear:N

I trust the code below is commented sufficiently well to obviate further explanations. The macro defined in the MWE does not produce the expected result. My reading of \seq_map_inline:Nn \params_seq ...
1
vote
1answer
36 views

How to \clist_set in \msg_new?

Is it possible to process a comma separated list within a LaTeX3 error message? For example I want to define a message for unknown values to a .choice key like in the following example. I use \test ...
2
votes
1answer
72 views

Line breaks introduced in database export as extra lines in table

I am automating the producing of tex files using an access database with many different types of fields. One, a memo field that will contain an itemized list i.e. visible tex including \begin{itemize} ...
2
votes
1answer
107 views

Combine code from two LaTeX 3 answers

I'n trying to combine the code from the answers "Sum of finite series using LaTeX 3" and "Reducing fraction using LaTeX 3" to automatically calculate a finite sum as either the numerator or ...
4
votes
1answer
45 views

l3fp keeping trailing zero in math calc

I would like to keep the trailing zeros when the data, used for internal calculations with l3fp, are printed. For example: \documentclass{article} \usepackage{siunitx} \usepackage{expl3} ...
5
votes
3answers
128 views

Expl3: Constructing command sequences from macro arguments

In my LaTeX laboratory I am doing weird experiments with expl3 (just started to use it some days ago, so regarding l3 I am complete newbie) I am trying to generate command sequence within of another ...