{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.

learn more… | top users | synonyms

10
votes
1answer
125 views

How do I use l3docstrip?

I've got a bundle I'd like to properly document (and begin to release) that uses expl3 intimately, and it should be documented similarly to expl3 itself (as seen in texdoc interface3. I did a little ...
38
votes
4answers
2k views

Has the time come for a LaTeX3 successor to 'listings'?

I'm currently looking for a nice and challenging open-source project to work/collaborate on after my thesis. I don't have a Comp. Sci. background, but I'd like to learn more about compiler ...
4
votes
0answers
131 views

What is strategic goal of LaTeX3 project team? [closed]

@Joseph Wright in his answer to the post Why is LaTeX3 taking so long to come out? wrote that strategic goal of the latex3 team is a new LaTeX kernel, which should be more flexible than that of ...
9
votes
1answer
96 views

Using LaTeX3 syntax in document commands

I have already read much about LaTeX3 on TeX.SE, in TeX Live’s documentation and in TUGBoat, but there is something I do not yet understand: is the expl3 syntax meant to be used in document-level ...
9
votes
1answer
109 views

Is there LaTeX3's analog of \providecommand?

Suppose that one has two definitions \seq_new:N \l_input_seq % declare a list (seq) variable shared by 2 macros \NewDocumentCommand. Is there a way to check if \l_input_seq is already defined? ...
6
votes
2answers
288 views

Collaboration among members of the LaTeX3 team: “this is my code and no one touches it” vs. “the team owns the code”?

The book Coders at work by Peter Seibel contains interviews of several high-profile programmers, including Donald Knuth (whose interview I warmly recommend to anyone interested in TeX's history). One ...
7
votes
1answer
201 views

ExSheets fancy headings breaks

Remarks From the exsheets documentation I grabbed a piece of code to produce fancy headings for questions and solution, but it breaks. It is the fancy heading style on page 49 and 50 in the current ...
34
votes
1answer
394 views

Origin of the LaTeX3 term “coffin”?

The documentation for the LaTeX3 xcoffins package introduces the concept of coffins as follows: In LaTeX3 terminology, a “coffin” is a box containing typeset material. Along with the box itself, ...
6
votes
1answer
98 views

Expanding a macro as many times as possible without error

I'd like compute cosets using the permute package. Here's what I have so far: \documentclass{article} \usepackage{expl3,xparse,permute} \ExplSyntaxOn % Create a new command to compute the right ...
6
votes
1answer
174 views

LaTeX 3 for newbies: simple environments do not work

I needed to create a custom environment with more than one optional argument, so I tried with LaTeX 3 (my first experience). However, I can't seem to create not even the simplest environment. Here is ...
36
votes
2answers
594 views

How “safe” is it to use LaTeX3 (l3packages, l3kernel)?

Are l3kernel and l3packages present in most of the LaTeX distributions? Are they "stable enough"? I am asking this because I am preparing a .tex document for a client. I have found convenient to use ...
5
votes
1answer
134 views

How to renew section commands in latex3

I'm trying to rewrite section commands using LaTeX3. For testing purpose, what I did is basically this: \ProvideDocumentCommand \p { o m } { \IfNoValueTF{#1} { % \paragraph{\textsf{#2}} ...
2
votes
0answers
114 views

Sorting a list of tokens (not necessarily numerals) in expl3/LaTeX3

I'd like to sort a list of words according to their lexicographical order using expl3 code. My words are in a seq variable that I access in a stack-like manner (this is not relevant, though). I've ...
5
votes
1answer
98 views

How would you run the equivalent of a functional test/output test on a piece of LaTeX code?

In most programming languages one has the equivalent of a functional test, that can test code and see if the required output is correct and find edge cases. Is there a way to write similar tests, to ...
8
votes
1answer
140 views

A Couple of Tidbits about the LaTeX3 \tl_case:??? Function

On p. 95 of my interface3 documentation, dated July 28, 2013, the \tl_case:??? function is first introduced as having a signature \tl_case:NnnTF, but on its extended description for usage it appears ...
6
votes
1answer
147 views

Shell-escape with LaTeX 3

What is the LaTeX 3 equivalent to \write18 if there is one? I want to call lilypond from within my TeX document.
5
votes
1answer
119 views

About catcodes and Family in LaTeX3/expl3

This is not so much the display of an issue or problem I'm facing out of my wish to use as much LaTeX3/expl3 as possible in my TeX-based work, as a request for advice on the proper ways in that ...
7
votes
1answer
69 views

Confusion about Data Retrieval from a LaTeX3 Stack

I'm trying to perform a very simple processing task in LaTeX3, namely, defining a series of functions named in terms of the token lists retrieved from a clist as a stack. Each function will set ...
5
votes
1answer
183 views

Author firstname, Initials and Lastname values find and store in LaTeX3

I would like to store each authors firstname, initials and lastname values in newcommands. My MWE is: \documentclass{article} \usepackage{xparse} \makeatletter \def\author#1{\gdef\@author{#1} ...
5
votes
1answer
76 views

Confusing Problems with LaTeX3/expl3 \pdftex_if_engine:TF Switch

For a number of days I've been confused with some problems I had when using the \pdftex_if_engine:TF switch in a LaTeX3/expl3 class of my own. I thought it would be equivalent to the \ifpdf switch, ...
13
votes
1answer
187 views

Using calc-like (calc Package) Commands within LaTeX3/expl3

In my pursue to switch as much as possible from LaTeX2e code to LaTeX3/expl3, I got stuck with the usage of some of the calc package facilities. I've read of the l3calc package, but it seems it is ...
6
votes
1answer
70 views

LaTeX3: l3keys Multiple-Choices Keys and Startup Value for Predefined Choice Integer Variable

In the interface3 documentation it can be read (what follows is not a literal quotation) that the variable \l_keys_choice_int is available to be used as an index register for a multiple-choices key ...
3
votes
0answers
76 views

Difficulty saving formatting to a sequence to be called later in my code

I had an idea about how to answer this question and started putting some things together. I wanted to put something together that was fairly powerful and could handle simplification of linear ...
4
votes
1answer
120 views

I need a fully expandable function to expand in an “f” type argument

I really hope that I'm asking the correct question. What I'm actually working on if far more convoluted than what's happening in the MWE here. I think I've narrowed down things to real problem. I ...
7
votes
1answer
105 views

Driving the Options of a Given Package from Another Package or Class in LaTeX3/expl3

I'm afraid I still don't get how I'm supposed to handle the communication of options among packages in a LaTeX3/expl3 context. Let us say I have a package pkg1 where I define an option opt_pkg1 that ...
6
votes
1answer
110 views

Is there something like a scope of \NewDocumentCommand?

Following along the line of my (confused) post on xparse and expl3, but this time hopefully with no typos or missing characters, I've devised a small package just to check a l3keys-based definition ...
8
votes
1answer
102 views

Why is my list showing up twice

Why does the following code result in my list being strangely, but not quite duplicated? \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \ExplSyntaxOn \clist_new:N \l_ae_number_clist ...
4
votes
1answer
140 views

Dazzled and confused about xparse and LaTeX3 Booleans

I'm just starting my journey with LaTeX3/expl3, and although fascinated by the great work that the LaTeX3 team is doing, and by the enormous difference it brings about with respect to "classical" ...
38
votes
3answers
991 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 ...
6
votes
1answer
108 views

Where can I report typographical errors for LaTeX3 documentation?

Following up on What can *I* do to help the LaTeX3 Project, there doesn't seem to be a definitive place to report a typo in any of the LaTeX3 documentation (e.g. texdoc interface3). Where can I ...
6
votes
1answer
198 views

Macro to calculate \baselineskip for given font

I want to write a macro that returns the \baselineskip multiplied with a fixed value for a given font spec. That seems to be harder than I would imagine... after some fiddling I came up with this: ...
9
votes
2answers
274 views

Giving arbitrary unicode characters, passed as arguments, a math-active definition?

I've been trying to write a LaTeX3 function to make arbitrary unicode characters math active and give them a definition. I'm using XeLaTeX. My solution inexplicably works for some examples but not for ...
5
votes
2answers
197 views

How can I use `catchfile` package to gobble first characters on a line

When using the fancyvrb environment Verbatim, you can gobble the first n characters of each line before printing it out. I'd like to be able to do something similar, but not via verbatim. In the ...
8
votes
1answer
132 views

Use LaTeX3 variables within TikZ picture

I’m new to LaTeX3 and don’t understand why the following doesn’t work \documentclass{article} \usepackage{xparse} \usepackage{tikz} \ExplSyntaxOn \tl_new:N { \g_tobi_color_tl } \tl_set:Nn { ...
8
votes
1answer
118 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 ...
6
votes
3answers
185 views

White space unexpectedly lost when trimming a string

I'm trying to follow the example given here \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \seq_new:N \l_ae_insertQuotedMatter_seq \tl_new:N \l_ae_insertQuotedMatter_trash_tl ...
3
votes
1answer
108 views

LaTeX3: insert macro after (unknown unknown number of) parameters?

I've just played with expl3 for a couple of hours. Many things are much more convenient than with 2e. There are functions for things that I thought to be impossible with LaTeX. However, I am missing ...
8
votes
1answer
98 views

How do the \xx_case: functions work?

In the process of answering expl3 switch for booleans: Is there a \bool_case:Nnn?, I tried to make sense of the various \xx_case: functions Expl3 provides. Here, for example, is \tl_case:Npn: ...
6
votes
2answers
156 views

expl3 switch for booleans: Is there a \bool_case:Nnn?

There's \int_case:Nnn, \tl_case:Nnn, \str_case:Nnn, but I can't find something like \bool_case:Nnn. I know I can write: \bool_if:NT \l__<mymodule>_<nameA>_bool { ... } \bool_if:NT ...
20
votes
1answer
327 views

Are there any typographical improvements planned for LaTeX3?

I have read a few posts about the changes to LaTeX in the upcoming "version", are there planned any changes to how LaTeX renders typography? Regarding kerning, spacing and all the "fancy" things ...
5
votes
2answers
130 views

Can I refer to key value in general code?

Related: keyreader: How to save choice key value to a macro. I’m using l3keys2e, but I suspect this might not be the ideal way to go about what I’m trying to do. I’m building a private package ...
7
votes
2answers
143 views

Generate l3keys meta key from subkey

I’ve created a simple package with options settable via l3keys2e. I was able to figure out how to make the syntax \usepackage[format = international]{phone} work, but I’d like to make the syntax ...
31
votes
2answers
273 views

What are the best practices for programmatic interaction between LaTeX3 and LaTeX2e?

I'm thoroughly enjoying using LaTeX3 for programming my LaTeX stuff and the more I use it, the easier it gets and the more I shudder at returning to LaTeX2e or even pure TeX! But every now and again ...
13
votes
1answer
135 views

How do I remove the next token from the stream in LaTeX3?

I want to remove a token from the stream from within a command (ignoring spaces). The next token will be a { (actually, I've just thought that it might not be ... but I'll continue as if it were). ...
6
votes
2answers
71 views

Inline Mapping Bug?

The enclosed document creates a sequence variable and then uses inline mapping to attach a sequence number to each item. The inline map then outputs the result and places it into a token list variable ...
34
votes
3answers
927 views

Using LaTeX3’s xtemplate

Relevant are the answers to Moving to LaTeX3 for package authors and What new bits have already been implemented in Latex3? Will my current documents (with many packages) still compile with Latex3? ...
9
votes
2answers
132 views

Emulating \@ifnextchar in expl3

I would like to write an expl3 version of the following. \documentclass{article} \makeatletter \def\ie{i.e\@ifnextchar.{}{.\@{} }} \makeatother \pagestyle{empty} \begin{document} \noindent \ie ...
13
votes
1answer
133 views

How do I register the prefix of my expl3 package?

This question needs an easy to find answer here, so: I was told that I can and should register prefixes of my macro names in my expl3 using packages. How do I do that?
5
votes
2answers
129 views

Expl variable assignments not behaving as I expect

I don't get what I'm doing wrong here. Neither of the commented lines work as the uncommented version does. \begin{filecontents}{silly.tex} This is just a test. \end{filecontents} ...
8
votes
1answer
133 views

Sorting a clist in LaTeX3

I have a clist that I'd like to bubble sort. I'm sure this is a simple matter of something like \clist_bubblesort:N or something, but I don't know what the appropriate incantation is. A quick google ...