GeneralOvercoming limitation of max nine parameters

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
sierra1bravo
Posts: 11
Joined: Sun Jan 04, 2009 7:28 am

Overcoming limitation of max nine parameters

Post by sierra1bravo »

Dear all
The following code doesn't compile as LaTeX seems to have a built-in limit of 9 arguments. Is there some way to side-step this limitation?

Code: Select all

\newcommand{\oneTick}[28]{\ticket{%
   \put(7,38){\makebox[0mm]{\bfseries\Large #1}}
   \put(#2,#3){#4}
   \put(#5,#6){#7}
   \put(#8,#9){#10}
   \put(#11,#12){#13}
   \put(#14,#15){#16}
   \put(#17,#18){#19}
   \put(#20,#21){#22}
   \put(#23,#24){#25}
   \put(#26,#27){#28}
}}

\begin{document}
\oneTick{00001}{3}{28}{11}{3}{28}{14}{10}{28}{22}{17}{8}{31}{24}{28}{40}{31}{28}{47}{31}{8}{47}{45}{8}{73}{59}{18}{92}
\end{document}

Thanks in advance

Das

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Overcoming limitation of max nine parameters

Post by gmedina »

Hi,

the information in How to break the 9-argument limit could be useful for you.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Overcoming limitation of max nine parameters

Post by localghost »

You could try the xargs package. It translates the suggestions behind the link provided by gmedina.


Best regards
Thorsten¹
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Overcoming limitation of max nine parameters

Post by gmedina »

Hi localghost,
localghost wrote:You could try the xargs package. It translates the suggestions behind the link provided by gmedina...
Thanks for the info about that package, I didn't know it.

However, I've been reading the documentation of the xargs package and (please correct me if I am wrong) as far as I can tell this package doesn't allow the possibility of having more than nine arguments when defining commands; it merely allows having more than one optional argument and it also allows the optional argument(s) not necessarily being the first one. However, the total number of arguments must still be 9.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
sierra1bravo
Posts: 11
Joined: Sun Jan 04, 2009 7:28 am

Re: Overcoming limitation of max nine parameters

Post by sierra1bravo »

Dear gmedina, localghost
After reading the documentation for xargs, I'm inclined to believe gmedina is right...while xargs package enhances the flexibility of parameters, it doesn't seem to enhance their number (I may be completely wrong).

das
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Overcoming limitation of max nine parameters

Post by localghost »

gmedina wrote:[...] However, I've been reading the documentation of the xargs package and (please correct me if I am wrong) as far as I can tell this package doesn't allow the possibility of having more than nine arguments when defining commands; it merely allows having more than one optional argument and it also allows the optional argument(s) not necessarily being the first one. However, the total number of arguments must still be 9.
It seems that you are right. I only read the caption of the package in its CTAN entry. And obviously I didn't do that very careful.
Post Reply