2
votes
0answers
49 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 ...
7
votes
3answers
2k views

Passing arguments to nested newcommands

I thought that doubling hashes was sufficient to pass arguments to nested \newcommand. \newcommand{\notice}[1]{ \vspace{10px} \textbf{#1:} \begin{quotation} ##1 \end{quotation}} ...
7
votes
1answer
286 views

Defining inside an \edef

The following throws an "Undefined control sequence" error: \edef\testa{\edef\testb{foobar}\testb} when it gets to expanding \testb. This problem is also mentioned in "TEX by Topic" 12.6.2. But no ...
12
votes
1answer
907 views

Nesting command definitions more than two levels

How do you access macro arguments if the macros are nested by more than two levels? To explain it in more detail: Creating a new command in another command (nesting command definitions), it is ...
6
votes
1answer
152 views

Nested parameters lost when generating new macros from package options

I've created a package which I would like to take in options and turn these into new macros (one new macro for each option). I also want these new macros to produce new macros in turn. For example, ...
41
votes
1answer
2k views

What is the meaning of double pound symbol (##1) in an argument?

I've seen sometimes that people use a double pound sign (##) when defining/using arguments. What is the difference between the normal argument, #1, and the double sign one, ##1? Are there any ...
15
votes
3answers
608 views

Redefine command when inside a specific other command possible?

How, in general, can I (re)define commands based on in which other command they are nested? A more specific example: I have a custom latex command (say, \code{}) that makes text appear bold. ...