Questions tagged [parameters]
{parameters} is about the meaning, and the manipulation of fundamental parameters that guide the typesetting of LaTeX.
195
questions
0
votes
2
answers
138
views
design a \Command that allows a Dual-parameter \Command passing its return into another \Command as one (which might be a label) of its inputs
Design: a (La)TeX command (maybe look like this \passresult{\outercommand}{\innercommand}{param1}{param2}),
which pass the return of a dual-parameter \innercommand{param1}{param2} into another \...
0
votes
2
answers
53
views
\tcolorboxenvironment with parameters
Context
Hi. I am using \tcolorboxenvironment to customize a theorem enviroment created with thmtools (as explained in pages 22 or 400 of the documentation).
This is what I have so far in my preamble:
\...
4
votes
2
answers
159
views
Confused about optional argument with \NewDocumentCommand result
Given this MWE:
\documentclass[12pt]{report}
\usepackage{fontspec}
\setlength{\parindent}{0pt}
\NewDocumentCommand{\testone}{m m m }{%
\if\relax\detokenize{#2}\relax
\textbf{#1}\dotfill#3\...
2
votes
1
answer
29
views
What exactly does the <name> parameter of \pdfbookmark in hyperref do?
The official hyperref documentation (section 6.1.1) states that in
\pdfbookmark[<level>]{<text>}{<name>}
the parameter
<name> provides the internal anchor name and ...
1
vote
1
answer
63
views
Detect if a parameter passed to command is a mathematical formula
I'm defining a command which displays braced paragraphs and an isomorphism between them, but I want the command to recognize if one of the paragraphs is something purely mathematical and therefore not ...
4
votes
2
answers
101
views
Force error when lack of parameters [duplicate]
For example, I defined a macro \test with one parameter. Latex takes the first character following \test as its parameter by default. I want latex to throw an error if \test is called without any ...
0
votes
2
answers
131
views
Check if parameter in command is declared/empty in LuaLaTeX
I'm trying to check if a parameter is declared/empty using lua. So far I wrote the following MWE:
\documentclass{standalone}
\def\var#1{\def\@var{#1}}
%\var{Hello world}
\begin{document}
\@var --...
1
vote
2
answers
50
views
How to control expansion order to define variables from a prefix and a command?
The following is a command that does basic arithmetic with nine variables.
\documentclass{article}
\usepackage{xfp}
\newcommand\functesta[9]{
\edef\myvara{#1}
\edef\myvarb{#2}
\edef\...
4
votes
2
answers
293
views
How to get lipsum to accept a count as a parameter
I get the error: Missing number, treated as zero. trying to pass a counter to \lipsum. I feel like I might be forgetting some basic technique here, but I've unsuccessfully scoured the site to find out ...
3
votes
1
answer
58
views
Parameter text getter
To this snippet
\def\arg#1#2{\#1 = #1 and \#2 = #2\par}
\arg A B C
\end
I supposed the output like this one
#1 = A and #2 =
B C
But I get (using PDFTeX)
#1 = A and #2 = B
C
.
Why such behavior? I ...
0
votes
1
answer
373
views
Pandoc CMD call tex template and pass variables
I'm trying to pass variables to a tex template to generate a PDF with those values via pandoc.
This is my template:
\documentclass[15pt]{article}
\usepackage{sectsty}
% Margins
\topmargin=-0.45in
\...
3
votes
1
answer
113
views
Minted: Using command for used language with inputminted
I have multiple different commands setup using \inputminted with different options but all are using the same language. Previously, i could feed all commands with a TeX primitive like so:
\def \...
3
votes
2
answers
237
views
What is the difference between {} and [] parameters? [duplicate]
Most commands use {} to receive parameters. For example $\binom{6}{2}$ typesets the binomial coefficient 6 choose 2. However \sqrt receives a [] parameter as its first parameter. For example $\sqrt[3]{...
0
votes
1
answer
73
views
How do I parametrize this chapterimage command by an opacity argument?
I have the following chapterimage command, based on this book template (ILM Report by Jenny Lantair) which I use simply by this oneliner: \chapterimage{./res/headers/nature.jpg}.
\newcommand{\...
0
votes
0
answers
27
views
NewDocumentCommand inside NewDocumentEnvironment, and an illegal parameter issue [duplicate]
I am trying to write a macro like this:
\usePackage{xparse}
\NewDocumentEnvironment{myenv}{}
{
\NewDocumentCommand{\myarrow}{g}{\IfNoValueTF{#1}{\to}{\xrightarrow{#1}}}
\begin{enumerate}
}
...