{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

9
votes
1answer
238 views

Store results of a calculation automatically under a new macro name

As I am now accessing values from tables via a macro to make dynamic references in the text (see here) and make calculations with it, I need a way to make the resulting variables under which the ...
4
votes
1answer
258 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
0answers
440 views

Trying to make an automatic histogram (in pgfplots?) [closed]

How can I convert the automatic table generated by the macro, to an automatic histogram? Is the best way do it using pgfplots? \documentclass{article} \RequirePackage{ifthen} ...
3
votes
1answer
263 views

Problem with tikz-pgf and \pgfmathabs

This is a follow up question to Problem with pgfmathsetmacro in foreach loop with pgfplots. In short I also want to use \pgfmathabs to get the absolute value of a number in that example (with \i as ...
6
votes
1answer
182 views

luacode and ExplSyntaxOn/Off

I'm trying to build some sort of an interface to a lua matrix module. I've navigated a few issues and arrived at something that I felt like I could probably modify to work. Anticipating the need for ...
4
votes
1answer
151 views

Extra line in a tabular using expl3 syntax

I'm having trouble using (the amazing) expl3 package with a tabular environment. Specifically, I'm getting a full extra row in my tabulars when creating rows using \seq_map_inline. I can avoid this ...
14
votes
1answer
845 views

How to transpose a table in expl3

I've been very impressed with xparse and expl3, and have written a wonderful document command using \ProcessList that takes a comma separated list and turns it into a (basically) 1 column table. ...
4
votes
1answer
110 views

Symbolic functions: changing catcodes and \tl_rescan:nn

The goal is to have the user input (for the sake of argument) a linear function in one variable, for example 2*x+3 along with the variable (this isn't crucial) and a value for the variable. I would ...
4
votes
2answers
89 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
136 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
396 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
137 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
434 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
120 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
351 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
448 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
355 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
178 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
236 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
107 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
107 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
520 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 ...
7
votes
1answer
226 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
7k 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
1answer
607 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
183 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
210 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
353 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
359 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
194 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 ...
103
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
323 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
312 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
144 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
308 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
677 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
944 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
427 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
301 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
758 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
730 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?
7
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
446 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
266 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? ...