3

You want to expand \thenamecounter before \pdffield_checkbox:n absorbs the argument. \RequirePackage{pdfmanagement-testphase} \DeclareDocumentMetadata{uncompress,pdfversion=2.0} \documentclass[]{article} \usepackage{l3pdffield-testphase} \usepackage{hyperref} \newcounter{namecounter} \ExplSyntaxOn \NewDocumentCommand{\mcheckb}{mm} { \stepcounter{...


3

} (or another token of catcode 2) is essentially the only thing that won't be taken as #1 so you can define your command as \@ifnextchar\egroup{\failcommand}{\grab} where \grab is your command taking an argument. This necessarily makes the construct not expandable.


2

I'm sure this could be better automated, but here, I expand the offending phrase with an \edef, before passing it to \loigiai. EDITED to simplify input for the user. Instead of forcing an \edef upon the user, I create the macro \exloigiai which the user may alternatively use, which applies \expanded to the argument prior to passing it to \loigiai. \...


Only top voted, non community-wiki answers of a minimum length are eligible