552 views

### Default value of command [duplicate]

I have the following command: \newcommand{\plusbinomial}[3][2]{(#2 + #3)^{#1}} This command takes 3 parameters and the default value of the first parameter is 2. If I don't want to use the default ...
187 views

### how to define a newcommand with several optional arguments? [duplicate]

Possible Duplicate: More than one optional argument for newcommand Is it easy to define a new command with several optional arguments, that one would call as follows : \mycom[opt1=2,opt2=...
2k views

### Defining a list environment with multiple optional arguments

I'm trying to define a list environment with multiple optional arguments and with a default values for those arguments. For example, creating a new environment with a name newenv, which accepts two ...
2k views

### newcommand with comma separated argument, and optional arguments

I want to define a command (not with \def) the simplest possible way that it takes arguments separated by a comma, supports an optional argument (the first one). maybe another solution with extra ...
392 views

### Special macro definition (2opt, 1mand)

How can you define a macro \cmd in TeX primitives using two optional arguments (and a mandatory one) that fulfills the property that calling \cmd[opt]{mand} is equivalent to \cmd[][opt]{mand}. Yet, I ...
255 views

### Arguments to Commands: […] vs {…}

Perhaps this is something that has been answered before, but a cursory search didn't turn anything up. Is there any logic to how commands take arguments? Some things want the arguments to the ...
444 views

### Giving an optional parameter a default value

so I have this: \newcommand{\boxx}[2]{ \colorbox{white}{\begin{varwidth}{\textwidth} % Heading \colorbox{green!30}{#1}\\ % Content \fcolorbox{green}{yellow}{\begin{...
361 views

### How to replace a command with a dummy one?

On the question How to create a dummy generic environment replacement? I learned how to replace an generic envinronment with a dummy one. Until now I had success replacing then as replacing \...
970 views

### Pass multiple options to \newcommand

I have defined a new command for each of the team members in my project group to add individual todo-notes with different color and name. Now I would like to add another option, but is having trouble ...
320 views

### LuaTeX: Call a Lua function with two optional arguments

I've read More than one optional argument for newcommand and I chose the answer with xargs. I would like to pass a second optional argument to the Lua function. But the first of the two commented \...