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
59 views

Is there a perfect set of macros for typesetting? [on hold]

I understand using tex (primitives) you can get 99.9% control over how a document is typeset. Macros are simply a way to make this more efficient, and easier for non-technical users. I read that latex ...
0
votes
0answers
44 views

what's the update with Latex 3? [closed]

Does anyone have an idea about updates with regards latex 3, it's features, comparison to latex 2e and context would be helpful and finally if there's any inside info as to when it may be released?
3
votes
2answers
53 views

Key property is unknown

i just updated my Linux distro (Linux Mint 17.3 -> Linux Mint 18) and from TeX Live 2014 to 2016. I have a (large) selfmade documentclass writte in LaTeX3. Now I tried to compile a document using my ...
6
votes
1answer
99 views

Sorted and compressed output from a clist

I have a clist with the content, {9.8,5.1,10.1b,1.3,1.4,5,5.1.1,8a,9.7,9.9,10.1a,10.1c,1.2,8b,8c}. How can I generate sorted and compressed output from this using expl3 which might look like: 1.2--...
4
votes
1answer
32 views

Use expl3 inside a LaTeX2e macro

I would like to redefine the \section macro in my document and I found that LaTeX3e was one of the easiest way to make integer operations inside it. But I get a "Missing $ inserted" error when I ...
13
votes
7answers
568 views

Extract first letter of each word, also after a special character like a dash

This question based on this answer. Found letter missing when it occurs next to dash, as per the below MWE: \documentclass{article} \usepackage{readarray} \usepackage{ifthen} \newcounter{index}\...
3
votes
2answers
49 views

LaTeX3 RenewDocumentCommand for cite with an optional argument for punctuation

When working with citations there are many distinct ways the citation must be incorporated within the text. Even when you work exclusively with number formats (this example excludes Author year style ...
10
votes
1answer
189 views

Sort Numbers After Their Values

Consider the numbers 2^4, 4^2, 3^2, and 5^2 Is it possible to make LaTeX calculate the values of these numbers and then arrange then automatically according to the values? That is, in this ...
6
votes
1answer
40 views

LaTeX3 Regex using control sequence

I'd like replace some words/characters using l3regex on a arbitrary variable. Instead of doing this \tl_set:Nn \l_myname_tl {Hello} \regex_replace_all:nnN {(\w+)} {\1 World!} \l_myname_tl which ...
4
votes
1answer
131 views

Good examples of \tl_case:Nn(TF) and \str_case:nn(TF)

While learning expl3, I'm having a hard time in using \str_case:nn(TF) and \tl_case:Nn(TF). I failed to find good examples online. (E.g., the ones in unravel are too complicated for me.) Could you ...
16
votes
1answer
112 views

Is there a correct way to prevent a galley cutout from repeating later without modifying the body of the document?

Consider the following FMWE (Fairly Minimal Working Example): \documentclass[a4paper]{article} \usepackage{kantlipsum,xgalley} \usepackage[scale=.8]{geometry} \pagestyle{empty} \ExplSyntaxOn \...
6
votes
2answers
69 views

Latex3 equivalent csname endcsname

I would like to know how to create dynamic named macros (in a loop) in Latex3. Everythings ok in LaTeX2e. I look to something equivalent to that code with expl3 \stepcounter{N} \expandafter\def\...
4
votes
2answers
78 views

What is the correct way to stack two coffins so that the vertical spacing between their contents is as it would be if they were set in one coffin?

Consider the following Minimal Working Example (MWE): \documentclass{article} \usepackage{xcoffins,kantlipsum} \begin{document} \NewCoffin \MyCoffin \NewCoffin \YourCoffin \SetVerticalCoffin \...
2
votes
1answer
44 views

Can I temporarily clear the file search path in LaTeX3?

I'm using the following code to search for a file using LaTeX3: % List of known image extensions: \clist_new:N \l__htmv_grext_clist \clist_set:Nn \l__htmv_grext_clist {png,PNG,jpg,JPG,jpeg,JPEG,gif,...
16
votes
4answers
222 views

\tl_replace_all:Nnn recurse subgroups

Suppose I had a token list variable containing abc{ab{abc}c}. I want to replace every occurrence of b with d. As you can see there are subgroups containing b which I also want to have replaced, so ...
7
votes
1answer
51 views

How can I generate precisely one warning within a tabularx environment?

I realise this is an unholy mix of expl3 and LaTeX-2e, but most of my code is like this at the moment, unfortunately. I want to be warned when I fail to set a particular variable. More specifically, ...
12
votes
2answers
214 views

Best way to wrap text around figures in expl3

As remarked in another question from today, I am trying to find a more flexible way to get text wrapped around figures than standard solutions like wrapfig or manual use of \parshape, and my eyes are ...
2
votes
1answer
77 views

xgalley breaks spacing around lists

I would like to use xgalley as a more flexible and manual way of wrapping text around figures compared to the standard packages like wrapfig. However, simply loading the package creates problems with ...
12
votes
1answer
79 views

Why does an empty \textwidth coffin lose width when joined with another?

I'm trying to understand coffins. Well, actually, I'm trying to use them. Trying to understand them is a purely instrumental goal. I wanted to create one coffin of width \textwidth and one of a bit ...
2
votes
1answer
30 views

Including a multi page PostScript document into latex

Is there a hack to include a multi page Postscript document into a a final ps document through latex and dvips? Essentially what I have is a ps article that i need in my latex>dvi>ps document. Is ...
4
votes
1answer
44 views

Modify contents of environment using l3regex and then write to file

I want to define an environment (in a class file, as it happens) the contents of which are both displayed on-screen as they are written, but they are also modified (e.g. using the l3regex package) and ...
1
vote
2answers
90 views

Vertical spacing in list — latex3 syntax

Consecutively to this question, I need to add something after the inclusion of on itemed file to be sure that what comes next begins on a nexwline. I don't want skip blanck line in the source I'd like ...
4
votes
1answer
1k views

Package xparse continues to throw “Support package l3kernel too old”

I tried to compile a (flawlessly working) LaTeX document on a different computer, and suddenly was faced with the above error message printed by the xparse package (after that, many errors follow). I'...
5
votes
3answers
137 views

Create tabular depending on counter

I want to create a tabular with i+2 many columns where i is a counter. The tabular should have the following layout: ------------------------------- | 1 | 2 | ... | i | foo | bar | -------------------...
0
votes
0answers
31 views

XeLaTeX with fontspec gives “Undefined control sequence” error after MiKTeX update [duplicate]

I updated MiKTeX this morning and now I can't get XeLaTeX with fontspec to compile at all. It throws an "undefined control sequence" error for \sys_if_engine_luatex:T A minimum working example is: \...
1
vote
1answer
133 views

Expandability: LaTeX3 VS LaTeX

The expandability is the heart of macros/functions. I wonder to know: If a better understanding of expandability in LaTeX3 can only be through a good background of expandability in LaTeX. How far ...
2
votes
0answers
70 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
82 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
57 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
132 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: \RequirePackage{expl3,...
17
votes
2answers
226 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
106 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
33 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
67 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
57 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
169 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} ...
11
votes
2answers
176 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
89 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 & ...
1
vote
2answers
113 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
166 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
115 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
59 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
108 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
149 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
100 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
129 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 { ...
18
votes
1answer
264 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
49 views

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

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
52 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 \documentclass{...
1
vote
0answers
216 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 ...