Skip to main content

All Questions

Tagged with
5 votes
2 answers
259 views

Expand a `.cs` defined by key inside the function

I have a prop list in which I save items using the \addtoprop command and then loop through the prop list and print it with the \foreachinprop command. The \foreachinprop command has several keys, but ...
Pablo González L's user avatar
2 votes
2 answers
110 views

hyperref warning: Token not allowed in a PDF string - macro Refactoring as a fix

I have a macro that takes a comma-separated list of lists and applies some formatting to it. The list consists of the first and last names of the document's authors. I managed to create a macro - \...
Mycroft_47's user avatar
2 votes
1 answer
66 views

How to properly expand expl3 Macros within tblr environment (from tabularray package)

I've been working on a macro that takes a comma-separated list of lists and converts it into a table that spans the full width of the page, with specific text formatting applied to certain columns. ...
Mycroft_47's user avatar
1 vote
0 answers
44 views

Issues with Misplaced Alignment Tab Character and Table Width in tabularray Environment [duplicate]

I've adapted the code below from this answer to switch from the tabular environment to the tblr environment from the tabularray package. While the original code works perfectly with tabular, I'm ...
Mycroft_47's user avatar
1 vote
1 answer
135 views

Creating LaTeX Macros to Generate Tables from Predefined Variables

I've been struggling for the past two days to create macros for populating a thesis title page, as I'm planning to share it as a template with my colleagues. As you all know, thesis title pages have ...
Mycroft_47's user avatar
1 vote
2 answers
91 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,652
4 votes
5 answers
320 views

Convert control sequence with a variable number of undelimited parameters into a token list

In expl3, I can translate a token list \l_greet_tl into a control sequence \greet that takes two parameters as follows: \tl_new:N \l_greet_tl \tl_set:Nn \l_greet_tl { Hello,~#1!~How~is~#2~doing? ...
Witiko's user avatar
  • 1,006
2 votes
2 answers
86 views

The timing of defining new macro and reading its value from the aux file

I would like to define two commands: \RecordTagText{tag}{text} which stores to each unique tag some text, and \ShowTagText{list of tags} which prints the text corresponding to the given list of tags, ...
Jinwen's user avatar
  • 8,618
1 vote
3 answers
84 views

Create alphanumerical hash string based on an input string

This question is close to my question here but in this case I want to create an alphanumerical hash string (0-9, A-Z, only capital letters) of 4 digits (in best case adaptable) depending from an input ...
PascalS's user avatar
  • 750
6 votes
2 answers
359 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,327
1 vote
2 answers
71 views

How to do an if after an `exp:args` in expl3

Following this answer by @JasperHabicht, in my code, I would like to add an option to that macro so, depending on a flag I can execute either \drawMoveFromSgfCoords or \drawStoneFromSgfCoords. I still ...
psygo's user avatar
  • 438
3 votes
1 answer
131 views

Add aliases for command while defining command

I'd like to have a command \NewDocumentCommands which allows for multiple commands to be defined at once using the same definition. For example: \NewDocumentCommands { \powerset, \Powerset, \PowerSet }...
steve's user avatar
  • 2,256
0 votes
2 answers
114 views

A macro to check command expandability

I would like to create a command that checks whether an expression is fully expandable, and crashes if not (ideally printing an error message). I would like to do that without a specific TeX engine in ...
Vincent's user avatar
  • 5,327
1 vote
0 answers
91 views

Design a generic numeric comparator function using expl3 working for strings, counters, numexpr, dimexpr

I would like to design a generic compare function between numbers, ideally expandable with the following signature: \NewExpandableDocumentCommand{\compare}{r[] m m m m m}{%CODE HERE%} that would be ...
Vincent's user avatar
  • 5,327
4 votes
3 answers
148 views

Problem with a command that prefixes words only if needed when the arguments are provided through macros

Consider the following code coming from this answer, where it adds a prefix to a word, only if the prefix is missing. \documentclass[border=6pt,varwidth]{standalone} \ExplSyntaxOn \...
Vincent's user avatar
  • 5,327

15 30 50 per page
1
2 3 4 5
14