Open glallen01 opened 3 years ago
Based on https://www.latex-project.org/help/documentation/lthooks-doc.pdf, this may be a much better approach.
\makeatletter
\let\@markitem\item%
\newcommand*{\setdefaultportionmark}[1]{\AddToHook{cmd/item/after}{(#1)~}}
\newcommand*{\markitem}[1]{\@markitem (#1)}
\makeatother
\setdefaultportionmark{U}
% and then override as needed with
\markitem{XXX}
https://www.texnology.com/talk2.pdf ref use of \csname for tracking highest class per page
re #36
comments moved from PR to issue:
also something like the following could work for formatting:
producing (with slight spacing issues):
It would be nice to figure out how to redefine \item itself to make it easier on the user. It's a little tricky because I'd want the class to be the first optional argument before the item number. But I'll have to figure out how to make the
\@ifnextchar [
check for optional args work for multiple arguments? rewrite that as xparse, or dig into\@item
...Potentially useful references: