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

Using \pause and multiple tikzpictures in one slide

I have two tickpicture blocks. What I need, is to use \pause (or overlay) another plots on top of each one: \begin{tikzpicture} \draw (0, 0) node[inner sep=0] {\includegraphics[width=1\...
2
votes
1answer
43 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,...
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 ...
15
votes
1answer
108 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 \...
4
votes
1answer
125 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 ...
15
votes
4answers
215 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 ...
6
votes
2answers
68 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\...
12
votes
2answers
211 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 ...
4
votes
2answers
77 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 \...
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, ...
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 ...
11
votes
1answer
78 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
29 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
89 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 ...
50
votes
3answers
1k views

LaTeX3-sensitive editors

I'm starting to embed LaTeX3 code in my custom classes and packages -- and enjoying it more the further I learn about it --, but at least to me it would make for an even better experience if, as it is ...
4
votes
1answer
894 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
134 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 | -------------------...
13
votes
2answers
654 views

Factorial (or, even better, binomial coefficient) function

Is there a function in l3fp for calculating factorials or, even better, binomial coefficients directly?
32
votes
3answers
2k views

Always use \NewDocumentCommand instead of \newcommand?

Are there compelling reasons to stick with \newcommand or should one always use \NewDocumentCommand instead, even when not using any of the additional features offered by xparse? In addition and more ...
14
votes
3answers
1k views

How to change operator symbols in truth table

I need to type truth tables for my computer architecture classes. Until now I was using a manually typed tabular but today I've found this answer from Scott H. which provides a command called ...
0
votes
0answers
30 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
130 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 ...
28
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 \[ \frac{...
9
votes
1answer
150 views

Where are the sources for LaTeX3 development in TeX Live?

I'd like to take a look at the sources for some of the LaTeX3 development to model after, but I'm having trouble finding them. Where might I find the sources for texdoc interface3, texdoc xparse, and ...
2
votes
0answers
68 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
77 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
128 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
220 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
88 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
66 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} @ {} @ {} @ {} @ ...
10
votes
2answers
243 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 and/...
3
votes
2answers
165 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} ...
19
votes
2answers
704 views

Write new package with LaTeX2e or LaTeX3

I’m planning to create a package and I wonder if it’s better do do this with LaTeX3 syntax or the „old“ LaTeX2e, which is the one I know. Will LaTeX2e packages be supported by LaTeX3? I can give ...
22
votes
5answers
2k views

What is missing in LaTeX?

I have been reading this article and started to think about the position of LaTeX amongst the current competitors. Currently, I am using it (or XeTeX) even for ‘casual writing’ and sometimes I spend ...
7
votes
1answer
171 views

Is a graphical document author/designer interface realizable with LaTeX3?

With the separation of document authorship, design, and implementation, is a graphical tool for the end-user within reach? LyX tries to do this today, but LaTeX2e is not well-designed for such an ...
1
vote
1answer
173 views

Will TeX become mainstream one day? [closed]

I remember starting LaTeX when I was in the last year of my undergraduate studies .I was fascinated by a book in Industrial Organisation, partly because it was a good book per se, but also because I ...
53
votes
3answers
24k views

Difference between LaTeX, LaTeX2e, LaTeX3 ?

I was wondering, what is the difference between LaTeX, LaTeX2e and LaTeX3. Are the 2 higher versions available for use? I use LaTeX. How can I use the other 2 on Windows 7?
11
votes
1answer
207 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 ...
10
votes
2answers
166 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
86 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
111 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 \...
10
votes
1answer
203 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
0answers
162 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 ...
9
votes
1answer
730 views

\pdfstrcmp or \strcmp in pure TeX

I'm trying to get LaTeX3 working with an old e-TeX kernel, and it fails due to the lack of \pdfstrcmp (or XeTeX's \strcmp equivalent). Is there a pure TeX definition of \pdfstrcmp that I could insert ...
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
55 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 &...