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

learn more… | top users | synonyms

8
votes
5answers
308 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 ...
5
votes
2answers
41 views

Why can you not skip lines in document when providing optional environment parameters with xparse?

Is it intentional that you cannot skip lines when using optional environment parameters with LaTeX3's xparse? It seems that you can skip lines with mandatory parameters. Compare ...
0
votes
0answers
24 views

Passing parameters to LaTeX - but in TeXShop

This kind of question has been asked before, but I didn't see any involving using a GUI to pass parameters (doc class, new conditionals) to a LaTeX document. I would be interested in some precise ...
6
votes
1answer
88 views

What is the difference between “-interaction=nonstopmode” and “-halt-on-error”?

Scripting with xelatex I know halt-on-error makes it possible to use xelatex in loops within scripts without causing scripts to hang up when a document does not compile, but why do we need ...
9
votes
1answer
129 views

Parameters in a caption

I have a simple figure with a code like this: \begin {figure}[htbp] \centering % \begin{tikzpicture} [scale=1] \def \r {1/4} % y-scaling % % PARAMET. \def \a {1} %x^6 \def \b {-6} ...
4
votes
1answer
86 views

Can you interpret macro parameters as verbatim?

Basically I want to define a macro whose parameter should be treated as a "script", meaning that I want to print it in a verbatim way including line breaks and special characters. Furthermore, I want ...
1
vote
1answer
32 views

LuaLaTeX : pass a list to lua as macro parameter, but not seen as a table

I try to pass a list to lua as LaTeX parameter but can not make it interpreted as a table by lua. if "#1" I get : a,b,c,d,e – n 1 –, table of one entry if #1 I get : n 5 – ?? Even with \unexpanded ...
3
votes
2answers
69 views

How to make more-than-9-argument-commands work with tabular?

I have a command that needs more than 9 arguments. I stumbled over this solution: How to define a command that takes more than 9 arguments. This works fine in regular text. But I tried using this ...
3
votes
1answer
36 views

edit an enviroment to add to a new extra parameter

I'm trying to define a new \newenviroment but I'm having some problems. I need an enviroment that uses a counter and uses an extra parameter to write some text. I'm working with this enviroment: ...
5
votes
3answers
235 views

What's wrong with my newcommand?

I defined a question macro, then made it successively fancier. Right now, three macro should define a short hand for the following: \section{Questions} \begin{enumerate} \item Q1... \item Q2... ...
3
votes
2answers
118 views

Control sequence with arbitrary number of parameters

I want a macro which can generate units consisting of several base units. Let the macro be \unit. For example, I want \unit{kg} to mean \mathrm{kg} and \unit{kg}{m}{s^{-2}} to mean \mathrm{kg \cdot m ...
4
votes
1answer
187 views

Run a shell script (with parameters) from a PDF generated by LaTeX

I want to have a link in my PDF generated by pdflatex which executes a shell script, and this part works great. The problem I am running into is that I need the link in the PDF to be able to pass ...
0
votes
1answer
52 views

Customizing enumerate list with item label as parameter of new environment

I want to define a new environment which would allow me to have a like-enumerate list, i.e. have the \items numbered like in an enumerate environment and change the item name by the one given as ...
2
votes
2answers
52 views

Keeping underscores in parameters even inside NewEnviron environments

I followed this answer to define a command such that underscores in its parameter can be kept. However, this does not work if the command is called inside an environment that has been defined with ...
1
vote
0answers
75 views

Macro passing problem with pgfmath

As a continuation of thread 2010/2014 versions difference: I am trying to decorate program listings with highlighted lines, numbered balls, etc. In 2010, I used a macro which does not work any more ...
3
votes
2answers
66 views

new command for nested enumerate with variable arguments

I have some text that I want to turn into a template which looks like this: Extensions: \begin{enumerate} \item[2.a] xyz \begin{enumerate}[i.] \item a \item b ...
1
vote
0answers
69 views

Pass parameters to ConTeXt \component, \product, etc

I would like to use, and it appears suited, the \component and related commands in ConTeXt. However, I would like to have multiple parameters to a given component e.g. \startcomponent X ...
2
votes
1answer
71 views

Passing more arguments to mapping functions in LaTeX3

In LaTeX3, we may write these lines: \cs_new_nopar:Nn \module_main:nn #1#2 { \clist_map_function:NN \g_module_some_clist \module_mapping:n } \cs_new_nopar:Nn \module_mapping:n #1 { % ...
2
votes
1answer
82 views

Redefine a primitive parameter

I want to redefine a primitive parameter as a macro, and make the macro behaves the same as the primitive parameter in some situations. \tracingcommands = 1 \the\tracingcommands ...
3
votes
4answers
77 views

creating a newenvironment with cite

This is my first question here. I would like to create a new environment, call it "citar", which makes those things : basic "quote" features, + : open and close french quotes, get the text in ...
2
votes
1answer
86 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
50 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
73 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
96 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
24 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
72 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
264 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
150 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
103 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
114 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
62 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
154 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 ...
12
votes
2answers
246 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
133 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
183 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 ...
3
votes
1answer
286 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 ...
7
votes
1answer
143 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
359 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
113 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
110 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
36 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
425 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 ...
10
votes
1answer
2k 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 ...
2
votes
0answers
232 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
723 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
1k 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 ...
6
votes
3answers
347 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
73 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
112 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 ...