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

How to use a local variable inside a macro in expl3

I extended egregs answer by defining a macro, that creates and initializes an fp value in 1 line. Then put the variables into a sequence and printed the sequence: \documentclass{article} ...
7
votes
1answer
85 views

Use expl3 variable decimal representation outside of expl3 block

Suppose, I have a floating point value inside expl3 block. Can I use it's decimal representation outside of expl3 block? This doesn't work: \documentclass{article} \usepackage{expl3} ...
4
votes
1answer
72 views

How to format expl3 floating point number using siunitx

Code \documentclass{article} \usepackage{expl3} \usepackage{siunitx} \setlength\parindent{0pt} \begin{document} \ExplSyntaxOn \fp_new:N \mynumber \fp_set:Nn \mynumber{5} \fp_div:Nn \mynumber{2} ...
6
votes
2answers
66 views

Inline Mapping Bug?

The enclosed document creates a sequence variable and then uses inline mapping to attach a sequence number to each item. The inline map then outputs the result and places it into a token list variable ...
9
votes
2answers
130 views

Emulating \@ifnextchar in expl3

I would like to write an expl3 version of the following. \documentclass{article} \makeatletter \def\ie{i.e\@ifnextchar.{}{.\@{} }} \makeatother \pagestyle{empty} \begin{document} \noindent \ie ...
9
votes
3answers
158 views

Test whether last letter of a string is upper case or not

I would like to define a command that will behave according to the nature of the last character fed it. But I'm having difficulty just getting the components of my command to work. I thought I could ...
13
votes
1answer
131 views

How do I register the prefix of my expl3 package?

This question needs an easy to find answer here, so: I was told that I can and should register prefixes of my macro names in my expl3 using packages. How do I do that?
7
votes
2answers
139 views

How to document a expl3 macro using dtx

I am writing the documentation to a package implemented in expl3 using ltxdoc, and the relevant part would look like % \begin{macro}{\conteq_args_once} % Some explanation % % \begin{macrocode} ...
8
votes
2answers
153 views

Can I store sequences in sequences with expl3

The documentation for l3seq states LaTeX3 implements a “sequence” data type, which contain an ordered list of entries which may contain any balanced text . but for many programming tasks it ...
8
votes
2answers
272 views

PDF keywords from Expl3 clist

I’m trying to add PDF keywords to my résumé. In the custom class file, I have these lines: \clist_new:N \jcsres_keywords_clist \NewDocumentCommand \keywords {m} { \clist_gset:Nn ...
3
votes
1answer
80 views

Expl V-type argument no fully expanding as I expected

This is related to an earlier question of mine. I'm posting my own interpretation of what's happening hoping that if I'm wrong, someone will chime in an explain why. The issue with xparse's ...
5
votes
2answers
119 views

Expl variable assignments not behaving as I expect

I don't get what I'm doing wrong here. Neither of the commented lines work as the uncommented version does. \begin{filecontents}{silly.tex} This is just a test. \end{filecontents} ...
4
votes
2answers
82 views

“hiding” \par from a tabular

I want to use a macro to write a line of a tabular. As part of this macro, there is an argument that isn't set in the tabular, but is saved for later use. This unused argument should be allowed to ...
8
votes
1answer
121 views

Sorting a clist in LaTeX3

I have a clist that I'd like to bubble sort. I'm sure this is a simple matter of something like \clist_bubblesort:N or something, but I don't know what the appropriate incantation is. A quick google ...
6
votes
2answers
75 views

l3prop - getting an entry inside a macro fails

I the following example I defined two new macros \UseLength and \xUseLength. Both macros shall put back the stored value of the key in the input stream. The macro \UseLength works as expected. The ...
5
votes
1answer
64 views

How to redefine \str_if_eq:xxTF for backward compatibility

I just updated all the packages for TeXLive 2012 today and it appears that \str_if_eq:xxTF has been deprecated. How do I define a macro so that I can use the latest TeX Live but still be able to run ...
4
votes
2answers
127 views

Can't generate a tikz matrix, using expl3

Suppose, I want to generate a matrix of nodes: \documentclass{article} \usepackage{expl3} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \matrix [ row ...
3
votes
1answer
98 views

How to use a macro inside \tl_set:Nx

This code works: \documentclass{article} \usepackage{expl3} \usepackage{color} \setlength\parindent{0pt} \begin{document} \ExplSyntaxOn \tl_new:N \_text \tl_set:Nn \text {1} \tl_set:Nx \text ...
3
votes
1answer
75 views

expl3 outputting sequence of plists

Suppose, I have a sequence of 2 plists: ( { 1 => 2, 3 => 4 }, { 5 => 6, hello => 8 } ) I am traversing through the sequence and want to output only plists, ...
35
votes
2answers
525 views

What do ExplSyntaxOn and ExplSyntaxOff do?

Related to the question What do \makeatletter and \makeatother do? for LaTeX2e, here related to LaTeX3 What do \ExplSyntaxOn and \ExplSyntaxOff do?
6
votes
3answers
357 views

How to use data structures in TikZ?

I created a foreach statement, using expl3 and TikZ/pgf: \documentclass{article} \usepackage{tikz} \setlength{\parindent}{0cm} \usepackage{expl3} \ExplSyntaxOn \cs_new:Npn \Counter #1 \Stopper { ...
9
votes
2answers
145 views

Text within ExplSyntaxOn/Off

As below, I would like to test whether a user has input some custom text, and if not, then to display default text. \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \tl_new:N \l_empty_tl ...
7
votes
1answer
337 views

Wrapper for siunitx' \SI macro to automatically split number and unit

Problem I use the siunitx-package to typeset numbers and units with correct spacing etc. There is a command \SI{<number>}{<unit>} for that. However, it would be much easier to write ...
4
votes
1answer
139 views

Search specific entries in database

I have written a command, which takes five arguments to interpolate between two points. Now I tried to get the two points from an csv file. \documentclass{article} \usepackage{expl3} ...
8
votes
1answer
152 views

Working with clist indices in LaTeX3

Friends, I'm trying to port an old code of mine to a LaTeX3 implementation. Thanks to egreg, Joseph and David, I made a good progress! But then, I got stuck. From the link above, I'm porting my ...
3
votes
1answer
62 views

How do I create an expandable conditional with a loop inside?

I need to create an expandable conditional that uses a loop (that is, a ..._map_function:). It should either return true from inside the loop, or return false otherwise. In a 'normal' programming ...
4
votes
1answer
112 views

Writing macros on file defined at compilation time

This is a follow-up to this question. I have a LaTeX3 code that reads a file formatted as follows: <numberA> "<nameA>" <numberB> "<nameB>" <numberC> "<nameC>" ...
1
vote
0answers
71 views

Conflict between expl3.sty and breqn [duplicate]

I've encountered some problems using the breqn-package. I've allready read most of the topics on this forum about breqn but didn't find a solution. When I use the breqn-package, the log-file produces ...
3
votes
0answers
797 views

miktex 2.9, l3kernel installation fails [closed]

I freshly installed 2.9 I tried to compile a XeLatex document, which works fine on my work computer. I got the following error: expl3.sty missing. It tries to install l3kernel starting package ...
14
votes
2answers
334 views

LaTeX3: How to get reliable control over the level of expansion?

Say you want to write LaTeX3 code that manages user data. Sometimes you want to process that data, but other times you just want to store it, move it around and return it unchanged (when developing a ...
3
votes
1answer
69 views

List Version of \str_if_eq

I am using \str_if_eq:xxTF{\A}{\Target}{<true>}{<false} to execute the <true> or <false> code if \A=\Target. What is the list version equivalent of this? So I am looking for ...
14
votes
1answer
343 views

Is there a LaTeX3 approach to \ignorespaces?

The following code works as I would like it to: Given the state of the boolean, certain content is to be printed or not. If it's not printed, then I run the risk of creating extraneous whitespace. ...
6
votes
2answers
145 views

How do you signal an error from within an expandable function?

I would like to do some error checking from within an expandable function. But my attempts at signalling an error are not processed correctly, but rather returned to the input stream---contrary to my ...
2
votes
1answer
91 views

Unexpected hung latex compilation with property list retrieval

This is very closely related to a previous question of mine. From the comments to this previous question, I understand that my approach here is completely wrong headed. So why bother post a ...
4
votes
1answer
105 views

key values getting improperly passed through a property list getter function

I'm creating rather complicated diagram and would like to put all the controls all in one easy to find location and not scattered throughout the document. To do this, I've created setter and getter ...
15
votes
1answer
408 views

Guidelines: when is LaTeX3 too much LaTeX3?

This morning I found myself writing a document where essentially the same text is repeated several times. Because I've been mucking around a lot recently learning LaTeX3, it took absolutely no ...
2
votes
1answer
211 views

LaTeX complaining about illegal parameter number

Inspired by a question yesterday, I thought I'd try my hand at a LaTeX3 solution which would show how to convert base 10 numbers into any other base of the user's choice. Yesterday I wrote a nice ...
8
votes
1answer
131 views

printing the value of a boolean to terminal without stopping latex

I'm trying to debug some LaTeX3 code. To do so I would like to write the value of an internally generated boolean to the terminal, but I don't want to stop the work-flow of the LaTeX run. For the ...
11
votes
2answers
253 views

aliasing vs variants — preferred practices?

This is somewhat related to a question I asked earlier here. I'm trying to split a token using a delimiter. However, the delimiter is stored in a token. Looking at the most recent documentation, I ...
5
votes
2answers
172 views

Splitting delimited token list argument

I wrote a little piece of code (function \getfirst:w) that splits its delimited argument at the first embedded :. The code works well if used standalone, but I am unable to place it into the .code:n ...
4
votes
1answer
68 views

testing whether a variable or control seq. is a box in LaTeX3

Is there a way, in LaTeX3, to find out whether a given control sequence or variable is a box register (created with \box_new:(cN))?
4
votes
1answer
136 views

Commands from xparse inside functions created by \cs_new:Npn?

Is it okay to put commands from xparse inside functions created by \cs_new:Npn instead of \NewDocumentCommand? Would that be a confusion of programming levels? The example below works but I was ...
3
votes
0answers
80 views

Is there a gentle introduction to learning expl3 syntax [duplicate]

Possible Duplicate: Programming with LaTeX3 I was going to post a question about creating a switch within a command to determine formatting for a command and came across the following link ...
14
votes
2answers
147 views

writing to \jobname.aux using LaTeX3

In LaTeX2e, one can write to the standard auxiliary file via the \@auxout file handle. Are there dedicated LaTeX3 functions (planned) that facilitate writing to \jobname.aux or is there an equivalent ...
5
votes
0answers
3k views

File expl3.sty not found when trying to compile a *.tex file with XeLaTeX [closed]

I've installed XeTeX to my Fedora 17 recently (before that, I was using pdfLaTeX). The main reason for switching to XeTeX was the polyglossia package I'd like to make use of. Unfortunately, whenever ...
9
votes
1answer
225 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
251 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
438 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
249 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
180 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 ...