Skip to main content

Questions tagged [newdocumentcommand]

Use this tag for specific problems of using NewDocumentCommand

Filter by
Sorted by
Tagged with
3 votes
4 answers
191 views

In the following toy example, I would like to use __ and ^^ instead of - and .. Is it possible? \documentclass[varwidth, border = 3pt]{standalone} \NewDocumentCommand{\hyperseq}{ m e_ e^ e- e. }{% $...
projetmbc's user avatar
  • 15.3k
0 votes
2 answers
87 views

For my LaTeX documents, everything is just a linear collection of elements. Paragraph, followed by a table, followed by a paragraph, followed by a list, followed by a paragraph, followed by a figure, ...
bennynihon's user avatar
1 vote
0 answers
68 views

Adapting from https://tex.stackexchange.com/a/448977/383565, I constructed my own version of \blink. But, it doesn’t work in captions, unlike the base \href: \documentclass[a4paper, 11pt]{book} \...
Grass's user avatar
  • 974
3 votes
2 answers
163 views

It is possible to recreate document commands created with \newcommand if they are \relaxed between the \newcommands. Such already created (with \newcommand) commands can even be recreated by \...
Denis Bitouzé's user avatar
3 votes
3 answers
190 views

Consider the following MWE: \documentclass{article} \usepackage{fontspec} \setmainfont[Ligatures=TeX]{Arial} \usepackage{tabularx} \NewDocumentCommand{\printtotalpoints}{ } { \par\addvspace{\...
azetina's user avatar
  • 30.9k
5 votes
2 answers
170 views

Goal I am attempting to redefine an existing command (\mintedinline) which takes a verbatim argument. I need to format this argument such that it can be passed to an outside program for processing; ...
David Friant's user avatar
0 votes
1 answer
63 views

I can see that one of the errors is fixed by putting $$ around the \c{ll/rrparenthesis}, but when I do this the output stops working (my custom spacing disappears). I also really do not understand how ...
ToastedPotato's user avatar
4 votes
2 answers
207 views

This question arose while responding to another inquiry on SE Tex. Currently, there is no practical application for this, but I want to be prepared in case I encounter a similar situation when ...
Tom's user avatar
  • 9,408
3 votes
4 answers
336 views

Is there a way to define a command\foo taking a key list as its argument AND have the following feature: The default values of some of the keys (saying, b and c) rely on some other keys (saying, a). ...
Gau-Syu's user avatar
  • 515
2 votes
1 answer
106 views

I am trying to define a command using \NewDocumentCommand because I want there to be two optional parameters. This is what I tried (after begin{document}): \NewDocumentCommand{\game}{e{\adv} e{\Pi}}{\...
user1181399's user avatar
3 votes
2 answers
129 views

I'm trying to implement a function to show image. The first parameter is path to image, the second is caption text. The second parameter is optional, when not present it should be equal to file ...
Intolighter's user avatar
3 votes
2 answers
224 views

I am trying to remap the \task to a new command that can take multiple arguments (noting that \NewTasksEnvironment can be used to change \task to \item, but this is not what I am trying to fix here). ...
Harry's user avatar
  • 1,790
2 votes
2 answers
200 views

I want to create a new command \newsymbol, which functions like \newcommand, but with the difference that math is ensured. I also have another reason, why I want to define this new command, namely so ...
Make42's user avatar
  • 1,832
2 votes
2 answers
123 views

The hyperref package allows a list of authors to be assigned to the pdfauthor option. For example, this works for me \hypersetup{ pdfauthor={Me, Bobby McGee} } The two authors are recognised in the ...
Blair's user avatar
  • 407
4 votes
1 answer
224 views

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} \...
Nate's user avatar
  • 347
-3 votes
1 answer
88 views

Is it possible to pass keys to \lenes:nn ? \documentclass[a4paper,12pt]{article} \ExplSyntaxOn \cs_new_protected:Nn \lenes:nn { \str_case:nn {#1} { {mig} { \geometry { ...
Bulldrive's user avatar
  • 161
-1 votes
1 answer
73 views

I would like to include the specification of the font size (\huge \large \normalsize) in the key-value specification. \documentclass[a4paper,12pt]{article} \ExplSyntaxOn \tl_new:N \l_hlov_tipoa_tl ...
Bulldrive's user avatar
  • 161