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

learn more… | top users | synonyms

2
votes
1answer
44 views

error with @ifnextchar and paralist after texlive 2014 update

I've been using a save/restore TeXnique with let/def to redefine the \@enumerate@ command from the paralist package so that the enumerate environment can accept a second optional parameter (a name of ...
3
votes
1answer
35 views

How to pass parametres to an external file included by `\input{<filename>}`

I have a class file to set up agreements. I want to define a command that choose boilerplate text to include using a parameter pass a parameter to the included file to run a test and choose correct ...
0
votes
1answer
50 views

Variable number of arguments for \newcommand

I use the following command to write my matrix variables \newcommand{\mymat}[3]{\ensuremath{\mathbf{#1}^{#2}_{#3}}} Thus #1 is the matrix variable, #2 is the superscript and #3 is the subscript. ...
1
vote
0answers
69 views

placing text using \widthof with tikz

I am new to using Tikz and I do have a question about writing a macro with allows me to use a parameter to scale a simple drawing and put text according to the size of the drawing. Here is what I ...
0
votes
0answers
23 views

Nested definitions [duplicate]

I have the impression that if one defines a macro inside the definition of another one, then #1 and so on indicate the outer macro's arguments, while ##1 indicates those of the inner one. Is that ...
2
votes
1answer
66 views

(Re-)Setting the currents section name from within the section

I am trying to reset the currents section from somewhere "whithin" the section, but after the \section command. Is that even possible with the way LaTeX works? I know, it is possible to use the title ...
8
votes
2answers
196 views

tikz, conditional setting of shape parameters

In my illustration I use simplified sketches of stopwatches (timers), which appear in three different "modes": (1) start of interval (coloured green), (2) time in progress (yellow), and time is ...
1
vote
0answers
134 views

Incomplete parametric curve, ''written letter e'' [closed]

I have tried plotting some parametric curves like (x^3-3*x,3*x^2-9), and it works fine. The following, however, does not work: (x-x/(1+x^2),1/(1+x^2). I have tried several ways of plotting it but the ...
0
votes
2answers
72 views

newcommand with variable number of arguments

I have seen several related questions, but none seems to address specifically this. I would like to define a command that accepts a variable number of arguments. Something like ...
5
votes
2answers
78 views

How to use/define a customized parameter?

I´m generating any grpahs... and I´m playing with any linewidhts values so I would like to type on the beginning of the .TEX a line similar to width1=0.1cm width2=0.15cm width2=0.20cm to avoid ...
4
votes
1answer
50 views

Parametrized inclusion of sub-files

I'm preparing a Resume using LaTeX, mainly for the purpose of easy customization. In particular, I wish to be able to generate different outputs from the same input file by changing a few parameters. ...
3
votes
3answers
146 views

Append to an argument

I have a command that receives some argument, like: \newcommand{\myappend}[1]{ \ifthenelse{\equal{#1}{aaaBB}}{\dothis}{\dothat} } Assume that the argument is 'aaa'. How to append (inside the ...
1
vote
0answers
39 views

mathematics expression for parameter [duplicate]

I would like to use a number that is a fraction of one constant and one argument of function. I tried: \newcommand{\myfunction}[1]{ \newcommand{\tailleimg}{0.95/#1} } But I get an error ! Illegal ...
11
votes
2answers
164 views

Passing parameters to \g@addto@macro

I'm a complete newbie but have a little background in programming. I've been looking at a MWE located here provided by Yiannis Lazarides. In the macro definition, we have %% add an image to the DB, ...
4
votes
1answer
122 views

Distinction between number and dimension in tikz key-value interface

When declaring shapes, I usually define the desired shape width with: minimum width = <number> <measure units> However, sometimes, I calculate calculate the shape's width separately. In ...
6
votes
0answers
144 views

how to add parameters to shape which internally use 'append after command'

years ago Mark Wibrow provided me the following code to adding text in inside border of a (rectangle) shape on this comp.text.tex thread: \documentclass[tikz,border=5mm]{standalone} %%% code from ...
2
votes
1answer
185 views

How to define optional arguments for custom pgfplots style

I see from other question that it is possible to create styles with parameters. Like \pgfplotsset{ custom style/.style 2 args{ % code that uses #1 and #2 } } However, I can't find a way of ...
6
votes
1answer
117 views

Using arara to compile powerdot twice

I want to compile my powerdot presentation twice -- once with, once without notes. I am trying to achieve this using arara with something like: % arara: latex { set \powerdotmode=slides here } % ...
3
votes
1answer
161 views

R language parameters for `listings` package

I tried all answers posted here or on other pages, but nothing worked. I need to set the parameters for listings package to simulate R code, so: \usepackage{listings} \lstset { language=R, % ...
3
votes
1answer
102 views

Quotation around text without using brackets

I am using the csquotes package and its \enquote{TEXT IS HERE} very often. Instead of \documentclass[12pt]{article} \usepackage[top = 1in, bottom = 1in, left = 1in, right = 1in]{geometry} ...
4
votes
1answer
102 views

Generating lists and tables of items from commands in the document

I would like to define objects all over my document and later evaluate certain components from these objects. Example: \documentclass{minimal} \newcommand{\requirement}[3]{#1, #2, #3} ...
1
vote
0answers
35 views

How to handle more than 9 parameters in Kiviat Diagrams? [duplicate]

This email is regarding Solution 2 mentioned in this post to draw Kiviat Diagrams. This Solution is working perfectly upto 9 axis. But when we make number of axis as 10, it's giving error as : "You ...
5
votes
1answer
293 views

Package PGF Math Error: Sorry, an internal routine of the floating point unit

This type of error (! Package PGF Math Error: Sorry, an internal routine of the floating point unit got an ill-formatted floating point number ...) arises when trying to use a predefined list for the ...
8
votes
1answer
1k views

Parameter Stack Size Error with graphicx

I'm trying to include a graphic in a document, and no matter how I try to manipulate the graphicx package, I have never been able to make an image appear. I have tried making the image PNG, PDF, and ...
1
vote
0answers
161 views

Knitr/LaTeX: conditional execution based on external parameters

I'm using knitr to create LaTeX documents with integrated R code. Now I'd like to readout some external parameters (saved in a TXT or CSV file) and create a document based on the conditions specified ...
4
votes
1answer
453 views

How to pass two parameters to a \newenvironment?

I have defined this new environment for handling my images in my document I want to pass two parameters: #1 to refer to pathname to the imagefile #2 to refer to the string I want to pass to the label ...
0
votes
1answer
682 views

Start TeXstudio portable in multiple instances

I use TeXstudio portable and want to use it in multiple instances when double clicking a .tex or .txss file. The necessary starting parameter is described here, but I do not know how to use it. Do you ...
5
votes
3answers
277 views

Problem with newenvironment

I'm defining new environment and I'm trying to pass to it two arguments: \newenvironment{ctable}[2]% {% \begin{center}% \begin{tabular}{#1}% }% {% \end{tabular}% \captionof{table}{#2}% ...
3
votes
1answer
70 views

Get confused about the `command` option in some ConTeX \setup*

Since I switched to ConTeXt from plain TeX, I always get confused about macros in it. Now it is the command option in \setup* of ConTeXt. In ConTeXt, some macros, like \setuphead, \setuplist, have ...
2
votes
1answer
105 views

Fine-tuning dimensions/whitespace parameters

I often find I need to adjust whitespace lengths in my own code. Just as an illustration, I'm in the middle of trying to insert an appropriate amount of space before the 'v's in this, to make them ...
4
votes
1answer
1k views

Default parameter values

What are the default values for the itemize environment (\itemsep, \labelsep, \labelwidth, etc.)? The below is an example of what I have so far: \documentclass{article} \begin{document} ...
13
votes
2answers
327 views

TeX Parameter Processing imitating key-value pairs

I am thoroughly confused by this answer to How to generate n points on a circumference and connect all of them while having constraints on the image size as I don't understand how the parameter ...
4
votes
2answers
423 views

Turning parts of text on and off

Is there a way to turn certain parts of the text on and off in LyX/Latex ? I'm thinking of having something like an environment (lets call it "TL" for "traffic light") and a parameter t such that if ...
18
votes
1answer
652 views

Can/Should I use '\jobname' to pass information from outside LaTeX?

I'm creating a parameterized document. I want to pass a string into the document from outside at 'compile time'. In particular: a comma-separated list. This list will then be used by LaTeX to resolve ...
7
votes
1answer
191 views

Double #s when defining a new command that uses \mint instead of using \mint directly

Why does \dollarcom give a different result than \mint{bash}|$#|? \documentclass{article} \usepackage{minted} \newcommand{\dollarcom}{\mint{bash}/$#/} \begin{document} \dollarcom \mint{bash}|$#| ...
6
votes
3answers
127 views

How do I handle a closing brace in a 'character scanning' macro?

Problem I need to define a command that grabs all numerical digits following it and leaves the rest alone. Eventually I came up with this: First Solution \RequirePackage{xstring} % for \IfInteger ...
7
votes
1answer
303 views

Storing unexpanded macro definitions (including #1, #2, …) for later use (now includes full usecase)

Preliminary Info I'm working on a new LaTeX package to make scoping more flexible. To do this I'll be capturing and reintroducing user defined commands behind the scenes. (For a comprehensive ...
2
votes
0answers
50 views

Escape hash symbol (#) in inner macro definition [duplicate]

Possible Duplicate: What is the meaning of double pound symbol (##1) in an argument? I'm quite sure this question has been asked many times but I can't find the answer. I'd like to make a ...
11
votes
2answers
4k views

New command with variable number of parameters

I would like to create new command with functionality like this (pseudo code): \newcommand{\myCommand}[numOfParameters] { for (i = 0; i < numOfParameters / 3; i++) { \somecommand1{#(i*3 + ...
7
votes
2answers
264 views

Extract year from parameter containing date [duplicate]

Possible Duplicate: How do I split a date? Does anyone know how to extract year from date in parameter of own macro? Namely, \themacro#1{...} where #1 contain either date already in ...
2
votes
1answer
235 views

renew section command with args

How can I renew the section command to include some additional arguments and start a multicolum section? something like: \section{title}{toc-title}{picture}{second picture}{subtitle}{author} I just ...
6
votes
1answer
122 views

What is the proper way to pass user input to package commands?

I'm wondering if someone can fill me on the proper technique for passing parameters from a document to the underlying package. The user would interface via a document like this: ...
3
votes
2answers
172 views

Sharing parameters between a command and an environment

(This question is related to Using \total of totcount package in section title) I'd like to keep track of the papers I review, and I have written a code (MWE shown below). The code keeps the count of ...
12
votes
3answers
252 views

Conditional command (depending of the arguments)

I have the commands: \def\tabfive{% \renewcommand{\arraystretch}{1.1} \begin{tabular}{p{0.18\linewidth}p{0.18\linewidth}p{0.18\linewidth}p{0.18\linewidth}p{0.18\linewidth}} \fiveoptions ...
3
votes
1answer
99 views

\takeargs{n} = take n arguments and print them, space separated?

I'm looking for a command \takeargs{n} (in either TeX or LaTeX) such that f \takeargs{n} {x_1} ... {x_n} = f\ x_1\ ...\ x_n , that is (if I understood that part) \takeargs{0} = \takeargs{n} ...
20
votes
3answers
2k views

Extract first & last characters of macro argument?

In LaTeX, how do I extract/isolate/determine the first and last characters of a macro argument? Specifically, in the case I'm dealing with, the argument happens to be a base-10 integer (call it N). ...
25
votes
6answers
1k views

Spirograph, Continuous Rotations in TikZ or PSTricks

Spirograph-like drawings are obtained when one repeatedly draws a closed curve on a continuously rotated canvas. Is there a nice way to make spirograph drawings using TikZ or PSTricks? There is a nice ...
4
votes
2answers
3k views

variable-name \newcommand with parameters within another \newcommand

In "Defining a newcommand, with variable name, inside another newcommand" we learned how to use \newcommand within a command definition with another \newcommand, when the name of the inner command ...
3
votes
2answers
1k views

Length parameter for vertical skip space in a math environment?

I learned here that I can use \\[<len>] to explicitly set the vertical skip space between lines, e.g., <len> set to 3ex. I'd like to set <len> to, say, 2-times the normal length in ...
4
votes
1answer
4k views

How to pass parameters in a class file to different packages?

I'm writing a new class file that is based on book, and thought of making it available both in an English and in a Dutch version. Easiest to do seemed passing the arguments, so I constructed following ...