Menu

#32 \FamilyCounterMacroKey with default results in error

KOMA-Script 3.37
closed
2022-06-28
2022-06-28
Markus Kohm
No

There was a bug report in German via email. About:

In scrbase.sty macro \Family@@Counter@@Macro@@Key has been defined as

\newcommand*{\Family@@Counter@@Macro@@Key}{}
\def\Family@@Counter@@Macro@@Key#1#2#3[#4]#5{%
  \ifdefined#4\else\let#4\z@\fi
  \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetCounterMacro{#2}{#3}{#5}{##1}}%
}

But the macro is argument #5. So the \ifdefined… will fail (almost always). The definition has to be

\newcommand*{\Family@@Counter@@Macro@@Key}{}
\def\Family@@Counter@@Macro@@Key#1#2#3[#4]#5{%
  \ifdefined#5\else\let#5\z@\fi
  \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetCounterMacro{#2}{#3}{#5}{##1}}%
}

Related

Issues: #4

Discussion

  • Markus Kohm

    Markus Kohm - 2022-06-28
    • status: open --> closed
     
  • Markus Kohm

    Markus Kohm - 2022-06-28

    Fixed in [r3909] and [r3910].

     

    Related

    Commit: [r3909]
    Commit: [r3910]


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.