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

learn more… | top users | synonyms

5
votes
2answers
108 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
136 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 ...
1
vote
0answers
24 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
38 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 ...
1
vote
1answer
35 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? ...
1
vote
1answer
39 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 ...
2
votes
1answer
53 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 ...
5
votes
1answer
36 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 ...
0
votes
1answer
35 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 ...
3
votes
1answer
101 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 ...
4
votes
2answers
474 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
439 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 \...
6
votes
2answers
51 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 \documentclass{...
0
votes
0answers
63 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
393 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
150 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
160 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 ...
2
votes
1answer
96 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
96 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
39 views

edit an environment to add to a new extra parameter

I'm trying to define a new \newenvironment but I'm having some problems. I need an environment that uses a counter and uses an extra parameter to write some text. I'm working with this environment: ...
5
votes
3answers
357 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... \end{...
3
votes
2answers
142 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
477 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
106 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
102 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
109 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
102 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
83 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
96 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
107 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 \ifnum\...
3
votes
4answers
115 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
112 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
68 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
106 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
120 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
81 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 ...
10
votes
2answers
357 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
169 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
132 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 \newcommand{\func}(1){...
5
votes
2answers
145 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
76 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
166 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 ...
13
votes
2answers
345 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
145 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 ...
7
votes
1answer
240 views

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

Edit: It seems that this question (one of mine first here) is not so clear as I imagined, when ask them. So I -- stimulated by recently received comments on it -- rephrase it with hope, that now ...
4
votes
1answer
380 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
162 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 } % ...
4
votes
1answer
844 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, % ...