[texhax] environment from command

Barbara Sánta santa.barbi at gmail.com
Sat Nov 20 15:40:00 CET 2010


very sorry if I was unundrestandable, you are right, the first and
third argument is not necessary.
So transform a \command{arg} into a
\begin{env}
   arg
\end{env}
with defining env environment. My problem was that I could not find a
  \newenvironment{env}{\command ?beginning a block? }{ ?end of the block? }
solution, where ? signs my problem. But Heiko Oberdiek gave a perfect
solution with a package.

Barbara

2010/11/20 Philip Taylor (Webmaster, Ret'd) <P.Taylor at rhul.ac.uk>:
>
>
> Barbara Sánta wrote:
>>
>> Hi, an elementary question, but I couldn't find the answer: how could
>> I define an environment from a command such that an argument of it be
>> inside the environment.
>>
>> Example:
>>
>> given the next command:
>> \command{fix first argument}{variable second arg}{fix third arg}
>>
>> Construct the next environment:
>> \begin{environment}
>>   variable second arg
>> \end{environment}
>
> Looking at both this and the more recent messages, I have
> to confess that I don't really understand what you are
> trying to accomplish.  What are "fix first argument" and
> "fix second argument", and if they are fixed, why do they
> need to appear at all, and how is the expansion intended
> to know which environment is to be used ?
>
> Philip Taylor
>
>



More information about the texhax mailing list