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

1
vote
0answers
10 views

Sorting References in nyt format with IEEEtranSN.bst

In my latex file, I have used natbib package with slight modification in IEEEtranSN.bst as bibliography-style. I use \cite{key} for Bhanot et al. (2015) and \citep{key} for (Bhanot et al., 2015) and ...
2
votes
0answers
57 views

How to sort a comma separated list?

Using receipt of How to process a comma separated list?, I elaborated the following code for my needs: \ExplSyntaxOn %\seq_new:N \l_input_seq % declare a list (seq) variable \cs_if_exist:NTF ...
8
votes
1answer
60 views

Does expl3 key-setting syntax have an equivalent of TikZ/PGF's .cd?

This question has the following form: 'I know how to do X using Y. I can also do X using Z but not so elegantly as using Y. Can I do X using Z in the same way that I can do X using Y, for a more ...
3
votes
2answers
51 views

Creating a command that builds a 1 dimensional diagram from tokens

This question is indeed very similar to Creating a command that concatenates an input string token by token, but the solution probably looks different and I have difficulties reading up on the ...
7
votes
1answer
100 views

LaTeX3 best practice: using newed commands within package code

I'm quite new to LaTeX programming and currently looking into LaTeX3 and how to write a small ExplClass. This class should provide an allcaps command that I defined as follows: ...
17
votes
2answers
172 views

How to \let an xparse defined command?

Let \example be an xparse defined command, which takes one optional and one mandatory argument. The definition of \example cannot be modified (e.g. because it comes from a third-party package). The ...
5
votes
2answers
64 views

Build table in new command results in too long vertical lines

I am trying to build a table inside a LaTeX 3 command. A MWE: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\createTable}{ m m }{ \begin{tabular}{|c*{#2}{|c}|} ...
1
vote
1answer
27 views

Detecting empty key values when key is provided

I believe I am looking for a LaTeX3 type syntax solution to more appropriately detect a missing argument. To me I would have expected key={} to be a valueless, blank, or empty argument key. After ...
0
votes
1answer
44 views

How to stop indentation of new paragraph in tufte-handout? [duplicate]

I'm using the tufte-handoutclass, but I want to deviate slightly from the template. I would like to separate paragraphs through a small space, not through indentation. I usually do this in my Latex ...
3
votes
1answer
53 views

LaTeX3 loop expanding to repeated {}s

I’m using the ExPex package for vertically aligned linguistics glosses. For various reasons I have some stuff that looks like this: \ex \begingl \gla \rlap{thisisaverylongword} @ {} @ {} @ {} @ ...
3
votes
2answers
153 views

How to make marginratio from geometry package work also with LaTeX3?

With LaTeX2e, the marginratio key provided by geometry package can be used safely: \documentclass{book} \usepackage{geometry} \usepackage{calc} \newlength{\mylayoutwidth} \newlength{\mylayoutheight} ...
10
votes
2answers
155 views

Misunderstanding from l3keys documentation

Based on the interface3 documentation and a nice article in TUGboat, Volume 31 (2010), No. 1 called Programming key–value in expl3 by Joseph Wright, I have been trying to put together a MWE that will ...
5
votes
1answer
76 views

Is \int_step_inline:nnnn inserting something after it finished?

The following snippet \RequirePackage{xparse} \documentclass{article} \usepackage{tabu} \ExplSyntaxOn \NewDocumentCommand\trop{}{ \int_step_inline:nnnn{0}{1}{3}{ a & b & c & ...
0
votes
2answers
96 views

How can I use a LaTeX3 variable as a path in includegraphics (solving the expansion problem)?

This problem is driving me nuts. I'd like to change the includegraphics path depending on some conditions. It seems simple, right? I already read the answers to this question: Passing image path to ...
2
votes
0answers
147 views

How can I migrate commands and environments from LaTeX2e to LaTeX3? [XeTeX]

Sometimes forcing consistency makes things much easier to maintain. The motto "keep it simple" comes to mind. xparse offers the most bang for your buck when it comes to defining commands with various ...
7
votes
1answer
109 views

Has LaTeX3 syntax possibly changed since this question was last answered

I am adapting the LaTeX3 answer in this question: http://tex.stackexchange.com/a/61603 But I can't get the original MWE answer to compile using xelatex. I have renamed the variables, but the error ...
2
votes
0answers
40 views

Access xparse's \BooleanTrue via latex3 expl3

I'm implementing a command with xparse's boolean token processing \NewDocumentCommand{\op}{s o t' t. t^ g}{ % Here I need to check for % (#3 || #4 || #5) && !(#3 && #4 ...
7
votes
2answers
100 views

how to space after LaTeX3 commands

I am trying to define a message that includes a computed number. \RequirePackage{expl3} \ExplSyntaxOn \int_set:Nn \l_tmpa_int { 42 } \msg_new:nnn { package } { message } { The~number~ \int_use:N ...
10
votes
1answer
141 views

Translate \typeout to LaTeX3

The command \typeout{argument} expands its argument and writes the result to the log and the terminal. Writing l3build tests, I sought for an equivalent command in LaTeX3, but only found \iow_log:x ...
5
votes
1answer
90 views

How can the knots TikZ library be used with current l3 (e.g. TeX Live 2015)?

The knots library for TikZ seems to be incompatible with the current l3 packages as provided, for example, by TeX Live 2015. The following example, taken from the library's documentation compiles ...
4
votes
3answers
103 views

Define control sequences in terms of control sequences

I want to set up aliases for changing control sequences using composed control sequence names. Here is an example. \documentclass{standalone} \usepackage{expl3} \ExplSyntaxOn \cs_new:Npn \name { ...
16
votes
1answer
252 views

Patching commands in LaTeX3

Is there some facility in the LaTeX3 kernel to modify existing commands like etoolbox's \preto \appto and \patchcmd do?
1
vote
0answers
45 views

LaTeX3 \clist_sort:Nn — How has this function been implemented?

I have recently read in the documentation of package l3sort about the usage of \clist_sort:Nn to sort lists. I would like to know how and where \clist_sort:Nn has been implemented. In l3sort.dtx I ...
6
votes
2answers
45 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
196 views

PDF file size massive in MikTex [closed]

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 ...
9
votes
1answer
194 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
107 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
75 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
234 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 ...
4
votes
3answers
125 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
484 views

“Undefined control sequence” error with fontspec [closed]

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
99 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
133 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 ...
27
votes
5answers
1k views

Reducing fractions automatically using LaTeX 3

Consider the following code: \documentclass{article} \begin{document} \noindent Can I make \LaTeX{} reduce a fraction automatically?\\[\baselineskip] For example, I would like the fraction \[ ...
5
votes
1answer
39 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
85 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
264 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
111 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
36 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
65 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
71 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
304 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
74 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
69 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 ...
21
votes
0answers
207 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
75 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
74 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
85 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. ...
6
votes
1answer
109 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
88 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 ...