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
1answer
81 views

Will LaTeX3 work with the 4000 packages?

As we Know there are 4000 packages in ctan. but when LaTeX3 is released, these packages will be null?
0
votes
0answers
24 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
31 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
120 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
53 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
80 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
37 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
38 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
0answers
107 views

Expl3: It seems the TeXhackers note about \tl_set_rescan:Nnn in interface3.pdf is incorrect - Do I misunderstand that note?

interface3.pdf says: \tl_set_rescan:Nnn ⟨tl var⟩ {⟨setup⟩} {⟨tokens⟩} Sets ⟨tl var⟩ to contain ⟨tokens⟩, applying the category code régime specified in the ⟨setup⟩ before carrying out the assignment. ...
4
votes
1answer
49 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
vote
1answer
52 views

Combining LaTeX3 conditionals

Let's say that I want to iterate on the lines of a file and try to do a regex replace on each line, and do something with the outcome if there is a match, but there are in fact two regexes and I want ...
1
vote
1answer
55 views

Latex3 (expl3) sub-functions / sub-parameters

I have a function that do create functions on the fly, but I cannot figure how to make the created function to have parameters. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CHARACTER ...
0
votes
1answer
45 views

How to capitalize LaTeX3 sequence element in document input stream?

How to capitalize LaTeX3 sequence element in document input stream? The problem with \seq_item:N I think, becaue it unexpandable. \documentclass{article} \ExplSyntaxOn \seq_new:N \...
0
votes
1answer
84 views

LaTeX3: selective expansion

I have narrowed my problem to the next oversimplified token list (there are much more tokens that I do not know in advance) \tl_set:Nn \l_tmpa_tl { \myFoo \myBar { \myBaz } } where for example \...
0
votes
1answer
51 views

How to add such content table in my research paper? [closed]

How to add such content table in my research paper ? I am using \documentclass[12pt,leqno]{amsart} I want to cite or call the page numbers also in the table-content. Please add few examples. Edit: ...
2
votes
0answers
45 views

LaTeX3: implement a stack of integers

I can see at least 3 different approaches to implement a stack of integers with a sequence (seq) with a comma separated list (clist) with an array of integers (intarray) Points 1 or 2 are very ...
1
vote
1answer
32 views

pgfplots fill above two lines with domain

iam trying to fill above the green and the red line, between the two brown lines. Ive tried it with soft clip and domain, but i cant get it working. Here is what iam trying to achieve (thick organe ...
0
votes
1answer
48 views

Replicate similar structured macro definitions with LaTeX3

Is any posssibility create similar structured macro? For example, in MWE I have a \creator and I want create same defined macro \lecturer, so it possible via replacing word creator to lecturer. And if ...
0
votes
1answer
53 views

Latex3: How to test if macro is empty?

How to test if a macro is empty? As you can see in MWE, the creator1email is empty (or \relax ?), but my test via \cs_if_exist get an 1. \documentclass{article} \ExplSyntaxOn \int_new:N \...
10
votes
1answer
153 views

Trouble with xcoffins in TL2020

Consider the following MWE: \documentclass[11pt,a4paper]{article} \usepackage{xcoffins} \NewCoffin\lcoffin \NewCoffin\fcoffin \parindent=0pt \begin{document} \fbox{\parbox{.25\textwidth}{\begin{...
0
votes
1answer
36 views

How to insert in \int_case value, return by function?

I want to check the sum of a sequence of variables. I created a function which returns this sum. But when I use it I get an error. \documentclass{article} \usepackage{expl3} \pagestyle{empty} \...
2
votes
0answers
35 views

\def\@absorbperiod.{} in LateX3?

In TeX: \def\@absorbperiod.{} will strip the period from the token stream. I can't figure out a way to replicate this behavior in LaTeX3 (nor can I figure out a way to use this as a TeX command ...
3
votes
1answer
56 views

How do I add the value of a token list with braces in LaTeX?

In my LaTeX3 code, I frequently find myself wanting to add the value of one token list (or other variable) to another but surrounded by braces (a common use case is where I'm constructing a command to ...
9
votes
1answer
2k views

Can I temporarily disable the @@ replacement in LaTeX3?

I'm trying to write my L3 packages using good practice, which I understand involves using @@ in defining command and variable names which then get replaced by the module name (Section 3.2.2 in texdoc ...
49
votes
3answers
4k views

What's the current state of LaTeX3 (2020)?

There are a few questions on this forum asking about why Latex3 is taking so long to come out. However, all of these are from the early 2010s. I'm just wondering what the current state of the project ...
1
vote
1answer
119 views

How do I convince the l3 team that g-type arguments are necessary? [closed]

I claim that g-type xparse arguments are strictly necessary and should be supported directly in the LaTeX kernel, rather than being officially deprecated as they are right now. If you disagree with me,...
1
vote
1answer
63 views

Column color and l3colors

Consider the following MWE: \documentclass{article} \usepackage[table]{xcolor} %\usepackage{l3color} %\usepackage{colortbl} %\usepackage{l3draw} \definecolor{sampleredexpl}{RGB}{21,71,158} %\...
9
votes
2answers
212 views

Using the \int_step_function

Consider the following MWE: \documentclass[letterpaper]{article} \usepackage{l3draw} \ExplSyntaxOn \NewDocumentCommand{\miconcentric}{ O{0.08ex} } { \mathicon_concentric_circles:n { #1 } } ...
4
votes
1answer
107 views

How to understand correctly scope of local variable in LaTeX3?

Common programming languages (C). // foo is global scope int foo = 0; int main() { // bar is local scope within main int bar = 1; } Let's consider LaTeX3 \documentclass[]{article} \...
2
votes
1answer
54 views

Key values using l3keys (pencil symbol)

Consider the following MWE: \documentclass[letterpaper,11pt]{article} \usepackage{l3draw} \ExplSyntaxOn \dim_new:N \l__pencil_dim \fp_new:N \l__pencil_linethickness_fp \cs_new_protected:Nn \...
1
vote
0answers
57 views

Adding Orcid badge to a paper

I want to add the ORCID badge for the author of an article. I've copied the code exactly from this source: https://gugushvili.github.io/blog/2019/08/09/orcid \documentclass{acmart} \usepackage{lipsum} ...
0
votes
0answers
41 views

Using l3draw to recreate \cplus

Consider the following MWE: \documentclass{article} \usepackage{amsmath} \usepackage{l3draw,xparse} \ExplSyntaxOn %--------------------------------------------------------- \box_new:N \...
0
votes
0answers
43 views

\hrulefill and \dotfill

The LaTeX2e sources defines \dotfill and \hrulefill as follows: Interestingly, I noticed that in the multicolrule package, the author makes use of TeX primitives defined in L3 syntax as follows: Of ...
2
votes
1answer
38 views

Declaring sum globally

Consider the following MWE: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\shcpoint}{ m } { \azetina_shcpoint:n { #1 } } \NewDocumentCommand{\printtotal}{ } { \...
0
votes
0answers
47 views

Vertical skips in paragraphs in L3

Consider the following: TeX features some macros for fixed-length spacing. \smallskip Inserts a small space in vertical mode (between two paragraphs). \medskip Inserts a medium space in vertical mode ...
7
votes
2answers
178 views

L3 equivalent to ifcase

Consider the custom code of date showing the month and year only: \def\shccustomdate{% \ifcase \month \or January\or February\or March\or April\or May\or June\or July\or August\or September\or ...
2
votes
1answer
48 views

Missing } inserted after redefining equation and align environments

In the following mwe I'm redefining the equation and align environments to save the width of their contents via a \settowidthofalign macro copied from this post. \documentclass{article} \usepackage{...
0
votes
0answers
15 views

How do I create a folder for auxiliary files in Miktex using an Ubuntu distribution?

I would like to create a folder to place the files: .out; .aux, etc. for Ubuntu. I used --output-directory=dir in PdfLatex, but don't work.
2
votes
1answer
90 views

\box_new:N for use with \hbox_set:Nn

My question is regarding \l_tmpa_box. Consider the following code: \ExplSyntaxOn \hbox_set:Nn \l_tmpa_box { \includegraphics[scale=0.125]{images/shc_logo.pdf} } \dim_new:N \l__shc_logo_dim \dim_set:...
6
votes
3answers
661 views

LaTeX 3 Command Alternatives

Consider the following MWE: \documentclass[letterpaper,11pt]{article} \usepackage{geometry}%[showframe] \usepackage{array} \usepackage{graphicx} \usepackage{booktabs} \usepackage{fontspec} \...
0
votes
0answers
32 views

Getting a specific old version of a package as a .sty file

The Problem I'm trying to submit a manuscript to a journal hosted on mc.manuscriptcentral.com, which, as far as I can tell, use a very old TexLive distribution. Naturally, this is out of my control. ...
2
votes
1answer
89 views

Class options don't work if class and document files are in different directories

I have the following directory tree: . ├── foo │ └── foo.tex └── testcls └── testcls.cls where foo.tex is \makeatletter \def\input@path{{../testcls/}} \makeatother \documentclass[hyperref=true]...
3
votes
1answer
93 views

Is it undocumented that the `x'-type argument of `\cs_new:Nx' (etc.) is special w.r.t. `#', and how should I work around this?

I would like to define an expl3 command that— takes, as an n-type argument, code that contains parameter numbers such as #1; has variants that take this same code as an x-type or e-type argument; and ...
5
votes
2answers
494 views

What is the LaTeX3 project doing to make LaTeX run faster?

One of my biggest problems with LaTeX is the speed that it takes to process large documents. (I typeset books with LaTeX.) I have approaches, such as breaking the book into chapters and running them ...
1
vote
1answer
41 views

Why is command created with expl3 does not work with command as an argument?

I'm trying to create my regex command, with expl3, that will push dash behind words shorter than three characters. That no problem and its work with simple text, but when I try \input or \include as ...
1
vote
2answers
65 views

Weird behaviour with expl3's keys

Consider the following MWE: \documentclass{article} \usepackage{amsthm} \usepackage{xparse} \newtheorem{theorem}{Theorem} \newtheorem{definition}{Definition} \ExplSyntaxOn \tl_new:N \...
0
votes
1answer
50 views

How to reset key values in LaTeX3

In the MWE below, how can I reset the value of the title key, assigned to \l__lecture_title_tl, so that the third instance of \lecture doesn't print A title? \documentclass{article} \usepackage{...
1
vote
1answer
30 views

How to expand \rightmark?

I am puzzled why I cannot expand \rightmark to pass to another macro. Consider the following mwe \documentclass[12pt, twoside, letterpaper]{scrartcl} \usepackage{scrlayer-scrpage} \renewcommand*{\...
1
vote
0answers
41 views

Unicode in PDF metadata with latex3 and an utf8 engine

In Unicode in PDF Metadata, Heiko Oberdiek proposes a way to set the PDF metadata to some unicode string while operating at the low level, without resorting to hyperref. To this aim, he ends up using ...
2
votes
1answer
197 views

x86 Assembly Language Listing

I am trying to make the following x86 Assembly Language Listing style: But I couldn't make it. My listing code is as: \documentclass{article} \usepackage{listings} \usepackage{color} \usepackage{tikz}...

1
2 3 4 5
13