Tagged Questions

{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

6
votes
1answer
41 views

More robust macro for ranges AND series of lines, measures, etc

Starting with @egreg's marvellous xparse answer to my question about a Macro for abbreviated ranges (pages, music measures), how to define a similar command that can also handle non-contiguous ...
5
votes
2answers
115 views

Difference between tokenlist and raw text in expl3

How to split token list by any char, like a raw document text? For example, i have a code to bold first word in macro argument. Macro is correctly works for direct using from code, like \bfirst{word ...
3
votes
1answer
42 views

Displaying verbatim content with \tl_to_str:*

\documentclass{article} \usepackage{expl3} \ExplSyntaxOn \begin{document} \tl_to_str:n { testing _ things } \par \tl_set:Nn \l_tmpa_tl { testing _ things } \tl_to_str:N \l_tmpa_tl \end{document} ...
11
votes
2answers
129 views

Reading in a conf file as a property list

I'm not worried about supporting sections, although a bounty would be given for doing so :) Here's what I have so far, but it produces strange output for #2: \begin{filecontents}{test} \Property ...
5
votes
1answer
41 views

Is it possible to tell l3docstrip to use another alias than @@?

The l3docstrip's main feature (replacing @@ by a module prefix) is very nice, except for those whose keyboards don't give a handy access to @ character (e.g. AltGr+0 on French keyboards). Is it ...
5
votes
1answer
47 views

Token replacement within a group

A comment below has clarified my problem, it has nothing to do with lua. In the code snippet below: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \cs_new_protected:Npn ...
6
votes
1answer
79 views

LaTeX3's \GetIdInfo: how is its argument automatically populated?

The l3bootstrap's documentation says \GetIdInfo extracts all information from a SVN field. But I have no idea where this field comes from. So I'd like to know how \GetIdInfo does work and if it is ...
5
votes
1answer
81 views

LaTeX3: Peek for spaces

I don't get space-observing look-aheads right. What am I doing wrong here? \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \cs_new_protected:Npn \testInNormalLaTeXSyntax #1 ...
5
votes
2answers
79 views

LaTeX3: tl_map with spaces

Is there a version of tl_map that does not ignore spaces that are part of a token list? \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \tl_new:N \l_token_tl \tl_set:Nn ...
6
votes
1answer
36 views

SplitArgument on colon doesn't work under expl3 syntax

\documentclass{article} \usepackage{xparse} \DeclareDocumentCommand\TestA{>{\SplitArgument{1}{:}}m}{% \Example #1 } \ExplSyntaxOn \DeclareDocumentCommand\TestB{>{\SplitArgument{1}{:}}m}{ ...
7
votes
2answers
142 views

Workaround how to use expl3 functionality in tikz

What I want to do I want to create a command \planfigur{<edges>}{<angles>} which draws a triangle using TikZ. \planfigur should have 2 mandatory arguments, which let me specify edges ...
2
votes
2answers
106 views

LaTeX3: If next in input stream is command X or environment X, do Y else Z

Because I write my own document class (okay, I try to ...), this question bothers me for weeks as there are many situation, in which I need something like this. Is there a way to test, if the next ...
10
votes
1answer
136 views

determine character code in LaTeX3 (equivalent for backtick notation)

Is there some dedicated expl3 command that is equivalent to the backtick notation of TeX in order to determine the character code?
3
votes
1answer
38 views

Accessing sub/keys with l3keys

I'm not sure if I'm taking it too far, but I think I've seen something like this around. This gives an error: \documentclass{scrartcl} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand \RULE {} ...
2
votes
0answers
39 views

Looking for (some) l3box equivalents of graphics' \resizebox variants

AFAIK, the box resizing functions of the l3box module are implemented using the LaTeX2e graphicspackage. However, some of the \resizebox variants don't have an expl3 counterpart. The available ones ...
1
vote
0answers
174 views

ubuntu installing l3kernel and l3packages

I apologize for this very basic question. I've downloaded the current versions of l3kernel.zip and l3packages.zip, but have no idea how to install them. As far as I can tell, there is no ...
9
votes
2answers
255 views

How can I define a greedy macro?

I have a feeling this is a duplicate somewhere, but how can I ensure that TeX will keep scanning until \relax or something similar? \documentclass{article} \usepackage{xparse} \pagestyle{empty} ...
5
votes
1answer
92 views

How can I give active characters definitions with expl3?

It's very much glossed over in texdoc interface3… \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand \Digits { m m }{ \group_begin: \char_set_catcode_active:N ; ...
2
votes
1answer
100 views

How can I avoid the need for global variables here?

Consider the following example: \documentclass{article} \usepackage{xparse} \usepackage{longtable} \usepackage{multirow} \usepackage{hyperref} \ExplSyntaxOn \int_new:N \g__ioiooiioio_args_int ...
3
votes
1answer
55 views

Expanding expl3 counter test at the right moment

I'm trying to get a counter to work, called \l__ioiooiioio_args_second_int in the example below, and I've declared to increment at each loop through \int_incr:N \l__ioiooiioio_step_int, but apparently ...
6
votes
1answer
89 views

Use choice key with choices setting booleans

When defining choice keys with l3keys2e there are two possible ways and I use the one with sub-keys in a new package. When defining watch each value should do interface3.pdf says that I can use .code ...
6
votes
1answer
166 views

Reading Arbitrary Text into a table format

Another file question from Latex; this time I'm trying to read in data from a single text file and put it directly into a table. The file reads something like: something | data | stuff | bacon ...
3
votes
1answer
51 views

Getting the current value of a global variable into a prop list

This is a more or less direct follow up to this question. The problem there was to get the current value of a global variable into a LaTeX3 prop list. The trick was to use the V variant to get the ...
3
votes
1answer
69 views

How can I have (or emulate) 'normal' behavior with \ParallelPar when working across pages (on a spread)?

The parallel package is able to set parallel columns and align them at \ParallelPar tokens: \documentclass{article} \usepackage{parallel} \usepackage{mwe} \begin{document} ...
4
votes
3answers
191 views

Problem with ExplSyntax

I'm trying to define a flexible "delimiter styling" command. I tried it in a package, and \str_case:nnF returned Undefined Control Sequence, whereas using \str_case:nnn went further and caused a ...
9
votes
1answer
74 views

LaTeX3 Property lists and expansion

So, I'm trying to pass the "date" value associated with the current environment to a property list defined by a macro. It doesn't seem to work and I'm not sure why. Here's a MWE: ...
5
votes
1answer
66 views

How can I combine \seq_use:Nn and \seq_map_inline:Nn?

The following 'naïve' solution throws the error: ERROR: Misplaced \omit. --- TeX said --- \multispan ->\omit \@multispan l.13 } \\ --- HELP --- From the .log ...
7
votes
1answer
36 views

Built arguments not getting properly passed

I've got some rather complicated arguments that I must build gradually and then pass to another macro. The MWE is greatly simplified. Here's my attempt using expl3. The problem is that no matter ...
8
votes
1answer
85 views

Why is \str_if_eq_p:nn not evaluating to true?

In the following MWE, \str_if_eq_p:nn is not evaluating to true when \l_aepoly_presentation_style_tl is set to ABC. Why? \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \tl_new:N ...
4
votes
2answers
143 views

Manipulate a LaTeX2e counter with LaTeX3

I have some expl3 code where I want to manipulate a counter which is defined by a package using LaTeX2e code. If I want to manipulate the counter foo, I could either mixing up LaTeX2e code with ...
6
votes
1answer
64 views

Is there a way to pad zeros to the end of a rounded number with Expl3?

I've been able to put a table of trig values together using expl3. However, I would like to pad zeros to the end so that all values have four decimal places. Is there a straight-forward way to do ...
9
votes
1answer
107 views

\hbox_overlap_right:n{} vs. \makebox[0pt][l]{}

I stumbled about some, to my understanding, unexpected behaviour of the expl3 command \hbox_overlap_right:n. I was expecting all examples below to produce the same result, that is, the frame box ...
7
votes
3answers
523 views

Command that changes its definition the nth time it's used

I need a command to behave differently the first time than the next times it's called. Right now I use \newcommand\foo{First\gdef\foo{Next}}, that is, it redefines itself the first time. Moreover, I ...
5
votes
1answer
233 views

Scientific Notation Only For Large Numbers — with uncertainty

I've been using Betohaku and Bruno Le Floch's answer to Scientific Notation Only For Large Numbers to turn scientific notation of as follows: \documentclass{standalone} \RequirePackage[ ...
5
votes
2answers
108 views

expl3 code with tabularx

In a nutshell: I've seen code for creating tables programmatically using tabular. Can it be done using tabularx? If so, how? I'm a math teacher, and I'd like to create a "problem set" environment in ...
5
votes
1answer
77 views

\int_incr:N inside tabular environment

I started learning LaTeX3 a few weeks ago and I'm currently playing around with tables. Here is my code: \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \cs_new_protected:Npn ...
5
votes
0answers
62 views

Convert sequence to table [duplicate]

I'm trying to write a macro that converts a sequence to a table. The following code works fine: \documentclass{article} \usepackage{expl3} \begin{document} \noindent \ExplSyntaxOn \seq_new:N ...
3
votes
0answers
27 views

Sequence empty right after setting [closed]

\documentclass{article} \usepackage{expl3,xparse} \ExplSyntaxOn \ProvideDocumentCommand \Union { O{\cup} O{,} m } { \typeout{#3} \seq_set_split:Nnn \l_lmpa_seq { #2 } { #3 } \seq_show:N ...
7
votes
1answer
49 views

Why does \iow_shipout: introduce typeset whitespace (where \iow_now: does not)?

For my resume, I have an environment that lays out information in two minipages—one for position/education data, one for the environment contents. The class I wrote also produces plain text ...
11
votes
1answer
144 views

Is it reasonable to expect an expl3-compatible release of TikZ/PGF in the future? / Workarounds for using TikZ under expl3 syntax

Keeping in mind: TikZ uses space tokens significantly, and expl3 syntax completely disregards whitespace and will only become more prevalent, is it reasonable to expect a future version of TikZ ...
7
votes
1answer
102 views

Clash between fontspec and l3keys2e with multichoice keys

Consider the minimal example: \begin{filecontents}{test.cls} \NeedsTeXFormat{LaTeX2e}[1994/06/01] \RequirePackage{expl3,l3keys2e} \ProvidesExplClass {test} {2013/12/23} {1.0} {A test class} ...
6
votes
1answer
66 views

How can I 'double-dip' environment contents to an external file with expl3?

I'd like to capture the contents of a particular environment and copy them, verbatim (n- type expansion), to an external file already set up as an iow output stream. My first thought was to simply ...
11
votes
2answers
87 views

How can I insert an entire input stream (up to EOF) into an output stream?

I am trying to automate the generation of a text version of my resume. I'd like to incorporate a note to any potential human readers (most plain text resumes are, to my understanding, simply scanned ...
8
votes
1answer
79 views

How can I expand macros and write the expansion to an external file?

I'm trying to do a bit of single-sourcing with my resume, and would like to write given information to an external text file. \documentclass{article} \usepackage{expl3,xparse} \ExplSyntaxOn ...
4
votes
1answer
49 views

Expl3 prop doesn't seem to work when the key is a macro value

I'd expect this example code to give two identical lines, however \usevalue{\xyz} doesn't result in XYZ as the other. Can I force the key to be expanded to make \usevalue{\xyz} and \usevalue{0} refer ...
13
votes
1answer
148 views

How do I insert a tie (~) under expl3 syntax?

I need to define a token list of the form \tl_new:N \g_silly_tl \tl_set:Nn \g_silly_tl { Text ~ and ~ a ~ tie:?? } How do I do this? More generally, is there a reference where one can see how ...
11
votes
1answer
108 views

Processing document class options with l3keys

How can I parse (that is, access) the entire option list given to the current document class with l3keys? This would obviously need some sort of \keys_define:nn { document-class-?? } { default ...
7
votes
1answer
100 views

Trim spaces in a macro with expl3

I'm inserting graphics from data in a csv-file and due to lazy input I have to get rid of leading and trailing spaces. It works fine with the trimspaces package. \documentclass{article} ...
7
votes
1answer
192 views

Using cleveref for cross-referencing to exsheets questions

I really like the functionalities offered by exsheets, a package for typesetting exercise sheets and exam papers (and their solutions). One particularly nice feature is the possiblity of assigning ...
6
votes
1answer
98 views

Expanding a macro as many times as possible without error

I'd like compute cosets using the permute package. Here's what I have so far: \documentclass{article} \usepackage{expl3,xparse,permute} \ExplSyntaxOn % Create a new command to compute the right ...