Questions tagged [latex3]

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.

Filter by
Sorted by
Tagged with
1
vote
0answers
20 views

l3kernel is installed, but can't find l3regex? [duplicate]

I'm trying to use a very jury-rigged (and probably totally irreproducible, sorry) build process to get my moderncv cv to build on Netlify. Netlify doesn't officially support tex builds, but someone ...
1
vote
1answer
35 views

Chinese punctuation mark doesn't take space with xelatex, ruby

Problem: If there is no punctuation in the text, the Chinese words could be aligned perfectly vertically, however, if I add punctuation, somehow the punctuation will be mis-alighed, for example ...
2
votes
1answer
25 views

String comparison between AlphAlph and clist_item fails

I am trying to compare the results of AlphAlph and the indexing of a comma-delimited list. Why does this not work? MWE %! TEX PROGRAM = pdflatex \documentclass[a4paper]{article} \usepackage[utf8]{...
2
votes
2answers
146 views

How to use \csname\endcsname in LaTeX3 way?

I have some part or code made in LaTeX2e way. I been to rewrite it in LaTeX3 way, but I have no idea how to do this. More expanation in MWE \documentclass[]{article} \usepackage{xparse} \newcounter{...
0
votes
2answers
37 views

How to split table cell into multiple columns? [duplicate]

I am trying to achieve below table show in the figure, but I couldn't succeed it. I tried the below code. \begin{table}[] \centering \begin{tabular}{lllllll} Dataset & Model & Evaluation ...
0
votes
2answers
62 views

How to create sections and input file provided a different file exists?

My Issue: I have to compile a LaTeX file which contains a series of possible outcomes for a series of possible case studies. As not all the outcomes I list in the first \clistmapline have a case ...
10
votes
1answer
130 views

What happened to expl3's case changing functions? (e.g. \tl_upper_case:n and \tl_lower_case:n)

I had some expl3 code which relied on \tl_upper_case:n to do some expandable case changing. However today I updated my TeX distribution and the code now throws an error: ! LaTeX3 Error: '\...
1
vote
1answer
48 views

How to set itemize style in AnnArbor theme as a ball?

For example, the slide below the itemize is shaped like a ball with the number inserted inside. While the sub items are only numbers, but in blue color. On the slide below, however, the itemize are ...
5
votes
0answers
105 views

Why use xfp rather than fp?

I use fp a lot. What is the point of modifying all the code? I prefer the syntax of xfp but is this a sufficient argument? You are going to say that \fpeval is expandable but what is the example ...
3
votes
1answer
109 views

In LaTeX3, what is the best data type for storing, parsing and outputting free user input?

I'm working on a mini-parser that takes free user input and interprets certain inputs as commands. For example, the parser interprets + as \oplus or [ as "start a pre-configured array with the bracket ...
2
votes
1answer
42 views

Is it possible to adapt a duration calculation macro to use it in a foreach loop?

I want to draw time axes to illustrate time calculations. When I place this macro defined here by @egreg I have these error: ! Undefined control sequence. \LaTeX3 error: Missing * inserted. ...
0
votes
1answer
75 views

What `\cs_new_protected` and `\cs_generate_variant` do?

After my question Undefined control sequence while adding a new parameter to a existing \ExplSyntaxOn code, I trying to fully understand the code behind it. So far, so good, with: The expl3 package ...
4
votes
2answers
163 views

I need a mindmap on latex that have children that begot children

I neede a mindmap that goes like this: "A" begets 2 children, "A1" and "A2", where "A" to "A1" and "A2" is at angle 20 and 70 degrees respectively and "A" is 3cm away from "A1" and "A" to "A2" is ...
2
votes
1answer
75 views

LaTeX3 equivalent of C enumeration type

I'm having to store a non-binary status, what would be the more idiomatic LaTeX3 way of doing it? For instance, suppose that there are 3 possible ways to format a manuscript: long/short/medium. What ...
2
votes
1answer
42 views

Dealing with updates issues

I have stumbled several times after an update to the LaTeX core, either 2e or 3. Isn't there a procedure that announces to developers or maintainers of affected packages to check their compatibility ...
4
votes
2answers
102 views

More optional \xx_use:N and \xx_new:N functions than documented?

From the documentation I know that \tl_use:N and \str_use:N are optional. Those variables can be used directly. Isn’t that true for even more types? Is it likely that more \xx_new:N will be ...
1
vote
0answers
20 views

using \KeyValue in xtemplate for instance key-types

I came across a problem in xtemplate with using \KeyValue for keys of type instance. Instance key-types haven't been documented yet, so I could just be doing it wrong. Here's the smallest example I ...
3
votes
0answers
36 views

\cs_new:Nn counts the letters in the tail of its first argument, doesn’t it? [closed]

Citing from interface3.pdf: \cs_new:Nn <function> {<code>} “...the number of <parameters> is detected automatically from the function signature.” I believe that <parameters> ...
6
votes
3answers
246 views

Questions about `\cs_new:…` and friends and their TeX relatives regarding global, local, long, nopar, protected, expandable and naming

This question is two-fold. Unfortunately, one side is opinionated, i.e. something to close-vote, so I put that part at the end and hope no one notices... The other side (coming first) are serious ...
9
votes
2answers
269 views

When to use \tl_to_str:V and when \tl_to_str:N?

According to the interface3 documentation \tl_to_str:N expects a “tl var”, which I believe might be e.g. \g_temp_tl. \tl_to_str:V should, if I got it right, expect an argument representing a control ...
3
votes
2answers
143 views

What is the difference between `put` and `gput` in `\tl_new:N` token lists?

Why is there one function to define (globally) e.g. a token list \tl_new:N, but there are two functions to put an element into it: \tl_put_left:Nn and \tl_gput_left:nN What does this g at the ...
28
votes
2answers
672 views

What is “latex-dev”?

no answer needed, I'm adding the question as reference The package/update manager of my TeX-system installed in the last weeks a number of packages called latex-XX-dev, and CTAN too shows a number ...
2
votes
1answer
79 views

What is the difference between the H and B poles in vertical coffins?

In the xcoffins documentation the H and B poles are described as follows. H a pole running along the baseline of the typeset material contained in the coffin. B a pole running along the baseline ...
1
vote
3answers
125 views

Token list: Tokenization reverse puzzle: Did I solve it right? How to use \ShowTokens or \tl_analysis_show:n to prove my solution?

I found this interesting article about tokens: Tokens in LuaTeX from Hans Hagen. A macro definition converts to tokens as follows [B][A] Unfortunately, the macro definition is missing here. ( ...
0
votes
1answer
76 views

How to properly use savebox with tikz externalize?

I am unable to properly capture dimensions with savebox while tikzexternalize is on. Here is the MWE: \documentclass {article} \RequirePackage {tikz} \RequirePackage {expl3} \usetikzlibrary {...
2
votes
1answer
208 views

Expand keyval into TikZ's node optional argument

I am willing to create matrix-like nodes, so I implemented a draft function \DrawMatrixx below. Also, I have general style for nodes called Matrixx/body for matrix, or body, itself and for dimensions,...
2
votes
1answer
134 views

Convert a macro from Latex2e to expl3

I'm trying to implement a \Scontents command inside a small package that behaves in two different ways: \Scontents*[opt]<del>argument<del> \Scontents[opt] { argument } With the star it ...
1
vote
0answers
41 views

Accepting special characters in arguments passing them further

I would like to define a macro very similar to \url, that accepts more or less arbitrary strings (including hashes/#) and passes them to other commands (i.e., \href, \url, \nolinkurl). I have tried to ...
4
votes
1answer
263 views

MacTeX 2019 gives “! LaTeX3 Error: Control sequence \not= already defined.”

I have a document, that compiles fine on MacTeX 2017, which is installed on my desktop machine. I now installed MacTeX 2019 on my laptop and get this cryptic error: (/usr/local/texlive/2019/texmf-...
0
votes
0answers
33 views

Strange table behavior

A few years ago I got some awesome help in creating the following table See Automating table creation for more information. However, there are two quirks with the solution I would like to fix Is it ...
1
vote
1answer
443 views

Create a fake “\meaning” (verbatimized) for content stored in seq?

I'm trying to create a command that represents the code that is stored in a sequence without executing it (something like \meaning) . When using \cs_log:N \l_scontents_macro_tmp_tl I get in the .log ...
3
votes
0answers
115 views

How do use {<setup>} in \tl_set_rescan:Nnn to replace \scantokens?

This question is related to (Changing escape character in \tl_set_rescan:Nnn) and (https://tex.stackexchange.com/a/496258/7832) but is not the same. I've tried to change this: \exp_args:NNx \...
2
votes
1answer
72 views

Counting days and years in personal journal

The code below is taken from this post. Is it possible to create a sequence/array that contains all the different years, and another that contains how many entries per year there are? \documentclass{...
6
votes
1answer
135 views

Can LaTeX3 clists contain quarks?

The introduction to l3clist in interface3.pdf states In addition, comma lists cannot store quarks \q_mark or \q_stop. However, this is not mentioned at any other point in the part (in contrast to ...
0
votes
1answer
54 views

Message '! Missing \endcsname inserted.' calling \msg_error:nn

I get the message ! Missing \endcsname inserted. <to be read again> \delimiter l.58 ...ore than two arguments for {\backslash}Id} ? For this document \documentclass{...
2
votes
1answer
132 views

Is there a tutorial on writing messages from expl3?

I'd like to use the message facilities of expl3, but the documentation for l3msg only gives the syntax. In particular, it does not explain which commands are only legal after \begin{body}, it does not ...
0
votes
1answer
60 views

Message about missing } in \int_case:nn

I get ! Missing } inserted. <inserted text> } l.47 Test $\Id$ , $\Id{A}$ and $\Id{A,B}$ inline. when compiling \documentclass{article} \usepackage{...
0
votes
1answer
41 views

Choose what to compile without uncomment long texts [duplicate]

How can I select which section I want to compile and which section I do not want to compile? I am using XeLatex to compile the document. Sometimes the text in each section is long and I don't want to ...
5
votes
3answers
221 views

What is the correct way to replace “csxdef/foreach” with pure expl3 code?

I'm trying to remove the dependencies of the packages pgffor and etoolbox from a code I own which uses expl3, but I don't know which is the correct equivalent of \csxdef in expl3. At the moment I have ...
3
votes
1answer
49 views

What is the proper way to change the font inside tikzpicture environment?

I would like to be able to measure some dimensions while in the tikzpicture environment. Here is the MWE to demonstrate my intentions: \documentclass {article} \RequirePackage [utf8] {inputenc} \...
0
votes
3answers
64 views

How to automatically place number of occurrences of a certain command inside xparse environment at every occurence of that command?

There is an (xparse) environment \myEnv, and there is unspecified number of \myCo commands provided by the user inside that environment. I need to write a code for the environment which would count ...
2
votes
3answers
181 views

Why \NewDocumentEnvironment within \ExplSyntaxOn/Off removes spaces from content passed to it outside of \ExplSyntaxOn/Off?

I thought turning syntax on/off at appropriate places would make everything work, but I can't use \ExplSyntaxOn/Off inside \NewDocumentEnvironment so the following code sample doesn't work: \...
3
votes
3answers
115 views

About the expansion of \seq_set_split

As shown in fig, if I use the keyval, then my MWE does not work well. What's wrong with my MWE? \documentclass{article} \usepackage{keyval} \usepackage{expl3} \usepackage{xparse} \makeatletter \...
5
votes
1answer
95 views

How to halt compilation and output error message to the console with expl3?

How to stop compliation and output an error message if conditional statement resolves to true? \documentclass[varwidth]{standalone} \usepackage{expl3} \begin{document} \ExplSyntaxOn \...
4
votes
1answer
90 views

Infinite recursion with \tl_map_variable:nNn

I'm trying to use one of LaTeX3's mapping commands \tl_map_variable:nNn as follows: \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \tl_new:N \l_foo_tl \tl_set:Nn \l_foo_tl ...
3
votes
1answer
76 views

How to define two expl3 functions with the same base name and different signatures?

I need to define a function that takes no parameters, then define a function with same name but with a single parameter, and call the first function from inside the second. If this is not how it's ...
4
votes
2answers
121 views

Why appending box dimensions to a sequence (in a loop) makes that sequence only contain duplicates of last dimension?

Loop steps from 1 through 9. Each step puts current index digit of the loop into a box and extracts the digit's width. The width is then appended as dimension value to a sequence. Although the ...
2
votes
2answers
53 views

What's the purpose of \use_none_delimit_by_q_nil:w and friends in LaTeX3?

The LaTeX3 documentation for the l3basics package lists three functions \use_none_delimit_by_q_nil:w ... \q_nil \use_none_delimit_by_q_stop:w ... \q_stop \...
3
votes
2answers
125 views

Does expl3 have alternative to \settowidth and \settoheight?

How can I substitute following code with expl3 interfaces (that do the same job)? \documentclass[varwidth]{standalone} \begin{document} \newlength\spaceWidth \settowidth{\spaceWidth}{\ } \the\...
4
votes
2answers
163 views

Why doesn't \dim_eval:n return appropriate result and behaves weirdly?

All I needed to do is divide 300pt by 5mm to get result either in pt or in mm units. But I got something else. \documentclass[varwidth]{standalone} \usepackage{expl3} \begin{document} \ExplSyntaxOn ...

1 2 3 4 5 11