1

I'm trying to create a command to create an environment that define a command that contains the name of the environment and an argument.

#1 is the argument of createEnv, ##1 is the argument of the environment. So, I thought that ###1 will contains the argument of the command \skill but I got errors.

Is is even possible to have a 3 nested layers of command ?

\NewDocumentCommand{\createEnv}{m}{
    \NewDocumentEnvironment{#1}{m}{
        \NewDocumentCommand{\skill}{m}{
             #1 : ###1 ///
        }
    }{
    }
}

\createEnv{Foo}
\createEnv{Goo}

0

1 Answer 1

1

The number of # double for each layer, so here

#1 is the argument to \createEnv

##1 is the mandatory argument to the #1 env

####1 is the mandatory argument to \skill.

You have ### (three) and that is an error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .