Skip to main content
6 votes
Accepted

expl3 \seq_set_split:Nnn in a \foreach loop

You need to expand \i before \remplielaliste sees it: \expandafter\remplielaliste\expandafter{\i} However, I believe it's better if you do it with just expl3. \documentclass{article} \ExplSyntaxOn \...
egreg's user avatar
  • 1.1m
5 votes
Accepted

Creating a property list. I'm new to expl3

I propose a different approach using a sequence. Unlike a property list, which is unordered, sequences can be used as indexed sequences. In this case, the data structure is inherently ordered and ...
cfr's user avatar
  • 207k
5 votes
Accepted

Expand a `.cs` defined by key inside the function

You are defining the command inside a group and use it outside so it is always just #1 at the point of use (add \show as in \show\__foreach_wrapper:n \__foreach_wrapper:n to see You ...
David Carlisle's user avatar
5 votes
Accepted

Customize minipage to support spaces below it

The definition of \end{minipage} is: \def\endminipage{% \par \unskip \ifvoid\@mpfootins\else \vskip\skip\@mpfootins \normalcolor \footnoterule \unvbox\@mpfootins ...
Max Chernoff's user avatar
  • 7,441
4 votes
Accepted

Why would anyone use `\obeyedline`, what meaning should it have in the latest textlive distirbution?

The \obeyedline command was introduced to allow abstraction in handling of grabbed verbatim lines when creating a document command using \NewDocumentCommand or similar and the +v-type argument. In the ...
Joseph Wright's user avatar
  • 262k
4 votes
Accepted

LaTeX3: detecting default command inputs once stored in sequences

There are two issues with your approach. (Also, \str_const:Nn \c_blair_NoValue_str is missing a value - but I assume you have that in your real file.) First, \tl_set:Nn \l_tmpa_tl { \seq_item:Nn \...
Joseph Wright's user avatar
  • 262k
4 votes

Expand a `.cs` defined by key inside the function

You want to precompile the initial values, rather than using a group. The code can be streamlined: for instance o in the argument list to \foreachinprop can be more simply +O{} and there's no need to ...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Add `.meta` key to existing keys (l3keys)

The following does that (if I understood you correctly). It needs two error messages that I didn't define, the first is unknown-set that's thrown when the optional argument can't be resolved to one of ...
Skillmon's user avatar
  • 61.6k
3 votes

Creating a property list. I'm new to expl3

Your issue is with this line: \exp_args:Nno\prop_put:Nnn \g_my_prop {#2}{\int_use:N \l_citecounter_int} which expands as follows: Argument Expansion \prop_put:Nnn N \g_my_prop n {#2} o {\int_use:...
Max Chernoff's user avatar
  • 7,441
3 votes
Accepted

Supplying data to hyperref's pdfauthor: different command types give different results

Your problem is one of expansion, see for example What is "expansion"? and What is the difference between Fragile and Robust commands? When and why do we need \protect? for some info on that....
schtandard's user avatar
  • 15.4k
1 vote
Accepted

Uppercase & abbreviation dot in a field - string manipulation

As discussed in the comments (and in particular in https://github.com/plk/biblatex/issues/295 and linked issues) an actual solution is not going to be easy and I didn't have time (and probably won't ...
moewe's user avatar
  • 178k
1 vote

Uppercase & abbreviation dot in a field - string manipulation

I found a solution with expl3 (of which I'm not at all an expert). Below the wme: \begin{filecontents}[overwrite]{\jobname.bib} @customa{test, author = {Author}, nameaddon = {nameaddoN}, %...
matteofg's user avatar
  • 175
1 vote

Count sections inside collected environment

It is easier to evaluate the region but not use it in the final document. Unrelated but never use \\ at the end of a paragraph (I left them in, but LaTeX does warn about them) \documentclass{article}...
David Carlisle's user avatar
1 vote

Function to output array in itemize

A macro defined with \newcommand is not quite the same as a clist. The problem fits in a line of list management questions in the last few days. Here I propose to internally use sequences, rather than ...
egreg's user avatar
  • 1.1m
1 vote

How do I print a control sequence in LaTeX3 with the backslash?

I always use the following solution to print control sequences that contain \, _ or :. Take \tl_set:Nn as an example: \documentclass{article} \usepackage[T1]{fontenc} \ExplSyntaxOn \NewDocumentCommand{...
zpding's user avatar
  • 134

Only top scored, non community-wiki answers of a minimum length are eligible