Please do not use this tag for general LaTeX questions. {latex3} is about the new material being developed by the LaTeX3 project. This includes the expl3 programming language along with higher-level concepts such as xparse and xtemplate.

learn more… | top users | synonyms

3
votes
0answers
13 views

LaTeX3 l3msg best practices

The LaTeX3 module l3msg provides some nice functions for messaging, errors, warnings and the like and is truly flexible. The workflow is different from what we have been using for LaTex2e packages. ...
1
vote
1answer
15 views

subfloat figures in two row with labels top left corner

I want to put two subfigures in two rows but with labels(captions) in top left corner of each subfigure. like this but in two rows not side by side preferebly some vertical space between them. Subfig ...
6
votes
1answer
173 views

What exactly is latex3/xor?

The LaTeX3 source contains a folder xor which contains, among other things, xo-grid, which is supposed to provide LaTeX3 with grid support. To quote Joseph Wright, Getting to grips with xor is one ...
6
votes
1answer
66 views

Capitalization in headings - a LaTeX3 approach

In the early days of this site we had a question Automatically capitalize first letters of words in titles? with one solution. Since expl3 has matured well since then I have worked out a partial ...
2
votes
1answer
27 views

What are the disandvantages for using a rule to define an \hspace-like command?

In the LaTeX2e source code \hspace and its star version are defined with \hskips. I have defined an alternative version using rules. I cannot see any obvious disantvantages of this approach other than ...
4
votes
1answer
55 views

LaTeX3 iteration and token list comparisons-code improvement

I am trying to make a fully expandable function that uses two arguments. The first one is the tokenlist to test against the second argument another tokenlist. The test is a character by character ...
3
votes
0answers
46 views

How can I apply actions to specific items or after specific items in a sequence in LaTeX3?

Let's say I have a sequence of items. I would like to allow for the user to provide a key (here named "mainitems") that equals a number (default 1 as there is always at least 1 main item). Special ...
8
votes
4answers
249 views

LaTeX3 Create environment around token list variable

LaTeX3 has some great concepts and functions. One is the ability to replace text in a token list. This opens up possibilities to create templates in a way that html templates are used for example by ...
3
votes
2answers
45 views

Writing a token list conditional with expl3

This is a follow-up question to LaTeX3 conditional with grouping fails to compile. I would like to write a token list conditional with expl3 that is fully expandable in order to use it as a predicate ...
3
votes
1answer
56 views

LaTeX3 conditional with grouping fails to compile

I am trying to write a LaTeX3 conditional using \prg_new_conditional:Nnn from the expl3 package. Since the code in the conditional needs to make assignments to some variables, I would like to use ...
8
votes
0answers
70 views

How to best make the transition from LaTeX2e to expl3 syntax

I was peeking at the LaTeX3 github repository and specifically l3auxdata.dtx. There was a surprise for me, as I have been practicing and studying the expl3 syntax and modules for the last couple of ...
4
votes
1answer
49 views

How can I use the ampersand (&) as a delineator for tabs in LaTeX3 (expl3)/xparse syntax?

This idea evolved from the question: How can I get a count of the optional arguments with xparse? Problem I cannot get the ampersand to function as a delineator (for tab stops) inside the ...
4
votes
1answer
60 views

Multiple uses of pgfpositionnodelater

I'm trying to generate and measure multiple nodes before placing them. Currently I'm using the following macros: % some helper / wrapper commands around \pgfplacenodelater % #1 = identifier for ...
6
votes
1answer
55 views

LaTeX 3 token list varables, mapping functions, differences between mapping inline and functions

I am looking for a good explanation of the differences and use cases, between the tl_map_function:nN and tl_map_inline:Nn. I provide a MWE for the inline which also appears to be the fastest. ...
5
votes
1answer
97 views

Differences in LaTeX3 function generation methods

In l3basics module there are two methods provided for each command generating function. The one requires the function signature to be provided, whereas the second does not. Since the second is more ...
1
vote
1answer
77 views

A clean interface for hooking into sectioning commands

Is there an easy way to hook LaTeX's sectioning commands, short of the good ol' \let + \def (or, with xparse, \let + \RenewDocumentCommand{s O{} m})? I'm looking for something in the spirit of ...
3
votes
0answers
78 views

Immutable functions in latex3?

Imagine we have a nonempty sequence named \l_tmpa_seq. We want to assign a name \l_tmpb_seq a value which is the result of invoking a function like \int_eval:n {#1 + 1} on every member of the ...
11
votes
1answer
455 views

How will the LaTeX3 format look?

Can someone give me an idea (if it is at all possible) about how the document structure will be in the LaTeX3 format. Will it still start with a \documentclass and use \begin{document} ... ...
5
votes
2answers
82 views

Strange behave of index and l3regex

I am experimenting with LaTeX3 features and get a strange behaviour in a combination from index and l3regex. I try to replace all occurrences of :<space> with the exclamation mark sign, so that ...
2
votes
0answers
62 views

Determine whether the macro/function is in subscript, in superscript, or neither

I would like to provide different formatting for an xparse command, depending on whether the command is expanded in superscript, in subscript, or neither. That is, I would like to know inside the ...
6
votes
1answer
58 views

Define \keys_filter:nnnN without modifying core functions

I would like to define a function \keys_filter:nnnN which would do the very same thing as \keys_set_filter:nnnN but without the setting. I realized that the setting is realized by a core function ...
2
votes
1answer
71 views

Define an expandable function for comparing a token list to a string in LaTeX3

In LaTeX3, I could define a function for comparing a token list to a string \cs_generate_variant:Nn \tl_if_eq:nnTF { V } \cs_new_nopar:Npn \module_compare:n #1 { \tl_if_eq:VnTF \g_some_tl { #1 ...
2
votes
0answers
56 views

How do I get the length of a type-set argument to a macro in latex3?

I would like to be able to decide how long a resulting character sequence is, in order to properly type set an expression. Consider an argument like \varepsilon or \mathscr{A} which both result in a ...
10
votes
1answer
187 views

Penalty-enhanced approach to float placement in LaTeX3

This question is quite related to Penalty-enhanced approach to float placement, but here I am focusing on the situation for LaTeX3. The LaTeX2e float placement algorithm does not look backward ...
0
votes
0answers
33 views

Length of the inner-most plain-text argument (token sequence) in a nested macro expression (via expl3)

I would like to determine the length of the original token sequence passed to the inner-most macro as in \compl{\indexset{J}} where \NewDocumentCommand{\indexset}{m}{\mathsf{#1}} ...
3
votes
1answer
126 views

Write/Read values of the LaTeX commands (like \title, \ author etc) in file using Lua

This problem relate with other my question here . I found a solution with pdfpages package thanks to TX.SX: \documentclass[]{scrbook} \usepackage{authblk} \usepackage{pdfpages} ...
6
votes
1answer
77 views

TeX4ht and LaTeX3 - Do they go togther?

I'd like to add TeX4ht support for my package, which is written in LaTeX3. Is it safe to switch \ExplSyntaxOn inside a .4ht file? Should I switch it off at the end? If it was NOT safe, how should I ...
6
votes
1answer
78 views

LaTeX3: Correct way to define a macro with :o

If I want to define a macro in LaTeX3 syntax with one-level expansion of its argument (:o), I figured that it is not enough to \cs_new it that way. Instead, I have to \cs_new it as :n and then create ...
4
votes
1answer
429 views

Why a `Missing = inserted for \ifnum` error for empty l3seq sequences?

I'm trying to use expl3 sequences in order to stored 0, 1 or more affiliations to 1 or more authors stored in a datatool database. The following MWE works nicely: \documentclass{article} ...
21
votes
2answers
525 views

Sum of finite series using LaTeX 3

Is it possible to calculate the value of a finite series, say, using LaTeX 3?
7
votes
1answer
111 views

Does LaTeX3 have something for patching (or appending code to) commands?

Item #12 of http://tex.stackexchange.com/a/148734/18401 suggests that LaTeX3 maybe has something for patching (or appending code to) commands, à la etoolbox or xpatch. Is it the case?
2
votes
1answer
38 views

If used insdide \cs_new(_protected), \IfNoValue(TF) doesn't detect -NoValue- at document-level

I guess my problem is related to Commands from xparse inside functions created by \cs_new:Npn? but I still don't understand what's going on: in the following WE (not minimal, sorry for this), why ...
5
votes
2answers
70 views

LaTeX3 Expansion without \exp_after:wN

LaTeX3 reduces the need to use \expandafter/\exp_after:wN tremendously. But what is the LaTeX3 way for this problem? \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn ...
0
votes
0answers
42 views

How can I tl_put_right a genuine }

LaTeX3. How can I tl_put_right a genuine } into a token list? All my attempts to expand \c_group_end_token were not successful.
11
votes
1answer
127 views

Why spaces are ignored even in textual arguments within \ExplSyntaxOn… \ExplSyntaxOff?

I've seen workarounds for having the spaces recognized within \ExplSyntaxOn... \ExplSyntaxOff. But I wonder why spaces are unrecognized even for (LaTeX3) macros arguments undoubtedly expecting text, ...
5
votes
1answer
138 views

LaTeX 3 - How can I use it instead of the current?

Recently I updated my TeX Live distribution via the TeX Live Utility. I notice it installed three Packages: l3experiemtal, l3kernel, l3packages and lt3graph. I was wondering if can compile my ...
6
votes
2answers
105 views

How to define a private color in a (possibly LaTeX3) package?

Suppose I'd like to define, in a personal package mypackage, a private (xcolor's) color: \definecolor{my_so_beautiful_red}{rgb}{1,0,0} the name of which I'd like to not be accidentally used by ...
6
votes
1answer
98 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 ...
8
votes
2answers
175 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 ...
3
votes
2answers
142 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 ...
7
votes
1answer
177 views

How should I create complex objects using xtemplate?

Consider the following trivial example: \documentclass{article} \usepackage{xtemplate} \ExplSyntaxOn \DeclareObjectType { test } { 10 } \ExplSyntaxOff \begin{document} oh, nose! \end{document} ...
10
votes
1answer
134 views

List of all control sequences let to primitives in common formats

I would like to know a list of all control sequences which are let equal to primitives in common formats. For plain TeX for instance, we would get the list \endgraf % = \par \endline % = \cr \repeat ...
3
votes
1answer
58 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 {} ...
5
votes
2answers
158 views

Passing * arguments using xparse

In xparse I want to define a command Command-One which calls a command Command-Two and calls the *ed version if and only if the *ed version of Command-One was called. Specifically I would like to do ...
6
votes
1answer
190 views

\edef in LaTeX 3?

Is there a version of \DeclareDocumentCommand (in LaTeX 3) which performs like \edef? I.e. where the argument is evaluated at the time of definition as opposed to the time the macro is called? For ...
11
votes
1answer
298 views

Possible incompatibility - LaTeX3 kernel and EbGaramond.sty

In advance, I apologise if this is off-topic as "too localised", but I'm not sure where's the best place to ask. I am running TeX Live 2014 on Windows 7, fully up-to-date as of this morning. Here's ...
15
votes
2answers
427 views

“Hobby” library stopped working after updating to TeXLive 2014

After upgrading to TeXLive 2014 compiling my TikZ pictures prepared with the hobby library stopped working. Consider the following MWE: \documentclass{article} \usepackage{tikz} ...
1
vote
0answers
363 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 ...
4
votes
1answer
133 views

Test for empty value in xparse

Following the recommendation of the answers to this question, I use the following code \ExplSyntaxOn \DeclareExpandableDocumentCommand{\IfNoValueOrEmptyTF}{mmm} { \IfNoValueTF{#1} {#2} % true ...
3
votes
1answer
55 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 ...