{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
2answers
86 views

expl3: \cs_generate_variant broke with the last update: undefined control sequence \::T [closed]

The last expl3 update broke my "continue" detection for the index. Here is a MWE: (EDIT: I realized it is possible to reduce it even further) \documentclass{minimal} \usepackage{expl3,xparse} ...
2
votes
1answer
131 views

xparse: \NoValue gone -> how to check multiple NoValues now?

I used to have a definition like the following to check if all optional arguments were missing: \NewDocumentCommand \question {o o o m} { \bool_if:nTF { \str_if_eq_p:nn { \NoValue } { #1 ...
8
votes
1answer
118 views

'Fake' variants in expl3

Suppose you have a function that operates on three tokens, \cs_new:Nn \@@_on_three:NNN { #1, #2, #3 } And you have a variable whose value is the three tokens: \tl_set:Nn \l@@_three_tl { foo } ...
9
votes
1answer
394 views

Expl3 syntax highlighting for TeXworks

Does anyone have a syntax pattern for TeXworks’s syntax-patterns.txt that will correctly highlight Expl3 code? I.e., something that will recognize that the entirety of \cs_new:Npn is a command ...
9
votes
1answer
136 views

Does writing to a property list take longer than writing to a token list?

In the question Write a column selectively to the appropriate row using pgfplotstable? I offered the following: \documentclass{article} \usepackage{xparse} \usepackage{booktabs} ...
5
votes
1answer
422 views

7-2012 l3kernel & l3packages updates | 'broken'?

After installing recent updates to l3kernel and packages (both packaged 2012-07-19) on my MikTeX 2.9 system, several things seem to have broken: docs relying on unicode-math no longer compile ...
5
votes
2answers
115 views

Using Expl3 token-list variables where token lists are called for

The code below illustrates the trouble I’m having. It seems I cannot directly use a token-list variable where a token list is called for, but why, and how can I get the result I want? ...
7
votes
1answer
341 views

Peek ahead for next token not in token-list

This question led to a new package: xpeek I’ve been developing my xpeek package with lots of help from you folks on TeX.SX. It’s intended to help write commands which, like the familiar ...
6
votes
3answers
421 views

\NewDocumentCommand with constructed csname

In the spirit of my previous questions Defining \xthinspace: Thin space only if not followed by certain characters and Ellipses & Correct Space Factor, I’m trying to define a generic \xspace-like ...
6
votes
1answer
344 views

LaTeX 3 read/write to file like toc

I tried to reimplement some kind of a toc facility. I write wouts argument into a file and try to reinclude this. So the Problem is, that \ior_str_gto:NN seems to stop at linebreaks. Please consider ...
8
votes
1answer
173 views

Font and spacing issue in expl3 macro using ooalign

So I was looking at underline omitting the descenders and wanted a version where I could control the underline thickness. Using the basic idea from the answers there, I came up with a method that has ...
4
votes
2answers
233 views

l3prop property stores and etoolbox loops: weird results

I'm writing a class for handling multi-language jargon formulas. My idea is to use l3prop to store, for each formula, its language variations -- i.e., a sort of hash table. Building on one of the ...
5
votes
1answer
95 views

Error using a defined function with expl3 inside the command \color

In the following MWE my personal definition of \marco_prop_get:nn works unless it isn't inside the macro \color. The snippet is: \ExplSyntaxOn \cs_new_protected:Npn \marco_prop_get:nn #1 #2 { ...
6
votes
1answer
105 views

l3coffins — Wrong width if the coffin contents is a list

In the example below you see that the coffin with the input enumerate has the wrong with. I can fix this by using \@parboxrestore. Is there an expl3-solution? Should this solution be the default ...
8
votes
1answer
1k views

Using of \usetikzlibrary in an expl3 package fails

In the example below I provided a small test package mytestpackage.sty which uses the syntax of expl3. If I use the command \usetikzlibrary inside the package I will get the error: Runaway argument? ...
6
votes
1answer
106 views

Test if a given control sequence is an \outer macro

I'm in need of a macro which receives a control sequence as argument to test if this control sequence is actually an \outer macro. I can code it myself as below . \documentclass{minimal} ...
18
votes
4answers
498 views

How do I get a value out of a group?

I've just recovered from my first real foray into LaTeX3 programming. It was ... an experience. Not a completely unpleasant one and once I'd gotten used to the syntax then I found it a lot easier ...
6
votes
1answer
213 views

Comparing LaTeX3 token list to string

Is there a way to compare a LaTeX3 token list to string without having to create a temporary token list? I though I'd use \tl_use:N to get the contents of the token list for the comparison, but that ...
2
votes
0answers
46 views

Trying to typset Persian(Farsi) with MikTeX - expl3.sty not found [duplicate]

Possible Duplicate: Latest MiKTeX-Update broke XeLaTeX with fontspec I am a new user of LaTeX. I have installed MikTeX 2.9 and my editor is: TeXnic. Actually, I installed the xepersian ...
9
votes
2answers
6k 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 ...
12
votes
1answer
571 views

Subscripts and superscripts

In LaTeX2 a_1, a_{123} and a^1, a^{123} used to produce subscripts and superscripts respectively. In LaTeX3 superscripts still work the same way, but what happened to subscripts? I suspect the ...
6
votes
1answer
175 views

Apply command list to argument correctly

I have a clist filled with values I want to use as commands and apply them all successively e.g. \cmda{\cmdb{\cmdc{arg}}} to the argument of the \apply function. I added an example but it doesn't ...
5
votes
2answers
207 views

regexp capturing issue

The following regexp code gives the result \documentclass[11pt]{book} % use larger type; default would be 10pt \usepackage{pgffor} \usepackage{l3regex,xparse} \usepackage{etextools} ...
4
votes
2answers
333 views

Use the \SplitArgument function to pass an array of token-separated values as a single argument

In my work with linear algebra and matrices I have been quite restricted by LaTeX2 and its maximum of 9 arguments that may be passed to a \newcommand. While LaTeX3 imposes that same limitation for the ...
6
votes
2answers
354 views

formatting real numbers using LaTeX3

I want to format real numbers, which are the result of lengthy calculations using the l3fp package, for output as values to keys in PDF objects. The formatted numbers should have at most 9 figures ...
2
votes
0answers
192 views

Nesting of case-selecting functions [closed]

Can case-selecting functions like \prg_case_int or \prg_case_str be nested? If so I will provide some examples of very weird results I observe with nesting. REVISION: I messed up the syntax ...
97
votes
5answers
9k views

LaTeX3 versus pure Lua

Reading this site for the last nearly two years I've learned a lot about LaTeX3 (which I had previously understood to be a defunct pipe dream) and LuaTeX (of which I was previously totally unaware). ...
18
votes
1answer
322 views

Vim Configuration for expl3

I've started with programming in expl3 and vim doesn't realise that underscores are now part of LaTeX identifiers. I'd be much obliged if somebody could explain how to best configure vim so it has ...
28
votes
1answer
299 views

LaTeX3 — What is the difference between the modules l3seq and l3clist?

LaTeX3 provides the two modules seq and clist. What is the difference? The module clist is introduced by Comma lists contain ordered data where items can be added to the left or right end of ...
10
votes
3answers
140 views

What is the difference between \cs_if_exist:NTF and \cs_if_free:NTF?

I don't understand what difference of existance and being free means. Consider this example: \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \cs_new:Npn \my_cs: {} ...
7
votes
2answers
298 views

Why does this protection not work?

The answers to this question explain in detail what protection is so I'm not wondering about that. My question is why a certain command definition with expl3 does not give a protected command. ...
16
votes
4answers
662 views

Is this branching code I wrote a bit obfuscated?

I've been away for a while and I forget if this sort of question is appropriate, but here goes. Recently I wrote some code (in expl3 but I hope it's clear enough) and in hindsight I wonder on its ...
0
votes
1answer
926 views

TeX Live manager 2011 database corruption?

TeX Live 2011, up to date, on Windows XP. Example: \listfiles \documentclass{article} \usepackage{fontspec} \begin{document} A \end{document} LuaTeX first error: LaTeX Warning: You have requested, ...
3
votes
3answers
7k views

TeX Live (and MiKTeX) + Windows 7 + Texmaker problem with expl3.sty

I recently updated MiKTeX and I can't compile anymore xelatex through Texmaker simple multilingual tex e.g. \documentclass{article} \usepackage{xltxtra} \usepackage{xgreek} ...
19
votes
2answers
411 views

Usage of \lastbox

As part of our LaTeX3 work, we provide a consistent interface to TeX programming through the expl3 package. We've recently been discussing the TeX primitive \lastbox, which is used to inspect or ...
10
votes
2answers
287 views

How do I pass an expanded optional argument using expl3/xparse?

I have a command defined using xparse syntax: \DeclareDocumentCommand \foo { O{} m } {} Inside some other command (say, \bar), I want to call this command. The calling command (\bar) has to ...
28
votes
2answers
747 views

Moving to LaTeX3 for package authors

I would like to write a package using as much of LaTeX3 stuff as possible (in particular expl3, xparse and xtemplate). What should I read to learn these? In particular: I know that there are good ...
16
votes
2answers
712 views

Where can I find the LaTeX3 manual?

Few month ago I saw a big pdf-manual of all LaTeX3-packages and the new syntax. I think it was bigger than 300 pages. I can't find it on the web. Does anyone have a link?
6
votes
1answer
1k 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 ...
4
votes
1answer
442 views

LaTeX3: Defining key to set boolean variable

I want to define a key, which, if set, sets a boolean variable to false. The documentation is not clear on that point. It states (source3.pdf, sect. 87, p. 134): Defines <key> to set ...
4
votes
1answer
264 views

LaTeX3: expansion of argument to function

I would like to define functions which extract the PDF object number from a PDF object reference, such as 12 from 12 0 R. I defined two versions of such a function, a low level one and a high level ...
4
votes
2answers
5k views

What's the deal with Tex Live and expl3.sty?

I've installed Tex Live 2010 on a mac, and when trying to use xelatex, I get the error: !Latex Error: File `expl3.sty' not found What is this package, and how can I get it installed on tex live? ...
10
votes
1answer
610 views

How can I define NaN in LaTeX3

LaTeX3 l3fp offers a way to check if a variable has a an infinite value. The following code defines a number and then sets its value to π/2. It then calculates tan(π/2) to get a large result. ...
8
votes
1answer
440 views

How do I use the sin function in LaTeX3

I am exploring some of the LaTeX3 routines and syntax. How do I get to use functions such as sin etc. I get an error with the sin function in the following (please uncomment sin function to view the ...
6
votes
3answers
3k views

What LaTeX Lab packages use expl3?

I am trying to migrate documents to http://latexlab.org, but they won't compile because they require expl3.sty. Yesterday I started by uploading all of the expl3 sty files but then latex demanded even ...
2
votes
2answers
199 views

How can I make RHEL server libraries compatible with tex/Rnw documents created on my Ubuntu desktop, re: pgf, tikz, expl3

I want to compile tex and Sweave documents written on a server that is redhat, but I get errors linked to pgf/tikz. The documents compile fine on my I have already used wget to download the expl3 ...
17
votes
1answer
410 views

What are expl3 quarks? When, where, why and how should I use them?

I feel particularly bombarded by sub-atomic particles right now (and it's mostly Will's fault :)). First, in Will's answer to this question today, he referred to expl3's \prg_case_str:nnn command. ...
11
votes
1answer
828 views

A LaTeX3 macro to typeset chemical compounds?

Out of curiosity I wonder how would a macro coded in expl3 that does the basics of mhchem (as in section basics in mhchem manual) looks like? I have found examples in TeX and LuaTeX in ...
19
votes
7answers
1k views

Pros and cons of the LaTeX3 syntax?

The programming language introduced by expl3 in LaTeX3 is a bit unusual compared to other TeX macro languages in that it uses both _ and : for function names. Could someone provide some technical ...
15
votes
3answers
620 views

Will LaTeX3 have proper support for hooks? Does LuaTeX?

Tex has powerful support for extensions triggered by events happen in generating output, by running one of six token lists appropriately: \everycr \everydisplay \everyhbox \everymath \everypar ...