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.
1,021
questions
3
votes
1
answer
247
views
How does \if:w work?
I cannot work out how \if:w works and LaTeX3's manual does not show any example on how to use it:
I want to check whether the document is currently in oneside or twoside mode:
\if@twoside
Twoside ...
4
votes
1
answer
90
views
How can I stop l3build deleting files generated by a custom target?
(Silly) MNWE:
build.lua:
ctanpkg = "mini"
module = "mini"
installfiles = {"*.sty", "*.cls", "*.sup"}
tdslocations = {
"tex/latex/mini/*....
1
vote
1
answer
100
views
LaTeX3: detecting default command inputs once stored in sequences
I don't understand how to identify elements in a sequence that have a default value assigned by a document command.
For example,
\documentclass{article}
\ExplSyntaxOn
\seq_new:N \l_blair_person_seq
\...
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 ...
2
votes
1
answer
97
views
Comparing strings using LaTeX3
Yesterday I asked a question about the "currfile" package I wanted to use for writing a document about several pupils in my school and @cabuha provided a very nice answer for this problem: ...
3
votes
1
answer
84
views
Customize minipage to support spaces below it
I'm trying to create a custom minipage environment that allows spaces above and below it. I manage to control the spaces above using the @minipage shitch, but I can't find the modification to achieve ...
1
vote
3
answers
123
views
Evaluate fractions in Binomial coefficient command
I'm trying to create a new command to automatically compute fractions and differences while displaying a Binomial coefficient
\usepackage{mathtools}
\DeclarePairedDelimiter\braces{(}{)}
\...
4
votes
1
answer
126
views
Using command defined with \NewDocumentCommand in TikZ
I’m trying to use a command defined using \NewDocumentCommand in a tikzpicture environment and cannot resolve an error. Here’s a minimal example of what I’m trying to do:
\documentclass{article}
\...
1
vote
1
answer
28
views
Wrap LaTeX conditional into LaTeX3 conditional when condition name is not fixed
I have the following issue. There is a package defining some low-level LaTeX conditionals to represent some switches. For instance, \if_pkg@switchOne, \if_pkg@switchTwo, etc.
Now, using this package ...
1
vote
1
answer
49
views
Sequence empty only when checked from a certain command
I am trying to format song sheets in LaTeX. Within the lyrics (displayed on the left) are chords (defined with \note), which get highlighted and displayed on the right of the page. Choruses are ...
2
votes
1
answer
125
views
How to draw multicolor curve with smooth gradient in l3draw?
description
I've see two questions about draw multicolor curve with smooth gradient in this site:
How to draw an arrow with two colors?
tikz: draw multicolor curve with smooth gradient
Since i am ...
3
votes
2
answers
64
views
Spaces removed in class option via l3keys
I define a class kv-option via l3keys, as example I use title. If I want to set the title via \documentclass[title = {My first title}]{Testing} it works but whitespaces are removed (Result: "...
0
votes
1
answer
44
views
passing a group of package(class) options in 1 key using l3keys2e in latex class
problem
I want to writing a docuementclass, called it foo.cls in the following context. Assume there is a document class called bar.cls, which can accept the following key-value(options):
\...
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: \...
7
votes
2
answers
200
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 ...