3
votes
1answer
279 views

How to write a \newenvironment with a conditional structure and one optional parameter

I would like to define a new environment with an optional parameter. Currently, I have \theoremstyle{plain} \newtheorem{prop}{Proposition} \newenvironment{propExt}[1][]{\ifx!#1! \begin{prop} \else ...
0
votes
1answer
397 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 ...
6
votes
2answers
273 views

How to extend a macro for e-mail addresses to support multiple arguments?

I prepared the following macros to format e-mail adresses in a e-mail header. \usepackage{xifthen}% Provides \ifthenelse and \isempty % E-Mail header strings with format. ...
5
votes
1answer
1k views

Boolean variables in LaTeX

I am trying to use "boolean" variables in LaTeX but am unable to have any success... I have a macro which takes 5 arguments, the last argument being optional. This macro is named educationItem and it ...
2
votes
1answer
229 views

Definining a new enviroment depending on a parameter

I want to create a new environment which depend if a parameter exists or not. The basic definition, which works fine, is: \newrgbcolor{bcolor}{1. 1. 1.}% \newenvironment{pbox} ...
4
votes
3answers
279 views

Own document variables with and without arguments

I use the following to introduce new document variables to my document. They should behave like \author or \title. So when they're used without parameter, they should print the corresponding variable. ...
2
votes
1answer
106 views

\newcommand that restricts the value of an argument

When defining a macro, is it possible to restrict the value of an argument, so that if the thing followed it is a number, then it takes it as an argument, but if it is not, then it is just empty. To ...