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.

43 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
78
votes
0answers
3k views

How to make the transition from LaTeX2e to expl3 syntax?

I was peeking at the LaTeX3 Github repository and specifically l3auxdata.dtx. There was a surprise for me, as I have been practicing and studying the expl3 syntax and modules for the last couple of ...
6
votes
0answers
297 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 ...
4
votes
1answer
140 views

minted escapeinside works for all supported languages except LaTeX

I want to add some math symbols into the escaped contents, minted works well for languages like Python, but not LaTeX. A sample code: \documentclass{article} \usepackage{minted} \begin{document} \...
4
votes
0answers
101 views

Are there more "example-based" manuals or docs about expl3?

I'm interested in learning expl3 because allows flexibility in macro writing and, unlike Lua, it is supported by most TeX engines. I've read the following questions and answers with respect to expl3 ...
3
votes
0answers
94 views

LaTeX3 output routine

In the source and documentation of the dblfloatfix package there is a line that states When the new output routine for LATEX3 is done, this package will be obsolete.The sooner the better... Are ...
3
votes
0answers
85 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 ...
3
votes
0answers
133 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 ...
3
votes
0answers
82 views

How can I apply actions to specific items or after specific items in a sequence in LaTeX3?

Let's say I have a sequence of items. I would like to allow for the user to provide a key (here named "mainitems") that equals a number (default 1 as there is always at least 1 main item). Special ...
3
votes
0answers
114 views

Experimenting with l3box and l3skip's dim variables

Note: The following MWE has no significance in use or further application of any kind rather than just for experimenting with the packages explicitly written on the question title. \documentclass{...
2
votes
0answers
48 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 ...
2
votes
0answers
37 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 ...
2
votes
0answers
276 views

Collection of papers with combine class: incompatibility with latex3/xparse

I'm trying to put together a collection of papers in a single edited volume with the combine class. This gives a series of errors, but none fatal, and typesetting is successful. However, some of the ...
2
votes
0answers
1k views

How to use variable for \includegraphics and \attachfile in LaTeX3

I want make a function, it can insert image and attach file (e.g., the data about plotting), so I need set a variable for image name and it will use for attachfile.(\attachfile from attachfile2 ...
2
votes
0answers
208 views

How to sort a comma separated list?

Using receipt of How to process a comma separated list?, I elaborated the following code for my needs: \ExplSyntaxOn %\seq_new:N \l_input_seq % declare a list (seq) variable \cs_if_exist:NTF \...
2
votes
0answers
147 views

Determine whether the macro/function is in subscript, in superscript, or neither

I would like to provide different formatting for an xparse command, depending on whether the command is expanded in superscript, in subscript, or neither. That is, I would like to know inside the ...
1
vote
0answers
85 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} ...
1
vote
0answers
51 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 ...
1
vote
0answers
67 views

How can I set line stretch inside lstlistings for displaying code?

I have a long document and I set a different spacing like this: \usepackage{setspace} \renewcommand{\baselinestretch}{1.5} This stretching also applies inside my lstlisting, but I would like to ...
1
vote
0answers
40 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 ...
1
vote
0answers
37 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 ...
1
vote
0answers
33 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
0answers
327 views

Elegant way to make entire citation bold, using an author/year style

Following this question, I would like to embolden specific references in my bibliography. The difference with the previous question is that I would like to use the abbrvnat bibliography style. The ...
1
vote
0answers
67 views

Length of the inner-most plain-text argument (token sequence) in a nested macro expression (via expl3)

I would like to determine the length of the original token sequence passed to the inner-most macro as in \compl{\indexset{J}} where \NewDocumentCommand{\indexset}{m}{\mathsf{#1}} \...
0
votes
1answer
13 views

latex - lyx: how to change automatically some field in a document

Sorry but I'm a newbie in Latex and Lyx. I need to have a field referenced in the whole document. For example a character's name in a short novel. I need to be able to change that name wherever in the ...
0
votes
0answers
31 views

Package PDF specification "setspace – Set space between lines"

Where I can find PDF full specification for Latex Setspace Package? or at least alternatives for this packages to use with in my latex document?
0
votes
0answers
39 views

l3.ins does not unpack l3-packages correctly

Trying to get l3color.sty I tried running sudo latex l3.ins which unpacked various files, but not packages. Examining l3.log there are lines Processing file l3color.dtx (package) -> expl3-code....
0
votes
0answers
31 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. ...
0
votes
1answer
74 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 ...
0
votes
0answers
69 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 ...
0
votes
0answers
65 views

Using l3draw to recreate \cplus

Consider the following MWE: \documentclass{article} \usepackage{amsmath} \usepackage{l3draw,xparse} \ExplSyntaxOn %--------------------------------------------------------- \box_new:N \...
0
votes
0answers
84 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 ...
0
votes
0answers
56 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 ...
0
votes
0answers
18 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.
0
votes
0answers
54 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. ...
0
votes
1answer
48 views

Freezing compilation coming from a macro when `\tcbuselibrary{minted}` is used

In the following code the use of \tcbuselibrary{minted} breaks the compilation and if I comment the use of \redoit{} the compilation succeeds. Why ? How do I fix this ? Here is the message I have with ...
0
votes
0answers
26 views

latex l3sys get exit code of script

I am using l3sys of the latex3 interfaces, i need to get the exit code of a script after running it. I am running \sys_get_shell:nnN, i tried giving it echo $? and echo \$, but the shell for some ...
0
votes
0answers
52 views

why this does not work: `\use_i_i:nnn {#1}{#2}{#3}`

Why the following code does not work ? \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \cs_new_protected:Npn \mycommand #1#2#3{ \use_i_i:nnn {#1}{#2}{#3} } \ExplSyntaxOff \begin{document} $\...
0
votes
0answers
104 views

a MWE of LaTeX3 package

How do I write a XeTeX program from this package which just prints the result of this command \use_i_ii:nnn { abc } { { def } } { ghi } when called as a function $\foo{ abc } { { def } } { ghi }$ to ...
0
votes
0answers
78 views

LaTeX3: Function scope

If I get it right, a token list is declared globally but can be assigned locally. So all local variables with the same name are actually declared globally as the same one. Functions often need to use ...
0
votes
0answers
123 views

Greek letters not displaying correctly

I have trouble with setting up greek letters to be used in SI unit. I need to set up the microseconds unit for my measured value. However, any solution I found online straigh just failed on my end. ...
0
votes
0answers
81 views

Sublime text autocompletion for latex3/xparse-defined commands

I recently started using sublime text 3 with latextools and latex-cwl. I like the autocomplete functionality for commands so far, except that it does not seem to work (by default) for my own commands ...
0
votes
0answers
93 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
0answers
134 views

LaTeX3 choice keys that set other choice keys

I'm trying to set up choice keys that can implicitly set other choice keys. In both the "parent" and "dependent" keys, the set of choices have the same values. The code below does more-or-less what I ...