This works: \def\dodotablexrule[#1][#2]{\noalign{\color[#2]{\hrule height#1 depth \z@}}} But doing inside halign (tables) things like: \def\tablexrule{\dodoubleargument\dotablexrule} \def\dotablexrule[#1][#2]{% \doifemptyelse{#2}% {\dodotablexrule[#1][\@@tbxframecolor]}% {\dodotablexrule[#1][#2]}% } \def\dodotablexrule[#1][#2]{\noalign{\color[#2]{\hrule height#1 depth \z@}}} I get the error: ! Misplaced \noalign. \dodotablexrule [#1][#2]->\noalign {\color [#2]{\hrule height#1 depth \z@ }} I get the impression that none if these argument related stuff works inside the halign template. Is there a remedy? Or do I just have to give up hope using a unified macro and will have to resort to separate macro's for default/chosen parameters? Hans van der Meer
Hans van der Meer wrote:
I get the impression that none if these argument related stuff works inside the halign template.
Correct. TeX is in a very special state when it is looking for a potential \noalign, and the argument parsing required for optional arguments destroys that special state, Greetings, Taco
Thanks. Spares me a lot of puzzling. In some places things with dodoubleargument etc seem to work, so here and there a workaround is possible. On Jun 26, 2006, at 10:37, Taco Hoekwater wrote:
Hans van der Meer wrote:
I get the impression that none if these argument related stuff works inside the halign template.
Correct. TeX is in a very special state when it is looking for a potential \noalign, and the argument parsing required for optional arguments destroys that special state,
Greetings, Taco
Hans van der Meer
participants (2)
-
Hans van der Meer
-
Taco Hoekwater