The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [parameters]

{parameters} is about the meaning, and the manipulation of fundamental parameters that guide the typesetting of LaTeX.

Filter by
Sorted by
Tagged with
0
votes
3answers
67 views

\input{\<variable>} yields “Undefined Control Sequence”

I am creating a class that I want to use for creating my own worksheets. As such, I want each course that I teach to have its own information file, stored in the file , which, in the assignment, I can ...
2
votes
1answer
31 views

“! Illegal parameter number in definition of \reserved@a” working with fncychap

I'm trying to compile a document, but when I launch pdflatex mydocument I get these output: ! Illegal parameter number in definition of \reserved@a <to be read again> l.14 \tableofcontents ...
2
votes
4answers
66 views

Math To Specify a Parameter

Is there a way to perform a math calculation to specify a parameter? So, inside my command's definition, instead of writing #3 to specify the third parameter, is there a way to let a calculation like, ...
0
votes
0answers
15 views

newcommand with 4 parameters in Input and Ouput

From old topic with 2 variables: if then, expandafter condition with 2 parameters - show and hide boxes now i want for new rule (digital logic) with 4 variables, please see image This minimal code ...
2
votes
1answer
67 views

How to get rid of leading zeros in a number?

I'm trying to check user input (a number parameter) for leading zeros and remove them. I wonder if such command is provided by LaTeX2e, or by one of the engines (pdftex, xetex).
4
votes
3answers
73 views

Overriding control sequences for accessing TeX's integer-/dimension-/glue-/..-parameters

In TeX there are a lot of parameters which you can adjust for changing the behavior of TeX. Example 1: By assigning \baselineskip=... you change distance between lines. Why TeX's breaking-paragraphs-...
4
votes
1answer
42 views

Why do \large and \textbf require different usage of braces?

\large and other font size commands need to be placed inside a group: In this text {\large some part} is large. Whereas \textbf and other styling commands receive a parameter: In this text \textbf{...
0
votes
1answer
29 views

Make space between table and section even to text and section

Good evening, I know that I can reduce the space that is inserted with a new table with \vspace*{-10pt}. But how to make it exactly even to the normal space between a \section or \subsection and the ...
1
vote
1answer
133 views

CV with timeline

Here you can find a latex template for Cvs. https://www.overleaf.com/articles/satish-kumars-cv/dngwrghdxxqh. I am facing an issue with the timeline environment. The code follows: \newcounter{...
0
votes
1answer
48 views

Newcommand that uncludes a foreach with unknown number of parameters

Sorry, but part of the code is in French. However, it won't matter because it's only the listed text I currently have a new command named \listerfe that, combined with \listerfenextarg and \...
0
votes
2answers
50 views

How can I grow the height of a function letter to match the height of the parameters?

I'm only an occasional LaTeX user, and ever more rare math mode user, so maybe this is simple for others, but not for me: I have a function named L*, and it has a fraction as parameter. In my first ...
3
votes
3answers
396 views

How to define a macro with multiple optional parameters?

After I had a macro that worked, I tried to improve it by making some parameters optional. Unfortunately the macro no longer works. Instead I'm getting errors I do not understand, for example: LaTeX ...
3
votes
2answers
151 views

How to implement \expandbefore, similarly to \expandafter?

I am trying to define a new command, but specifying the new control string "on the fly" using csname and endcsname. (This is for the purpose of implementing a dependency injection pattern.) **...
2
votes
3answers
119 views

Different behavior if no arguments

This is similar, but not a duplicate of Special behavior if optional argument is not passed and Different macro behavior when supplied an argument. I want to define a macro \XXX such that \XXX{1} and ...
5
votes
2answers
125 views

Including default parameter into \def

I'm using the classic thesis style with the \graffito command (example here). How can I modify the command below to add some vertical spacing before the text which is set to a standard value by ...
2
votes
1answer
46 views

String parameter passed to a class vanish the spaces between words

I created a class in which I'd like to pass some parameters in \documentclass[parameters]{}. The parameters I need to pass are pdftitle and pdfsubject to the hyperref package. I succeeded in doing so, ...
4
votes
2answers
190 views

Define macro as wrapper for parameters of a command

I'm trying to define a macro that is a little wrapper to a common parameter of a command. The macro is expanded, but the parameter is not taken into account by the command. The macro, \sp is used ...
6
votes
1answer
173 views

xparse g argument should be avoided?

In new versions of xparse the manual states the following: (in 2. Backwards Compatibility) One role of xparse is to describe existing LaTeX interfaces, including some that are rather unusual in ...
3
votes
0answers
53 views

\command[]{} or \command{}[]?

Sometimes I see [] before {}, such as: \documentclass[letter,12pt]{article} Sometimes I see {} before [], such as: \newcommand{name}[num]{definition} Which should go first, [] or {} ? Does it ...
1
vote
1answer
88 views

use jobname to “pass parameters”? [duplicate]

Yet another question about passing parameters when compiling. I thought I had a good (for me) solution, by compiling with different jobnames and do conditional compilation on the basis of the jobname, ...
3
votes
1answer
110 views

pass parameter #1 to minted's \mintinline, when #1 begins with `#`

I noticed the following unexpected (by me!) behaviour, illustrated by this MWE and its output in the figure below: % arara: xelatex: { shell : yes } \documentclass[11pt]{article} \usepackage{...
1
vote
0answers
135 views

How to set global options / parameters in Circuitikz?

I use Circuitikz quite often with modified sizing as styles as follows: \begin{circuitikz}[line width=0.7pt, line join=round] \draw (0,0) ... to [/tikz/circuitikz/bipoles/length=22pt, L] (1,0) \end{...
0
votes
0answers
25 views

Why isn't this new comment environment working ? “Illegal parameter number”, “can't use macro parameter # in horizontal mode” [duplicate]

I wanted to create a new comment environment with special format of comments to a text. Here is the MWE: \documentclass[french, 11pt, a4paper, titlepage]{report} \usepackage[T1]{fontenc} \usepackage[...
0
votes
0answers
195 views

new environment with multiple parameters

I’m trying to define a new environment which display an image and text below it. I’ve tried the following code: \newenvironment{essai}[1][] { \includegraphics[scale=0.25]{#1} } { } \begin{essai}{...
1
vote
1answer
55 views

\IfStrEqCase redefines #1

What is the meaning of #1, #2, etc in the optional parameter of \IfStrEqCase? This required me to use a ##1 instead of #1 within \pgfplotsinvokeforeach which I was not expecting. I would have ...
2
votes
1answer
310 views

Automatic parameter definitions under equations

For my bachelor thesis, I am using a lot of equations in my document. I would like to use a list of symbols, including units and also add a parameter description under equations. I want to be ...
2
votes
2answers
47 views

lstinputlisting environment in equation- and math environment?

I am trying to semi-automatically import multiple parameters/variables from an excel (via .txt) file into both equation environments and $$ = math environments in (share)latex. It is semi-...
1
vote
1answer
312 views

\input inside \newcommand and macro parameters

I would like to divide a list of parameters for a series of tikz graphics into a bunch of separate, named tex files. Specifically: each parameter file should be loaded by an \input command which in ...
1
vote
1answer
348 views

Addition & Multiplication of parameter and constant with unit

I want to substract and multiply with an optional parameter and a constant with cm as unit. Like this: \documentclass{article} \usepackage{changepage, xintexpr} \newcommand{\test}[2][1]{ \begin{...
0
votes
1answer
77 views

10 parameters separated by comma. How can I do it? [duplicate]

\def\g(#1,#2,#3,#4,#5,#6,#7,#8,#9,#10){(#6)*exp(-(#2)/(#7))+((#6)**2)*exp(2*(-(#2))/(#7))*(#9)*exp((#4)/(#7)}% \def\f(#1,#2,#3,#4,#5,#6,#7,#8,#9,#10){1+2*(#6)*exp(-(#2)/(#7))+((#6)**2)*exp(2*(-(#2))/(...
2
votes
2answers
216 views

Passing list from file to \foreach

I'm trying to read lists of variable length from a configuration file to do something with if. The lists are stored in the file as follows list_1:x1, x2, x3 list_2:y1, y2 If I read the files with ...
1
vote
0answers
55 views

Need to add range of author list on the table each row [closed]

I'm defining \author ten paramethers for a revision history table of document. I am trying to add \def\authos[1] \def\author[2] and till 10 . Then I call this parameters in each row of my table \...
0
votes
1answer
193 views

\rule's alignment

I would like to use \rule (or something that looks similar) to do separations in a CV but I don't quite understand how it works. So far I came up with the following. \begin{document} \begin{...
0
votes
3answers
694 views

How to pass two arguments to a newcommand or macro?

I would first like to thank everyone who contributes on Stack Exchange as they have been an enormous help for everything LaTeX. I have searched all over SE for a solution to this current problem and ...
0
votes
1answer
71 views

How to create optional parameter that, if not used, would be ignored with anything referencing it instead of its default value being processed?

I need to prevent below=0mm of #1 from being processed by containing style altogether (when no argument is specified to that style from the outside) instead of #1 reverting to a default value assigned ...
1
vote
1answer
356 views

Tikz Data plot with variable parameters

I want to have different plots styles. For example, I want a square plot and a plot with a larger width. So actually I want to define global parameters widthSquare = 8cm; widthLarger = 10cm; ...
2
votes
2answers
80 views

substring with calculated end position

I have a string and I would like to use only the first part of the string up to a specific position. So I wrote the \stringpart command using strinstrings' functions. The position of the searched ...
3
votes
2answers
129 views

Testing parameter as “empty” when it has nested braces

I am trying to test if a parameter is "empty" in practice rather than just "technically". Consider the following MWE for my meaning: \documentclass{article} \usepackage{xifthen} \begin{document} \...
0
votes
1answer
114 views

Redefine macro in macro with parameter

I've been trying this for hours now. Probably is something simple I missed... I have a macro \newcommand{\cf}[1]{\footnote{Cf. #1}} (usage usually \cf{\cite{xx}}). Now I want to extend it, that it ...
0
votes
0answers
79 views

Tikz nodes inherit minimum width, what else? [duplicate]

OK, it may seem stupid, but I often have tikz nodes inside a tikz environment inside a tikz node. When the outer node has parameter minimum width set to non zero, it appears the inner node inherits ...
8
votes
2answers
170 views

Newcommand to Work for Each Digit in a Parameter

I was hoping someone might know how to modify the following to give the output in the second image without having to repeat the \myarc{~} for each digit. I'm using LuaLaTeX. \documentclass{article} \...
1
vote
1answer
266 views

Passing returned command value to another function

I'm trying to pass a value of a command to another function without luck. For example I've some data in \DTLloaddb[noheader, keys={key,value}]{definitions}{\data.def} to which I access with \DTLfetch{...
1
vote
0answers
433 views

Parameters must be numbered error with \tableofcontents [closed]

Currently I am writing a software documentation and was almost done. I was only adjusting some font settings for the sections and subsections when suddenly the compiling stopped working. I was ...
2
votes
0answers
160 views

Is it possible to generate two PDF files from a single run?

The letter class makes it possible to generate two letters from a single run. \documentclass[11pt]{letter} \usepackage{lipsum} \begin{document} \name{John Doe} \signature{John Doe} \begin{letter}{...
4
votes
3answers
489 views

How to split parameter and assign result into separate variables or an array?

I need a pretty simple thing - when I get a macro parameter which is a string delimited with commas, can I split it and assign resulting strings into an array? In short, I'd like to write something ...
0
votes
2answers
201 views

\label: escape or remove LaTeX commands

The CI of my company requires a section separation Page with a custom layout. Part of this is a color box containig the section number on the upper right corner while the section title is aligned left ...
1
vote
1answer
300 views

Convert Latex Code Parameter to a Text Representation for PackageWarning?

Consider the following MWE. This is causing all kind of errors depending of the content of #1. How can I convert #1 to a string representation (e.g. strip off or ignore textbf), so I can feed this ...
2
votes
1answer
86 views

Clean, efficient way to modify external table without modifying internal tables

Oftentimes the best way I can figure out how to lay out something is with the mindset I learned from HTML, tables within tables. How can I modify parameters affecting the external table without ...
5
votes
2answers
846 views

How can I change the style of one node from outside the tikzpicture environment

I would like to highlight a different node of the tikz flowchart every time I call the figure in the relevant chapter. I was thinking of defining a new style "highlight" and then pass a parameter ...
2
votes
1answer
163 views

Parametric Pics : Sans infinity

Previously I have asked about passing options to pics to manipulate the way in which they are drawn. With this one may create pics with optional components and user controlled dimensions. I haven't ...