[texhax] Overcoming 9 argument limit for macros?

Peter Davis pfd at pfdstudio.com
Sat Nov 20 02:32:30 CET 2010


Just to follow up on my own question ...

On Fri, Nov 19, 2010 at 7:29 PM, Peter Davis <pfd at pfdstudio.com> wrote:

>
> Let me ask the question another way.  I'm trying to output a document that
> will use the same page over and over again, like a form, but with some
> different text plugged in here and there, and some different images.  I'm
> assuming the best (only?) way to do that is to define one or more macros to
> draw the parts of the page, and pass in the text, image names, etc. as
> arguments.  Any better suggestions?
>
> P.S. - I tried using box registers to pass in the argument values, but they
> always typeset in the default font and size, regardless of the paragraph
> they were in.  I even used \unhcopy to just add the contents to the list,
> but somehow the attributes were carried with them.
>
>
I did have some luck with something like:

\newcommand{\dopage}{%
Do something with \vari, \varii and variii (and as many more as I want to
define). %
}

\def\vari{First argument}
\def\varii{Second arg.}
\def\variii{Third, etc.}
\dopage

etc.  It's brute force, but it works.  Suggested improvements or
alternatives *VERY* welcome.  (Yes, there's xkeyval, but I'm actually
writing code to generate the TeX source file, so it will simply be defining
a series of variables.

Thanks,
-pd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20101119/3f8e3c7e/attachment.html>


More information about the texhax mailing list