Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [parameters]

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

5
votes
2answers
97 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
35 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
126 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
113 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 ...
4
votes
0answers
49 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
61 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
57 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
71 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
21 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
68 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
40 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
233 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
41 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
113 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
183 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
0answers
20 views

customizing eqnarray environment [duplicate]

I find that the vertical spacing between lines in an eqnarray environment is too little. Sure enough, I could adjust things manually by inserting \vspace*{...}, but I was wondering if the parameters ...
0
votes
1answer
68 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
131 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
43 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
73 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
401 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
43 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
240 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
48 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
113 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
95 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
62 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 ...
0
votes
0answers
48 views

Running LaTex with optional arguments from Windows batch file

I am currently writing a LaTex program which uses perl to read from a large amount of Excel files. This program is started via Windows batch: perltex foo.tex START foo.pdf I occasionally turn off ...
8
votes
2answers
167 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
207 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
334 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 ...
3
votes
0answers
125 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
407 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
178 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
231 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
79 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
580 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
160 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 ...
5
votes
2answers
259 views

Parametric Pics : Variations of Infinity

Let's argue that I want to draw variations of the infinity symbol (Mostly because I can't draw ducks although it makes for a good MWE). I can't find a simple example that uses pgf/tikz keys to ...
4
votes
2answers
359 views

Why does \detokenize # sometimes fail inside of environments?

When I use the pound sign/number sign/hash sign # inside of commands and environments, this refers to arguments. However, shouldn't \detokenize{#} make it NOT an argument? Situation The pound sign ...
0
votes
1answer
37 views

LaTeX: Can I use a setting file to change some common parameters shared among different template files?

I have several template files used for journal articles, such as for review, article, case report, etc. These templates have similar file structures. I realized that some common parameters need be ...
0
votes
0answers
132 views

Command calls with multiple parameters

I'd like to improve the latex code from a previous answer by using it all along a resumé which I've reproduced below. The MyFrame command have to be called around 20 times but using different items ...
0
votes
1answer
123 views

How to add -sPAPERSIZE=a4 to makefile?

i have this makefile: FILE=name all: latex $(FILE).tex dvips $(FILE).dvi ps2pdf $(FILE).ps and i want to add parameter -sPAPERSIZE=a4 for latex, dvips and ps2pdf, how should i do it? ...
4
votes
1answer
364 views

Can I specify a parameter that I pass with input?

I made my own preamble and saved it into a separate file. I include it with \input{Preamble} Now in the preamble there is \title{MyTitle} Now I want to pass MyTitle from my main document. How do ...
2
votes
1answer
119 views

Truncate parameter before newline

I want to truncate (cut/shorten) a string that contains newline (\\ or \newline) in such a way that only the first line remains. My problem is, that I use the todonotes package and have command ...
4
votes
1answer
434 views

Passing arguments to class in a key=boolean value manner

Assume I have a bunch of flags which I want to pass to my class, how do I do this? If you see the example below, I am looking for passing flags in the form: key=<boolean value from flag> to ...
1
vote
1answer
196 views

Specify via a flag during compilation with `pdflatex` that some commands are considered/ignored?

How can I create a flag, which allows to specify during compilation with pdflatex that some commands are considered/ignored? Background: I want to create marginal notes with \marginpar{...} but they ...
4
votes
1answer
246 views

Adding a parameter to a new tikz command

I want to add a parameter to a tikz command. I now have 5 ray's on a mirror, but I want to make it possible to add an angle and a point on the mirror where to ray reflects on the mirror. So is it ...
7
votes
2answers
3k views

Define a new command with parameters inside newcommand

I have read the question and answers about: Defining a newcommand, with variable name, inside another newcommand How to define a macro to create a new macro with a name passed as its argument? What ...
10
votes
4answers
2k views

What's the best practice way to test whether parameter is empty?

I have a macro that might work either in LaTeX or in plain TeX and I'd like to test whether one of its parameters, which presumably should be just text, is empty. Currently I do it this way: \bgroup \...