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
2
votes
1answer
89 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
22 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 ...
3
votes
1answer
66 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
32 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
347 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 ...
2
votes
0answers
76 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
66 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{...
4
votes
1answer
86 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
42 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{...
1
vote
1answer
88 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
54 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
34 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
189 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
40 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
54 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
137 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
92 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
78 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
55 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
48 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
106 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
49 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
108 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
139 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 ...
3
votes
1answer
76 views

How to use \ExplSyntaxOn and \ExplSyntaxOff inside tikzset?

If you place ExplSyntax on/off inside tikzset, code (that is expected to work) within ExplSyntax would generate errors. But if you bring ExplSyntax outside of tikzset (enclosing the tikzset), it makes ...
3
votes
2answers
64 views

Why using a variable as index of a list-item does not retrieve that item with \clist_item:Nn?

For some reason, using a variable as index of a list-item does not work for retrieving that item. But using a number instead of a variable works. Why? \documentclass{standalone} \usepackage{expl3} \...
1
vote
0answers
100 views

How to globally modify variable from externalized tikz picture?

Is it possible to update global variables from within externalized tikz picture? I would like for global modifiers(in this case \tl_gput_right:Nn) to outlast the scope of tikz picture. Here is the ...
2
votes
2answers
221 views

How to check if comma list is empty?

How do I check if \myList is empty? Following (is my attempt) prints "NOT empty" when, in fact, the list is empty. \documentclass{standalone} \usepackage{expl3} \begin{document} \ExplSyntaxOn \...
2
votes
1answer
45 views

How to suppress comma list from outputting its values on declaration?

I need to suppress the display of the comma list on its declaration. I just need comma-list variable to store the list, not display it. \documentclass{standalone} \usepackage{expl3} \begin{document} ...
0
votes
0answers
73 views

Latex users make more mistakes [duplicate]

Article Source: An Efficiency Comparison of Document Preparation Systems Used in Academic Research and Development Knauff M, Nejasmic J (2014) An Efficiency Comparison of Document Preparation Systems ...
2
votes
2answers
157 views

How to properly store the current value of int variable into a token list?

I have an volatile integer variable (counter) and at some point I wish to save its value to a token list (saved_counter). If I save it with just \tl_set, as soon as counter changes the value, this ...
3
votes
1answer
85 views

How to debug “Inconsistent local/global assignment” in l3seq (expl3)?

I'm trying to debug an expl3 code that usesl3seq and seq_gput_right. By adding the enable-debug and reviewing the code I get the error: ! LaTeX3 Error: Inconsistent local / global assignment That ...
1
vote
1answer
52 views

Looping over characters in a string and applying a macro with an additional argument

The following code was kindly provided for me in TeX Chat by @egreg. This LaTeX 3 code loops over a list of characters, and puts a box around each character. It does not skip whitespace \...
5
votes
1answer
187 views

What is the maximum limit of elements in a list (expl3/xparse)?

I have a query with the maximum number of items that can be saved in an expl3 list. Thanks to the response that @egreg gave me in Avoid passing an empty [optional argument] an environment (with ...
1
vote
0answers
84 views

Latex is not generating PDF due to emojis. How to have colourful emojis in PDF version? [closed]

Here is the sample code \begin{filecontents*}{example.eps} %!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 19 19 221 221 %%CreationDate: Mon Sep 29 1997 %%Creator: programmed by hand (JK) %%...
1
vote
1answer
60 views

Modeling a mapping from strings to lists of strings in LaTeX3

I'd like to work on a data structure using expl3. This data structure would be read from and written to the .aux file in the following format (this is my proposal—I'm open to better suggestions, of ...
4
votes
2answers
44 views

converting several comma-separated lists into a table, one column per list

I have been searching on here for information about comma separated lists, but the only info I have found is how to sort, or iterate over a single list, which isn't quite what I need. If there is a ...
1
vote
1answer
57 views

How to implement Certified Random in LaTeX

What is the best way of implementing Certified Random coauthors in LaTeX. There is one potential implementation from the comp.text.tex usenet group that uses perltex and can be modified as follows: \...
0
votes
2answers
22 views

Titlepage: Two Textboxes next to each other at bottom of page

i´m trying to design the title page for my thesis. I have the Title centred at the top. Now i want two columns with text on the bottom of the page. Something like: Supervisor:____Prof. ...
0
votes
1answer
29 views

Why does hyperref exhibit this behaviour on generated URLs? [duplicate]

I'm trying to create a class that, among other things, generates URLs from parameters passed to an environment. For some weird reason, if the URL string contains a /, hyperref tries to create a URL ...
1
vote
1answer
70 views

What are the recommended replacement for deprecated LaTeX3 macros?

I found file_get_full_name for file_add_path; but there are many deprecated removed. Is there a list for all and their recommended replacement?
3
votes
3answers
70 views

Environment with comma separated optional arguments

Using xparse, how does one get something like this to work? \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentEnvironment{ anenvironment }{ >{\SplitArgument{1}{,}}o }{ \...
2
votes
1answer
33 views

Count authors of a bibliography entry

I would like to have a command that would give me the number of authors of a given bib entry. What I have unsuccessfully attempted so far was to create a key-value storage (prop), hook on the bbl ...
5
votes
0answers
341 views

What is the status of the LaTeX3 Project? [duplicate]

I was just downloading a new copy of LaTeX for my Mac and I noticed this comment on the www.latex-project.org website: The LaTeX3 Project LaTeX3 Project The LaTeX3 project is a long-term research ...
2
votes
1answer
56 views

How to display string variable without hanging texworks

I was getting unexpected results storing a parameter into a string variable, and added the statement "\str_show:N \l_tmpa_str" to produce debugging output. Texworks treats the output as an error. My ...
4
votes
1answer
95 views

Is there latex3 work being done on a boolean case statement?

Various languages have constructs like select; when <expression 1> then <action 1>; when <expression 2> then <action 2>; ... when <expression n> ...
3
votes
2answers
73 views

\str_case:nnF not finding match

I have written a command using expl3 that is supposed to behave differently if the optional argument is specified as * or **. The command is intended for a math environment, and is supposed to render ...
4
votes
1answer
118 views

What is the e specifier for LaTeX3 and where is it documented?

Pages 1-2 of interface3.pdf, "The LaTeX3 Interfaces" released 2018-10-31, only lists specifiers of c,D, F, f, N, n, o, p, T, V, v, w and x. The e specifier of \str_if_eq:eeTF is not in that list. What ...
6
votes
2answers
183 views

Removing a number of tokens from the input stream

I need a command which removes all following tokens which are digits, comma, spaces or newlines and stops if it encounters something else. I can do it by nesting a lot of \...
0
votes
2answers
26 views

Declaration of a font/change of parameters/compilation error is missing

I would like to know what in here \DeclareMathAlphabet\stixcalE{LS2}{stixcalE}{m}{n} the parameters LS2,m and n stand for, and to what values I can correctly change them? Whenever I type an ...