Quantcast
Channel: Active questions tagged xparse - TeX - LaTeX Stack Exchange
Browsing latest articles
Browse All 38 View Live

Image may be NSFW.
Clik here to view.

Number rows of table in decimal and hexadecimal with multiple counters

TL;DR My code to automatically number a table with two running counters in decimal and zero-padded hexadecimal (using the fmtcount and array packages) is not working.I'm trying to automatically number...

View Article



Image may be NSFW.
Clik here to view.

You cannot use \raise in vertical mode error

\documentclass{article}\usepackage{mwe}\usepackage{pdfpages}\usepackage{tikz}\NewDocumentEnvironment{Insert}{m}{%\AddToHookNext{shipout/foreground}\bgroup \put(0,-\pdfpageheight) \bgroup...

View Article

xparse losing default values of optional parameters after environment [closed]

Some code that used to work has stopped working on a newly updated system (revision 61040 of l3packages, from what I can tell; I don't have a version number for which it did work), and I'm trying to...

View Article

luacode works with \newcommand but not with \NewDocumentCommand

Imagine the following code:\documentclass{book}\usepackage{luacode}\usepackage{xparse}\NewDocumentCommand{\HelloWorld}{}{Hello World}\newcommand{\DefaultHelloWorld}{Hello World}\begin{luacode}...

View Article

Image may be NSFW.
Clik here to view.

I can't create command with \DeclareDocumentCommand{}{omv}{}

I have to make list environment based on description that should be used to describe code functions.Here is the prototype:% !TeX program =...

View Article


Use parameters as delimiters in \NewDocumentCommand

Using \NewDocumentCommand, it's possible to specify a delimited argument (e.g. r() for a required argument in parentheses). Is it possible to use other arguments in the same command as those...

View Article

My paper/page size stopped working once I added speech bubbles to my document

So I'm working on a project which is supposed to be in A5. I have a template for this kind of document and it has always worked just fine. This is the code I usually...

View Article

Parse every character and transform it into a table column

I am trying to produce an array that will output most ascii characters in a given LaTex font. Currently, I have the following awful code that...

View Article


Setting beamer label from xparse option

I want to write a custom environment that handles some layouts that default beamer slides aren't designed to do.I use xparse's \NewDocumentEnvironment to achieve this, but have problems passing down...

View Article


Command color not working with the name of a color built through macros

Consider the following code and especially the command \nicecolorname which builds the name of a color following the pattern ["nice"][shade][hue]. In its current name, the command \color is unable to...

View Article

Renew qtyrange with default precision value

i would like to have a default round-precision value for \qtyrange that is different from the rest of the package, im having some problem changing...

View Article

Configuring a section alias in LaTeX

Every week I produce a couple of A5 booklets (A4 folded) for my wife, an active colleague in church ministry, from which I am recently retired. I call the booklets a pulpit manuscript, as it includes...

View Article

Image may be NSFW.
Clik here to view.

Having label and caption optional for custom tabularray environment

This is a followup question to a similar problem:I like to create a table environment and to have the option creating a label/caption.This is my...

View Article


Name of glossary entries containing command defined with \NewDocumentCommand

I defined the following latex command:\NewDocumentCommand{\invokeWithCSV}{m>{\SplitList{,}}m}{#1#2}It takes as input the name of a command and a list of comma separated arguments and invokes the...

View Article

Command that expands to `{ }` instead of ``

I'd like to define a command which expands to { <output> } instead of <output>. I've tried wrapping the command contents with additional{ / }\bgroup / \egroup\begingroup /...

View Article


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 }...

View Article

Image may be NSFW.
Clik here to view.

Macro factory, passing on star arguments

I want to define a set of macros, with similar behaviour but applied to different symbols. To avoid repetitions, I thought it would be a good idea to generate them programmatically from a template.I...

View Article


Image may be NSFW.
Clik here to view.

v-type argument in \NewDocumentCommand ignores spaces

Consider the following code:\documentclass{article}\usepackage{listings}\NewDocumentCommand{\hey}{v}{\lstinline|#1|\ignorespaces}\begin{document}\hey|a |b\lstinline|a |b\end{document}Why is this...

View Article

Define list for multiple use

I want to repurpose a predefined comma separated list multiple times in the document. As a minimal example, have a look at the following code which does not work as...

View Article

Create a NewDocumentEnvironment programmatically

I'd like to programmatically create a new \NewDocumentEnvironment environment to create new environments using a simple command (a bit like how one can use\newtheorem to create a new kind of...

View Article

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, \sim...

View Article


Image may be NSFW.
Clik here to view.

xparse optional arguments lead to error in tikz

I am trying to create a few simple macros for B-Trees and one of these macros is supposed to create a multipart node tikz based on the number of arguments it gets. Therefore I used the g argument...

View Article


\NewDocumentCommand with delimited arguments

How can the following command be implemented with \NewDocumentCommand?:\def\bracket<#1|#2>{ \left\langle #1 \right|\left. #2 \right\rangle}MWE\documentclass[]{article}\def\bracket<#1|#2>{...

View Article

\def vs xparse \NewDocumentCommand with delimited arguments

Based on my previous question I noticed (IMHO) that it is not so easy to make macros with delimited arguments with xparse instead plain-TeX's \def. As far as I know the LaTeX way - \newcommand -has no...

View Article

Image may be NSFW.
Clik here to view.

Macro with verbatim argument

Is it possible to define a macro \foo such that it can accept verbatim code like: \foo{cos(16 % 2)} without interpreting them as latex code first? I know I can use an environment for that, but I wanted...

View Article


tcolorbox and ifmtarg: bad argument specification when checking for empty...

ProblemI am trying to put a bunch of optional arguments in a new tcolorbox definition, and trying to use the ifmtarg so I can skip some optional arguments like in the following syntax:Example 1: A...

View Article

Image may be NSFW.
Clik here to view.

xparse error: "kernel/missing-colon" when defining a new command using cs_new:Nn

I'll simply show what happens:The documentclass definition is elsewhere on the file. I'm using TeXnicCenter, so interactive mode is not an option.

View Article

Find Text Between tabs

I copied a sheet from google sheet into a *.txt and want to format it to a pdf.I could separate it with\loop\unless\ifeof\mytextfile\read\mytextfile to\mytextline So I have in every loop one of the...

View Article

Image may be NSFW.
Clik here to view.

How to use NewExpandableDocumentCommand with a foreach inside a TikZ-matrix

Follow-up question to https://tex.stackexchange.com/a/714853/46023I have the command\NewExpandableDocumentCommand{\test}{O{} m}{%\foreach[count=\no from 0] \No in {1,...,#2}{%%\node[draw,...

View Article



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 about...

View Article
Browsing latest articles
Browse All 38 View Live




Latest Images