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

5
votes
2answers
39 views

Why can you not skip lines in document when providing optional environment parameters with xparse?

Is it intentional that you cannot skip lines when using optional environment parameters with LaTeX3's xparse? It seems that you can skip lines with mandatory parameters. Compare ...
1
vote
0answers
148 views

PDF file size massive in MikTex

I did my thesis in Latex/Linux using raw gs commands and managed to produce the whole 150page monster within a few megabytes. For brevity I've decided, some 10 years on, to use Miktex under windows ...
5
votes
0answers
114 views

Forthcoming LaTeX3 User Manual

I read very recently that Frank Mittelbach has a Latex3 user manual/developer's reference (not sure which) in the pipeline - in fact its said "... only 250 days to go!". Unfortunately now I cannot ...
2
votes
1answer
86 views

Combine code from two LaTeX 3 answers

I'n trying to combine the code from the answers "Sum of finite series using LaTeX 3" and "Reducing fraction using LaTeX 3" to automatically calculate a finite sum as either the numerator or ...
4
votes
2answers
71 views

How to change a \NewDocumentCommand-based \cite command to accept biblatex-style arguments?

Over at How to quote encyclopedia articles differently from books, magazines, etc. with Biblatex?, I was greatly helped with a macro which solved the question as it was asked. I'd now like to change ...
6
votes
1answer
163 views

What is the difference between \NewDocumentCommand and \DeclareDocumentCommand?

These commands are part of the LaTeX3 Project xparsepackage. This question is to satisfy curiosity… From xparse documentation released on 25 Nov 2014: \DeclareDocumentCommand will always create ...
3
votes
3answers
106 views

Expl3: Constructing command sequences from macro arguments

In my LaTeX laboratory I am doing weird experiments with expl3 (just started to use it some days ago, so regarding l3 I am complete newbie) I am trying to generate command sequence within of another ...
4
votes
0answers
182 views

“Undefined control sequence” error with fontspec

As a result of updating the l3kernel, l3packages, and l3experimental, a XeTeX document I'm working on no longer compiles. I've narrowed down the problem to fontspec failing to find a control sequence ...
1
vote
1answer
77 views

How can I apply a regex (l3regex) on items in a sequence? [LaTeX3]?

I am trying to apply a regular expression to a string item from a sequence in LaTeX3. Example Compiles with error, but only by pressing return many times. ! Missing control sequence inserted. ...
7
votes
1answer
125 views

How can I iterate over a newline-delimited text file?

Would I need to use a token list? For the purpose of removing confusion, let there be two delimiters: input delimiter (what LaTeX reads as input) output delimiter (what is seen on paper) I would ...
23
votes
5answers
1k views

Reducing fraction using LaTeX 3

Consider the following: \documentclass{article} \begin{document} \noindent Can I make \LaTeX{} reduce a fraction automatically?\\[\baselineskip] For example, I would like the fraction \[ ...
5
votes
1answer
35 views

Can I mark an internal function or variable as 'not documented' in l3doc?

There are several internal variables I use that I do not see a need to document in the user-interface section, but I want to explain in the implementation. I'd really like to remove the warnings ...
8
votes
1answer
69 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. ...
7
votes
1answer
226 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 ...
7
votes
1answer
79 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
34 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
59 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 ...
4
votes
0answers
66 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
284 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 ...
4
votes
2answers
65 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
61 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 ...
10
votes
0answers
97 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
61 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
65 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
70 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
103 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
80 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
91 views

Immutable functions in latex3? [closed]

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
484 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
88 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
71 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
79 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
84 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 ...
3
votes
1answer
75 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
192 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
38 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
139 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
80 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
87 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
720 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} ...
22
votes
2answers
588 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
115 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
41 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
74 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
45 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
139 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
157 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
112 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
110 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 ...
9
votes
2answers
192 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 ...