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
3
votes
1answer
135 views

Whatever happened to BibTeX 1.0?

BibTeX has many shortcomings but apparently there was (at some point) a plan to develop BibTeX 1.0 with the aim of overcoming at least some drawbacks. See this paper by Oren Patashnik, the author of ...
0
votes
0answers
27 views

Use a code when one special package option value is used

I have missed something with the definitely M(not)WE code below. When the option auto is used, I would like to achieve the action in the "funny" macro \babellang that makes me feel ashamed. ...
6
votes
1answer
288 views

What is the “>?” LaTeX3 floating point operator

The l3fp package documentation refers to the >? operator (page 237 of interface3.pdf) but I could not find any example or explanation there despite it is recognized as shown in next example. \...
3
votes
2answers
119 views

Calculate the lengths of rules (in LaTeX3?)

I don't think this hard to do but I 'am a real noob with calculations and dimensions. In the code above I would like to calculate automatically the dimensions of the left and right rules such as ...
4
votes
1answer
57 views

LaTeX3 - Failing to define the default value of a package option

I fail to obtain a default value for an option of a package. What is a good way to obtain a default "string" value for an option? Here is what I have tried. % File: main.sty \NeedsTeXFormat{...
2
votes
2answers
108 views

Column delimiter in a macro to render rows for tabularray

I'm trying to programmatically typeset rows inside a tblr table (from tabularray), but I'm unable to solve a Misplaced alignment tab character & error. This minimal example reproduces my exact ...
9
votes
4answers
417 views

LaTeX3 - Parsing an argument to apply specific macros

In the following code, I would like to parse the argument of \parseanduse such as to "achieve" the examples shown. Each time a o is met, the following integer should be used to call the ...
1
vote
3answers
68 views

LaTeX3 - Test string equality + Star version

I'm looking for some good advice on switching from (La)TeX to LaTeX3 Here is the first questions corresponding to the toy code below. What is a good way to manage an optional argument with LaTeX3? ...
1
vote
2answers
37 views

Sort a clist and calculating the sign of the sorting permutation

I want to sort a LaTeX3 clist and, at the same time, calculate the sign of the sorting permutation, which is (-n)^s where s is the number of swaps required to sort the list. For example, if I start ...
7
votes
1answer
293 views

amsmath breaks LaTeX3 assignments

I am trying to use a global boolean variable b within a LaTeX3 function. I would like my function to print F if b is false and toggle it to true, and to print T if b is true. This works great in text ...
1
vote
2answers
45 views

best practices for passing arguments to commands or macros

I implemented some commands/macros recently and I'm thinking about reducing the number of arguments given to a command/macro. Basically, until now I have created some macros with xparse or \cs_new:N ...
0
votes
1answer
48 views

How to take out the Summary from the summary

I'm using Overleaf to edit my final paper and there's a problem with my summary. Although I'm using the right command, it keeps showing up a sub topic on the summary called summary, indicating where ...
3
votes
1answer
152 views

LaTeX3: {#1} or { #1 }

l3styleguide.pdf reads With the exception of simple runs of parameter ({#1}, #1#2, etc.), everything should be divided up using spaces to make the code more readable. However, interface3.pdf shows ...
2
votes
2answers
79 views

Latex3 clist contains only one element

I want to use a clist, but I don't understand why it contains only one element. I use the following function \NewDocumentCommand{\makeenumerate}{ m } { \begin{enumerate} \clist_map_inline:nn { ...
2
votes
1answer
39 views

Compare strings (token lists), comes before, comes after

How to compare two strings (token lists)? I'd like to know if 2021-05-16 comes before 2021-06-01 or not. We can assume that the two strings have the same length. I found the macros \tl_if_eq, \...
1
vote
1answer
45 views

Colored charges in chemfig?

I created a lewis formula with chemfig: Now I want to color only the charges like OP did in this question. This is my code: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{verbatim} \...
2
votes
1answer
25 views

append code to a macro in amsmath align environment

I want to append code to a macro in amsmath align environment. I tried \g@addto@macro and LaTeX3 macro \tl_gput_right:Nn, but it seems double the code that I want to append. Here is MWE: \...
18
votes
1answer
539 views

TeXbook for a “future” LaTeX3 developer

What should I read in the TeXbook that is necessary to try to be proficient in LaTeX3 coding?
5
votes
1answer
163 views

LuaLaTeX writing LaTeX commands

I am trying to have LuaLatex automate some LaTex. For example if I write : \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tcolorbox,graphicx,tikz} \usepackage[paperwidth=120pt, ...
5
votes
2answers
142 views

What is the difference between \cB. and \cB\{ in regex?

All is in the title. I wonder to know the difference between the two expressions \cB. and \CB\{ in regular expression (regex). In the example below, it seems that both give the same result. ...
8
votes
1answer
337 views

Is there an incompatibility between the new version 2021 of babel and Latex 3?

Indeed, the following macro \NewDocumentCommand{\xsameword}{m} written by @nox in his answer here, has a compile-time error. ! Missing \endcsname inserted. <to be read again> ...
1
vote
1answer
44 views

Latex, how to align matrices

I am working on an assignment. I have a matrix that I am trying to align, this is what it looks like. I have two questions How do I align these horizontally i.e how do I make columns 4,5 and 6 the ...
0
votes
1answer
40 views

LaTeX3 - regex and new line

I would like to replace each new line of an argument with + but I can't achieve this. Maybe a bad format for the argument... What I am missing? \documentclass{article} \ExplSyntaxOn \str_new:N \...
4
votes
1answer
137 views

LaTeX3 - An equivalent of `\def`?

In the MWE below, I use \def\path{numworks/\int_use:N \l__test_this_step_int.png} and \includegraphics[scale = #3]{\path}. Can I avoid the use \def for a "pure" LaTeX3 coding style? Note: ...
1
vote
2answers
43 views

LaTeX3 - Problem with incrementing integers inside a `multicols` environment

I fail in incrementing integers inside a multicols environment. Here is an unwanted output with two zeros instead of two 2... Here is my M(not)WE. What kind of stupidities am I doing here? \...
0
votes
1answer
67 views

Writing Chinese text using “CJKutf8” package. Sample is shown below. “textbf{}” not working on Chinese text. Heading of abstract isn't bold too

\begin{CJK*}{UTF8}{gbsn} \begin{chineseabstract} \addchaptertocentry{\chineseabstractname} 中文摘要写在这里 (Chinese abstract is written here) \textbf{关键词:} \end{chineseabstract} \clearpage\end{CJK*}
1
vote
1answer
22 views

latex3 clist put inside an environment definition

I'm puzzled as to why the following doesn't work: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \clist_new:N \l_test \clist_set:Nn \l_test {a,b,c} \NewDocumentCommand{\putitem}{m}{ \...
2
votes
1answer
31 views

Get item with key as a variable

I am trying to retrieve a value of a specified key which is stored in a variable. Normally we would use Nx to expand the variable but \prop_item:Nxthrows an error. How do I retrieve the value if the ...
0
votes
1answer
107 views

Are there things that TeX can do but LaTeX3 can't?

Sorry for this general question but to be honest I hate more and more coding in TeX and even if I am a very beginner coder in LaTeX3, I really appreciate using it.
0
votes
1answer
36 views

how to add margin to a element (chapter)

I try to add some margin top to my page but is not working : Please how can I do it ? here the code : \documentclass[12pt, twoside, openany]{book} \usepackage{mathptmx} \usepackage[spanish, es-...
2
votes
1answer
93 views

latex3 - Full support grammar for editors - Not a technical question

It could be so useful to have a full grammar supporting all the built-in macros of LaTeX3. This would simplify the reading of codes by proposing special formattings for each of these built-in macros. ...
4
votes
3answers
230 views

Transpose a partially filled matrix in LaTeX 3

I am working on a LaTeX 3 macro to obtain something that will look like this (I use an ASCII formatting just to ease the understanding of the output expected): x^2 - 2 = 0 or 4 x + 3 = 0 or x - ...
2
votes
2answers
24 views

Visualizing a picture in the tabular

For my thesis, I have to include my signature in the autorship page. I want to do that numerically (not hand-writing). I include the signature in the form of an image to my project and I want to put ...
0
votes
1answer
71 views

Undefined control sequence while using mathindent package

This is my LaTeX Document given below \documentclass[16pt]{article} \usepackage{amsmath} \setlength{\mathindent}{0pt} \begin{document} \noindent \textbf{\textit{$\underline{Integration}$}} ...
0
votes
2answers
160 views

What is LaTeX3 correcting in LaTeX2e? And, updates 2021 on LaTeX implementation on small mobiles OS? [duplicate]

There are so many things wrong with LaTeX2e according to the latest discussion, Why is LaTeX3 taking so long to come out?, from documentation to speed, inflexible kernel, etc. We are perhaps waiting ...
1
vote
0answers
44 views

command \ctg already defined. or name \end [closed]

What's wrong that pic. I can't founded. Please help me
2
votes
0answers
85 views

Learning about higher-level formats [closed]

I recently finished reading The TeXbook and TeX by Topic. Now I want to understand more about the LaTeX or ConTeXt formats, as well as the more modern engines; things like: How does LaTeX2e / LaTeX3 ...
6
votes
2answers
184 views

LaTeX3: Elegant way to forward-reference a counter with a “future” value

I'd like to do, pseudo-code, the following: \begin{pointtracker}{Advanced Geology} \begin{itemize} \item Count the fingers on your left hand. Are there more than 9? \addpoints{1} \item Draw ...
1
vote
1answer
60 views

Write with expl3 | 1) How to properly write the initialization part with expl3 syntax?

As stated in a previous question, I wish to switch my class written with LaTeX2e to the expl3 syntax. I will try to do this by asking a series of questions, collecting code examples, making the ...
20
votes
1answer
1k views

What are the annual conferences to develop the LaTeX?

What, where and when annual conferences are held to develop the LaTeX?
0
votes
0answers
66 views

Switching my existing class from LaTeX2e to expl3 syntax

It has been my dream to rewrite my existing class with the expl3 syntax, as (I believe that) the code would be much clearer and would be easier to maintain by then. One year ago, while searching on ...
1
vote
1answer
195 views

Will LaTeX3 work with the 6000 packages?

As we know there are 6000 packages in CTAN. but when LaTeX3 is released, these packages will be null?
1
vote
1answer
48 views

File `l3backend-pdfmode.def' not found (TeX Live 2020)

I just finished installing and updating TeX Live 2020 on Windows 10. I performed a full installation of TeX Live. Now, compiling this simple document: % !TEX program = lualatex \documentclass[a4paper, ...
1
vote
1answer
41 views

A four quadrant floating point inverse tangent function

After a chat discussion yesterday, I decided to write an inverse tangent function that normalizes the angle in the range [0,2\pi] (or [0,360] in degrees of course). Doing so was easy. My question is, ...
5
votes
1answer
129 views

Why does this \regex_split:nnN results in error and insertion of `{`?

I am playing around with expl3 and wanted to try some higher order programming. In this example I define an environment and then perform an action on this environment: \documentclass{article} \...
1
vote
1answer
56 views

Evaluate each element in a computed comma separated list

I have a permutated list which I sort, which I then use as shades for some TikZ figures. \documentclass{article} \usepackage{expl3, tikz} \ExplSyntaxOn \clist_new:N \l_my_clist \NewDocumentCommand{\...
3
votes
1answer
88 views

Problem with str_if_eq

This must be a really dumb question, but what am i doing wrong here? As far as I can see, the strings are equal, so the test should be successful, instead i get not successful. \documentclass{article} ...
0
votes
1answer
47 views

`\bool_if:NTF` and best use of conditional in latex3

This question is about the best use of conditional in LaTeX3. I want to add somthing like this using expl3's syntax \newif\ifsomething \newcommand{\Ifsomething}[2]{% \ifsomething #1\else #2\fi} \...
2
votes
1answer
55 views

What is the difference between `\tl_set:Nn` and `\cs_set:Npn`?

I am newbie to LaTeX3 and i am trying to understand some basics. So, suppose i want to do somthing like \newcommand{\contentsname}{Contents} I can achieve this by one of these ways \tl_const:Nn \...
4
votes
1answer
55 views

\includegraphics does not find picture if passed as variable

I want to import a picture by passing a variable which stores its name instead of the name itself. Here is example code \documentclass{article} \usepackage[margin=0.7in]{geometry} \usepackage[parfill]{...

1
2 3 4 5
14