Hans Hagen schrieb am 16.11.2020 um 19:05:
On 11/16/2020 6:53 PM, Wolfgang Schuster wrote:
Hi,
there are two problems in the following definitions (line 90--99).
1. Extra "s" on \ifparameter
2. \anch_table_check_state doesn't work anymore because it tries to change the value of \dosingleempty which was used to create the optional argument.
\permanent\tolerant\protected\def\tbXC [#1]{\anch_table_check_state\ifparameters#1\or\anch_tables_indeed_XC [#1]\else\expandafter\NC\fi} \permanent\tolerant\protected\def\tbGSC[#1]{\anch_table_check_state\ifparameters#1\or\anch_tables_indeed_GSC[#1]\else\expandafter\NC\fi}
\permanent\tolerant\protected\def\tbGFC[#1]{\anch_table_check_state\ifparameters#1\or\anch_tables_indeed_GFC[#1]\else\expandafter\NC\fi}
\permanent\tolerant\protected\def\tbGTC[#1]{\anch_table_check_state\ifparameters#1\or\anch_tables_indeed_GTC[#1]\else\expandafter\NC\fi}
\def\anch_table_check_state {\iftrialtypesetting \global\settrue\tablehaspositions \firstargumentfalse \fi}
How about this:
\permanent\protected\def\tbXC {\anch_table_checked\anch_tables_indeed_XC } \permanent\protected\def\tbGSC{\anch_table_checked\anch_tables_indeed_GSC}
\permanent\protected\def\tbGFC{\anch_table_checked\anch_tables_indeed_GFC}
\permanent\protected\def\tbGTC{\anch_table_checked\anch_tables_indeed_GTC}
\tolerant\def\anch_table_checked#1[#2]% {\iftrialtypesetting \global\settrue\tablehaspositions \expandafter\NC \orelse\ifparameter#2\or \expandafter#1% \else \expandafter\NC \fi}
The optional argument is now gone and never passed further down, more something like this (not sure about \tripleexpandafter) \tolerant\def\anch_table_checked#1[#2]% {\iftrialtypesetting \global\settrue\tablehaspositions \tripleexpandafter\NC\expandafter\gobbleoneoptional \orelse\ifparameter#2\or \expandafter#1% \else \tripleexpandafter\NC\expandafter\gobbleoneoptional \fi[#1]} Wolfgang