Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
4 votes
3 answers
96 views

Reproduce table borders issues

I have the following table in Microsoft Excel: I tried to reproduce the same in LaTeX: \documentclass[border=1cm]{standalone} \usepackage{amsmath} \usepackage[table,xcdraw]{xcolor} \begin{document} \...
Vincent ISOZ's user avatar
1 vote
2 answers
80 views

Macro copy, add/remove last token

Suppose I have a macro with only argument that has such a structure \def\foo#1{% {\textbf{#1}}{aaa}{bbb} } I need to create two copies: \bar that is \foo but withouot the last token: \...
antshar's user avatar
  • 4,537
7 votes
2 answers
197 views

Custom multiple \str_case:nn — expl3

I'm trying to create a custom more advanced function with a structure similar to \str_case:nn {⟨test string⟩} { {⟨string case1⟩} {⟨code case1⟩} {⟨string case2⟩} {⟨code case2⟩} ... {⟨string ...
antshar's user avatar
  • 4,537
3 votes
1 answer
84 views

Use l3seq sequence in command requiring \ExplSyntaxOff

I am working with a LaTeX3 template that stores a list of languages in a l3seq sequence g_languages_seq. I want to pass these to polyglossia, so in essence I want to do something like \...
Marek Dědič's user avatar
2 votes
2 answers
63 views

Specific Formulas Alignment

I need to align congruences in different ways in columns. The left parts of the formulas (in the red frame) need align in the center, the right ones (in the green frame) should be one under the other (...
32seph's user avatar
  • 23
1 vote
1 answer
49 views

Hyperref url border disappears when using \DocumentMetadata

Today I found The documentmetadata-support code and checked out \DocumentMetadata: After reading the manual I set up \DocumentMetadata as follows: % \DocumentMetadata{ % backend = luatex, %...
Dave's user avatar
  • 133
0 votes
1 answer
57 views

Weird error when redefining \msg_info_text:n and using fontspec package

I am still experimenting with LaTeX3 to get a better understanding. I follow the L3 manual for this. Now to my problem: I want to redefine \msg_X_text:n like explained in 11.3. Everything works ...
Dave's user avatar
  • 133
2 votes
1 answer
43 views

How to trim spaces without expanding what is inside in expl3?

Consider the following pattern: \NewDocumentCommand{\mycommand}{m}{ \myinternalcommand:n{#1} } \cs_new:Nn \myinternalcommand:n{ \tl_if_single:nTF{#1}{TRUE}{FALSE} } and let's say that I want ...
Vincent's user avatar
  • 5,297
0 votes
1 answer
47 views

How to create a LaTeX3 environment in paracol without delimiter issues?

I would like to turn this answer into an environment. Therefore, I use xparse to define a LaTeX3 environment, but I am missing a little something because it creates errors. It seems, I have issues ...
R. N's user avatar
  • 1,122
0 votes
2 answers
42 views

Customized output when referencing autonumbered paragraph

I have a customized paragraph that I use to define skills and autonumber them. When referencing the paragraphs, the output should be custom text plus counter number (e.g., S1, S2 etc). But currently, ...
mike's user avatar
  • 335
1 vote
0 answers
46 views

How should I have diagnosed this? Figuring out when to insert code into hooks to alter third party package behaviour

This question seems very confused to me, so I'm not sure you will be able to make sense of it. I know how to solve this problem (now). What I would like to know is how I should have diagnosed and ...
cfr's user avatar
  • 203k
6 votes
1 answer
216 views

Current best practice re. cross-references to last page

I am/was using pageslts, which I know is not supposed to be compatible with current LaTeX. As far as I understand, there is no alternative offering the same functionality, but I'd like to at least ...
cfr's user avatar
  • 203k
0 votes
0 answers
28 views

Theorem, lemmas, examples numeration

I'm writing the paper and need to fix the numeration. Actually I have Theorem 1.1, Theorem 1.2, Lemma 1.3, Theorem 1.4 etc. This is my head with macroses \documentclass[12pt,a4paper]{mwrep} %do druku ...
Ciemna_noc's user avatar
3 votes
1 answer
135 views

LaTeX3 regex not working

I have a very strange bug and I guess I am not using LaTeX3 regexes as they are supposed to be used. My current document looks like this: \documentclass{standalone} \ExplSyntaxOn \regex_new:N{\...
Vincent's user avatar
  • 5,297
0 votes
0 answers
22 views

Matplotlib - Latex Premable Package not loading

I want to use LaTeX in the x-label of a plot. I need the label to be \varepsilon with a subscript that is a smaller version of the \parallel symbol. This is what I have tried but it does not work, I ...
Euler_Salter's user avatar
0 votes
3 answers
57 views

In Latex3, how to test if all tokens in the input verify a test (for example \token_if_letter or \token_if_space)?

In Latex3, I would like to write a function that checks if every token of an input verify a predicate. Basically I would like the multitoken version of this command: \NewDocumentCommand{\mychecksingle}...
Vincent's user avatar
  • 5,297
0 votes
0 answers
147 views

Powershell's Get-Clipboard slow output in TeXStudio Script

I am currently trying to run a TeXStudio script that calls a Powershell Script that outputs to the Messages Section of TeXStudio the contents of the clipboard. This is the script I have in TeXStudio's ...
Juan De Castro's user avatar
6 votes
1 answer
191 views

Why does multiplication in \dim_set:Nn crash LaTeX?

Why does multiplication in \dim_set:Nn cause the LaTeX to crash? I have found that it is possible to do multiplication in \fp_set:Nn for example \fp_set:Nn \onefloat {5 * 6} works well. But ...
user1239299's user avatar
1 vote
0 answers
42 views

Simultaneus Multicolor for Letter using Latex [duplicate]

\documentclass[11pt,a4paper]{scrartcl} \usepackage[spanish]{babel} \usepackage{geometry} \geometry{margin=1.3cm} \begin{document} \centering {\Huge Markallaa}\\ \vspace{1.1cm} {\huge (Harawii)} \...
ABV's user avatar
  • 621
3 votes
1 answer
204 views

What are these ^^M that I can't replace?

If I read with he v argument a verbatim string, all newlines are replaced with a token ^^M (seems like it is a carriage return in latex). The problem is that when I write this down to a file, it ...
tobiasBora's user avatar
  • 8,814
2 votes
1 answer
97 views

Error: Arithmetic overflow

Motivation I'm trying to calculate different probabilities 'automatically', given only some variables such as the number of cards in a sample and the number of cards drawn. Code The following code ...
Svend Tveskæg's user avatar
7 votes
5 answers
818 views

Command for Multiplying Integers

I would like to create a command that can multiply consecutive integers together (if it doesn't already exists). How do I create a command, say \multiply{<first_number>}{<last_number>}, ...
Svend Tveskæg's user avatar
6 votes
2 answers
357 views

if_exist macros in LaTeX 3: what are they doing if they do not check the type of things they are supposed to check?

In the documentation of interface3, for several macros with the pattern xxxx_if_exist for xxxx being bool, str, seq and many others the following appear: Tests whether the <boolean> is ...
Vincent's user avatar
  • 5,297
0 votes
0 answers
55 views

Suggest a Practical Roadmap to becoming a TeX/LaTeX expert [duplicate]

What would be a Practical and Optimal Roadmap for a beginner to becoming an expert author or maintainer of a complex and professional LaTeX package?
Abbas's user avatar
  • 73
1 vote
2 answers
55 views

Create a table with latex3: error extra alignment tab

I would like to create a table with a macro. Unfortunately, I get an error. So here is a simple example: \documentclass[a4paper,12pt]{article} \begin{document} \ExplSyntaxOn %%% Create a new ...
Luc Armand's user avatar
1 vote
1 answer
64 views

How can I define a command for lower and upper Riemman integrals with the limits as list?

The command I'm trying to define is the following: \lowint{f}[a,b}{\alpha} Expecting: When the second argument is empty, the expected result is this: I noticed that using \underline{\int} produces ...
DAGO's user avatar
  • 67
0 votes
1 answer
84 views

No output PDF file produced while using \tl_show, \str_show, \int_show etc

While compiling Latex source file \documentclass{article} \ExplSyntaxOn \tl_new:N \l_test_value_tl \tl_set:Nn \l_test_value_tl {It's~a~test~value} \tl_show:N \l_test_value_tl \ExplSyntaxOff \begin{...
Mikalai Strylets's user avatar
5 votes
2 answers
168 views

Why can I not correctly reset a key in l3keys?

To help me learn l3keys I created two small demos. The first uses l3keys for a command and seems to work correctly as far as I can tell. % !TEX program = lualatexmk % !TEX encoding = UTF-8 Unicode \...
LaTeXereXeTaL's user avatar
0 votes
0 answers
21 views

latex expressions in 2 columns separated by line

I want to write latex code for the following -- i have the following latex code but it doesn't work -- \begin{mdframed}[backgroundcolor=customgray, linecolor=white] \begin{align} \texttt{output} := \...
Sneha Gathani's user avatar
0 votes
0 answers
70 views

Hyperlink is not appearing in the desired place

The hyperlink should appear on the label, but it is appearing far away from the label text. How do I correct it? Any ideas or thoughts are much appreciated. Note: I couldn't change the structure of ...
IamK's user avatar
  • 33
4 votes
2 answers
188 views

How to print the number of elements in the first and second rows of an array respectively?

I've assigned an array and I want to design a command (Assume it's named \arraynum) with 2 values to print the number of elements in the first and second rows of an array respectively, for example \...
Axia's user avatar
  • 514
4 votes
4 answers
110 views

Nested SplitList Problem for quick expansion

I'm thinking whether I can write a new command for quick inserting any number of small groups of vectors in vector space. Here is what I want: $\basis{x; u; v}$ will automatically resolve to: $x_1, \...
Zhuoqun Chen's user avatar
2 votes
3 answers
173 views

Can't compare clist item with string

I can't compare comma list item with string. \clist_a is a temp var. \documentclass[12pt]{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \clist_new:N \clist_a \keys_define:nn { mymodule } ...
zongpingding's user avatar
0 votes
2 answers
142 views

LaTeX3: efficient way to remove spaces in front of a command

If I have a LaTeX3 string containing: def f(): return 42 def g(): return 43 I would like to turn it into: def f(): return 42 def g(): return 43 i.e., remove the ...
tobiasBora's user avatar
  • 8,814
10 votes
1 answer
374 views

Moving from pgfkeys to latex3 key-val system to handle package options

I have been advised in this question to move from pgfopts to latex3 to handle package options. I would like to do that but I must admit that I am a little lost. Examples with the patterns I'm using ...
Vincent's user avatar
  • 5,297
2 votes
1 answer
76 views

Nest Latex3 data arrays

I tried to emulate someting like a matrix with the Latex3 "objects". It seems like I can nest prop "objects" into a tl "object" -- at least it does not throw an error. ...
Nathanael Skrepek's user avatar
0 votes
1 answer
46 views

Latex alignment in the form-like for text in the header

###### Research in YYYY Title--------: On the bla bla. Speaker----: ………………………………………. Room------: Zoom How can we make something like this in latex? (I want to omit string "----" before : but ...
W. Wongcharoenbhorn's user avatar
3 votes
1 answer
96 views

Wheelchart contour seems not to work in the wheelchart package version 2.0

I use the wheelchart package https://ctan.org/pkg/wheelchart?lang=en. I'm trying to get the "contour" key to work. When I create the example without "contour" everything works, as ...
Nicolas Andre's user avatar
3 votes
0 answers
48 views

How to get (print) the number of elements in the row with the largest number of elements in the array?

For example, in the following MWE, there're 12 elements in the first line of the array while the second line of the array has 10 elements, so I'd like a command that can automatically printed the ...
Axia's user avatar
  • 514
0 votes
1 answer
71 views

How to select a command based on the expansion of \Cref*?

(This is a somewhat of a continuation of this question of mine, which @egreg provided an easy solution to.) In the following (slight variation of egreg's) MWE, three commands are defined. \mylabel ...
Atom's user avatar
  • 665
0 votes
1 answer
54 views

How to define a \verb-like command that can be used in table and headings?

I want to define a \verb-like command, \keyword, for example, to make the following code work as desired. Can anybody help me? \documentclass{article} \usepackage{float} \usepackage{newverbs} \...
Stackexchanger's user avatar
0 votes
0 answers
123 views

Dynamic LaTeX command substitution

The last solution in the following post is great and we can add other shortcuts. One thing I don't understand is that I can't add a shortcut with a _ : Exemple : \mathbb{R}_+ doesn't transform ...
Redji's user avatar
  • 1
3 votes
2 answers
172 views

expl3 — fully expand before \use:c

Consider \def\niii{10} \def\niiii{21} I can easily obtain it via \use:c {niii} % 10 \use:c {niiii} % 21 However I would like to create csname dynamically using \int_step_inline:nn {4} {i}. I tried ...
antshar's user avatar
  • 4,537
2 votes
2 answers
126 views

Illegal pream-token (\frac): `c' used

I was inserting an equation in my Latex code but it's appearing as a problem. I was trying to create a system of 2 equations but the problem keeps appearing and I don't know why \begin{equation} \...
Canelone's user avatar
2 votes
2 answers
108 views

Rescan to make & active: ERROR: Parameters must be numbered consecutively

If I do \documentclass[]{article} \usepackage{tikz-cd} \begin{document} \ExplSyntaxOn \NewDocumentCommand{\zxNoExt}{O{}+m}{% Warning, expl syntax removes space. \tl_rescan:nn { \...
tobiasBora's user avatar
  • 8,814
2 votes
1 answer
260 views

LaTeX3 - Data structure to be reused

I want to store several pieces of data, each of the following type, so that I can manipulate them both for formatting and for calculations. The number of lines analysed in the user's code is not fixed ...
projetmbc's user avatar
  • 13.4k
0 votes
0 answers
14 views

Customized section name superposing summary words [duplicate]

I have created a customized subsection name \renewcommand\thesubsection{Parte \Alph{subsection}.} But it is conflicting with the Table of Contents because "Parte" is too long, as below: ...
Caio Bianchi's user avatar
2 votes
1 answer
63 views

How to make Young tableau of different shapes aligned in an equation?

I am attempting to typeset an equation that includes a sequence of Young tableaux with varying shapes, using the ytableau package in LaTeX. My objective is to align these tableaux neatly while having ...
Enze Shi's user avatar
3 votes
1 answer
72 views

LaTeX3 - Splitting at semicolon when babel-french is used

The following code is broken by the use of \usepackage[french]{babel}. Can this be fixed easily? \documentclass[12pt]{article} \usepackage[french]{babel} % The character ; becomes active... \...
projetmbc's user avatar
  • 13.4k
1 vote
1 answer
74 views

\regex_match is not working as expected

I have the following macro and the following input: \def\something#1{ \regex_extract_all:nnN{ ([A-Za-z]{1}\d{1,2})\s*-\|\s*([A-Za-z]{1}\d{1,2}) }{#1}\l_my_seq \...
gxono's user avatar
  • 142

1
2 3 4 5
21