36
votes
2answers
539 views

How “safe” is it to use LaTeX3 (l3packages, l3kernel)?

Are l3kernel and l3packages present in most of the LaTeX distributions? Are they "stable enough"? I am asking this because I am preparing a .tex document for a client. I have found convenient to use ...
2
votes
1answer
90 views

How can I pass optional arguments as optional arguments?

I have the following environments which are being used in my document. As you can see, a lot of unnecessary complexity is being added by my arcane optional argument handling using \IfValueTF. Is there ...
10
votes
1answer
139 views

Processing a sequence of pairs

I want to process a list of pairs like this: {{a1,b1},{a2,b2},{a3,b3}} where the first items in each pairs are distinct. So, for each pair of those {ai,bi} I would need the following data: ...
7
votes
1answer
81 views

Filling a table by iterating over a sequence produces an orphan cell

I'm trying to fill a table with content that is stored in a sequence by a custom command. \documentclass{article} \usepackage{xparse} \usepackage{expl3} \ExplSyntaxOn \seq_new:N \my_sequence ...
5
votes
2answers
78 views

How can I refer to an absent value in expl3?

The xparse package has a concept of -NoValue-, a kind of '\null' token used to represent the absence of any value (where \null would probably be considered a value). If I would like to manually use ...
6
votes
1answer
94 views

Is there something like a scope of \NewDocumentCommand?

Following along the line of my (confused) post on xparse and expl3, but this time hopefully with no typos or missing characters, I've devised a small package just to check a l3keys-based definition ...
4
votes
1answer
108 views

Dazzled and confused about xparse and LaTeX3 Booleans

I'm just starting my journey with LaTeX3/expl3, and although fascinated by the great work that the LaTeX3 team is doing, and by the enormous difference it brings about with respect to "classical" ...
5
votes
0answers
75 views

What are best practices when augmenting and building on the keys provided by someone else's package

The situation is one where I'm developing my own commands and environments which build on the commands and environments provided by another package: for ease of talking let's call this other package ...
9
votes
3answers
151 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 ...
5
votes
2answers
114 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
77 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 ...
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
1answer
113 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 ...
14
votes
1answer
669 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. ...
2
votes
1answer
117 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 ...
6
votes
3answers
391 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 ...
10
votes
2answers
276 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 ...