Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
16 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 ...
3
votes
1answer
81 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
58 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 ...
2
votes
1answer
86 views

What is the e specifier for latex3 and where is it documented/

Pages 1-2 of interface3.pdf, "The LATEX3 Interfaces The LATEX3 Project" Released 2018-10-31 only list 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 ...
6
votes
2answers
148 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
21 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 ...
0
votes
0answers
59 views

When I try to load expl3.sty from l3kernel the following error appears "! Missing = instered for ifnum.<to be read again> [duplicate]

I have installed and deleted the package several times with Miktek. I am writing in TexMaker editor for Windows. Also it does not work for WinEdt. The code is. \documentclass[article] \usepackage{...
1
vote
0answers
27 views

Latex3 replacement for \afterassigment in parsing code to grab integer

When parsing expressions, one way that I like to grab an integer delimited on the end by any nonexpandable token that is not a digit is using a count register and \afterassignment. So the code looks ...
4
votes
1answer
153 views

Issue after TL update 2019-01-10 related exsheets and LaTex3

Before yesterday TL update my file compiled well. Today I got the error: ! LaTeX3 Error: Variant form 'n' deprecated for base form (LaTeX3) '__exsheets_blank_skip:N'. One should not change an (...
0
votes
0answers
27 views

How to add SQL query in the Journal article using Latex?

I am creating a database using PostgreSQL. Based on the created database, I am writing a Journal article. I want to add a SQL query in my article as shown below. Please let me know which command/code ...
3
votes
0answers
53 views

Should @@ used in LaTeX3 for name spacing be the jobname?

The old timers in the LaTeX 3 Team must have been missing their @@ when the l3doc name spacing convention for internal macros was introduced. But at least now we have a reasonable name spacing ...
1
vote
1answer
151 views

Quality and efficiency of my code in LaTeX3?

As an exercise in learning LaTeX3, I would like to replace the following 7 functions, copied from xepersian.sty which do the same job in xepersian package, with a single function. 208 \...
0
votes
1answer
117 views

How to check the existence of some characters in a font using a loop?

I am trying to modify the current version of xepersian package to suit my needs. The following code copied from xepersian-mathsdigitspec.sty is supposed to check if some characters do exist in the ...
6
votes
1answer
118 views

xparse g argument should be avoided?

In new versions of xparse the manual states the following: (in 2. Backwards Compatibility) One role of xparse is to describe existing LaTeX interfaces, including some that are rather unusual in ...
5
votes
3answers
87 views

Prevent newline after clist_map_inline

I'm trying to automate the creation of some forms, and part of that effort is automatically creating the correct number of blank rows in a table-like form. That's led me to the following strange ...
2
votes
1answer
67 views

Add text at end of paragraph that has an \hbox:n

This is a follow on to my previous question about the LaTeX3 \hbox:n behavior. I am trying to automatically add text at the end of a paragraph by redefining \par in the middle of the paragraph. This ...
11
votes
1answer
1k views

Is LaTeX3 ever going standalone or has this goal been abandoned?

I recall that earlier (over 10 years ago), producing a standalone compiler of LaTeX3 code was a project's goal. Today, this goal is no more articulated. Instead, the developers stress today that LaTeX ...
2
votes
1answer
128 views

How can I put four (or more) commands in one command, without repeating so much code using expl3?

I'm trying to put together four commands that encapsulate tikzpicture environments and the use of tikzmark, in one, all have their own keys, but, they have a lot of code in common. The commands are ...
2
votes
1answer
91 views

Software Architecture and xtemplate

When writing a package, there may be the situation that several things need to interact to make a complete product. When using xtemplate, I can define each part as an object. This means that the ...
4
votes
1answer
67 views

Making Environments Using xtemplate

The examples for xtemplate show how to make document commands, but I haven’t seen anything involving environments. If I were to define an environment using xtemplate, what would the best approach be? ...
4
votes
1answer
44 views

expl3: How to add a clist-grouping brace to a tokenlist?

I have LaTeX3 code for a macro that processes its parameters in a complicated way and builds a tree-like structure. To represent this structure it constructs a comma-separated list of strings and ...
0
votes
0answers
22 views

What is the difference between control sequences begining with `\` and the ones begining with `\@`? [duplicate]

In all LaTeX packages documentations that show their internal codes, we see \@ and often we see \@@ or even \@@@. What is the difference between \ and \@? What does it mean to write more @ to start a ...
2
votes
2answers
123 views

Token list vs string in LaTeX3

In my opinion, l3 strings are special token lists whose where all characters has category code 12 (except space), and most interfaces in l3tl and l3str are similar. So, if I just want to process "...
2
votes
1answer
92 views

Latex3 programming and tex primitives: how to “execute after” instead of expandafter

Here is a bit lengthy question. I hope it is not too specific. I'm trying to scan some tex documents and I want to produce text files directly. I'll achieve this by scanning the tex input token by ...
2
votes
1answer
70 views

expl3 read a comma list from file

I am using expl3 now, I want to read data from file, and store them in a comma list, then use the comma list one by one. I don't have any code, I just know exp13 have these function, so need someone ...
2
votes
1answer
74 views

Latex3: Unicode (utf8) string, weird output with pdflatex

I want to store text that contains non-ascii characters in latex3 string variables. With xelatex and lualatex it works well but With pdflatex next mwe produces incorrect output. For legacy reasons ...
3
votes
1answer
65 views

Latex3: Declare variable in aux file

My question is a follow-up to this question. I want to write variables to aux file and also declare them there because the number of variables varies and their csnames are defined in the document ...
6
votes
2answers
61 views

listings: highlight a prefixed keyword starting with a single quote

This is about Rust and their lifetime notation: \documentclass[crop,varwidth]{standalone} \usepackage{listings} \usepackage{xparse} \usepackage{expl3} \usepackage[svgnames]{xcolor} \def\noprint#1{} ...
3
votes
1answer
54 views

Latex3: multicolumn at the beginning of a token list produces an error

I'm not sure if using token list is a good approach to generating table data. Anyway, here is a weird result. It works well in all other cases except when the first item in token list is multicolumn. ...
1
vote
1answer
54 views

Replacing strings including colon by latex3

I would like to replace such as :a into à. The following is the code \ExplSyntaxOn \str_new:N \replace_str \cs_new:Npn \my_replace:n #1 { \str_set:Nn \replace_str {#1} \str_replace_all:Nnn \...
16
votes
1answer
132 views

L(a/ua)TeX kernel/package solution incorporating the globally optimised float placement/pagination

It was interesting to read Frank Mittelbach's articles on globally optimized pagination and float placement. https://www.latex-project.org/publications/ But, there is no mention of these proposed ...
1
vote
1answer
94 views

How to use \exp_not:N and \exp_after:wN to prevent the expansion of \input in a expl3 list?

I have been working on the implementation of an environment (which never nests) and a command to save different parts of a document and use them within it later using a expl3 list andxparse. So far ...
5
votes
1answer
142 views

Is there a LaTeX3 equivalent for \@ifpackageloaded?

Is there a LaTeX3 equivalent for \@ifpackageloaded?
3
votes
1answer
82 views

Latex 3 split macro parameter into strings

I'm trying to split macro arguments into two separate strings on 'underscore' character using expl3 package but none of the following attempts (commented line) work. I also tried 'verbatim' argument ...
11
votes
1answer
313 views

TL2018 (MacTeX) and TikZ calligraphy library

Under MacTeX 2018 the following TeX file: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing,calligraphy} \begin{document} \tikz\draw[decorate,decoration={...
0
votes
0answers
53 views

How to dynamically generate function argument signatures using custom API in LaTeX3

In trying to learn more about the details of what is possible with LaTeX, I wanted to see if I could create an API around creating functions. This is what the output function would be, for example: \...
0
votes
1answer
45 views

Alternative to defining nested commands in LaTeX3

Since it seems that the LaTeX convention is to use globally scoped instead of locally scoped commands/environments (which makes sense now for a complex reason), I am wondering how to handle the case ...
2
votes
2answers
114 views

How to compare different data types in LaTeX3

I am trying to do basic comparison of values but am uncertain how to do it correctly (using LaTeX3 functionality only, so without xifthen). From the documentation, these are the only generic if ...
1
vote
2answers
64 views

How to return a value from a function in LaTeX3

I have this MWE that tries to return a value from \l_example_foo_int from a function: \documentclass[a4paper]{article} \usepackage{expl3} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\...
1
vote
1answer
153 views

Best-practice project architecture for creating a LaTeX3 package / class

I would like to take my .cls file and refactor it into a locally used package. Specifically I would like to: Divide it into multiple files for easier readability (separation of concerns). Have it ...
3
votes
1answer
93 views

How to pass comma-separated list as value to l3keys in LaTeX3

I would like to do the following: \mycmd{foo={a,b,c},baz={1,2,3}} where {a,b,c} and {1,2,3} are arrays/sequences of data. The MWE is this: \documentclass[a4paper]{article} \usepackage[english]{...
1
vote
0answers
25 views

How to package bibliographies into their own package in LaTeX3

I would like to put my references into a single package to use across documents. Right now I have a .bib file with the listings, and import it into a .cls file as \bibliography{./my/local/bibliography}...
1
vote
2answers
132 views

How to define nested environments and commands in LaTeX3

I would like to define nested environments that have the same nested definitions of sub-commands and sub-environments. This is how it would be used: \begin{myenva} \begin{myenvx} \begin{myenvz} ...
2
votes
1answer
54 views

How to dynamically define l3keys

In learning how to properly distinguish between the different function signatures in LaTeX3 (and other features), I want to try a more complex example of dynamically generating l3keys, since it ...
1
vote
1answer
43 views

How to define/iterate over nested property lists in LaTeX3

I have the following MWE: \documentclass[a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{expl3} \usepackage{xparse} \ExplSyntaxOn \...
3
votes
1answer
119 views

Best practices on when to create a new function vs. a command in LaTeX3

After reading this article, it states: Experienced TeX programmers will probably be worried that I’m talking about ‘functions’ and not about ‘macros’. ... The LaTeX3 programming approach ...
2
votes
1answer
56 views

Token lists vs. sequences in LaTeX3

Wondering if token lists can be used to manage property list collections, and create sequences out of them, or if seq are required in order to work with collections of property lists. That is, it ...
2
votes
1answer
29 views

How to construct a variable name inside a command in LaTeX3

I have this example document structure: \documentclass[a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{expl3} \usepackage{xparse} \...
4
votes
1answer
70 views

How to expand local variable from l3keys in LaTeX3

I have the following MWE: \documentclass[a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{expl3} \usepackage{xparse} \ExplSyntaxOn \...
9
votes
2answers
191 views

Choosing property lists vs. key-value lists in expl3

What determines whether I should use a property list or a key-value list when implementing some interface in expl3 syntax? The LaTeX3 documentation says Property lists are intended for storing key-...