Se você quisesse que todos os parágrafos \io funcionassem dessa maneira, e apenas na saída do PTXprint, então,
Sim, pode ser feito… Não é nem muito difícil, algo ao longo das linhas deste código não testado:
\newcoutner\ioparnum
\def\ioparstart#1{#1.~} % How should it be formatted?
\sethook{start}{io}{\advance\ioparnum by 1 \leavevmode \ioparstart{\the\ioparnum}}
\sethook{after}{c}{\ioparnum=0 } % Reset each chapter, just in case
O problema é que você está procurando casos incomuns. Por exemplo, se por algum tipo de seção periférica houver vários sumários, o acima continuará contando… Se você pudesse garantir que cada bloco de parágrafos \io fosse precedido por um \is1, então você poderia usar \setbetweenhook{is}{io}{\ioparnum=0 } para fazer a reinicialização, e então você está procurando por casos ainda mais incomuns. Em algum ponto, sua busca por situações inesperadas leva tanto tempo quanto numerá-los manualmente.
If you wanted all \io paragraphs to work in this way, and only in PTXprint output, then,
Yes, it can be done… It’s not even very hard, something along the lines of this untested code:
\newcoutner\ioparnum
\def\ioparstart#1{#1.~} % How should it be formatted?
\sethook{start}{io}{\advance\ioparnum by 1 \leavevmode \ioparstart{\the\ioparnum}}
\sethook{after}{c}{\ioparnum=0 } % Reset each chapter, just in case
The problem is you are now looking for unusual cases. E.g. if for some kind of periphery section there are multiple outlines, the above will just keep on counting… If you could guarantee that every block of \io paragraphs was preceded by an \is1 then you could use \setbetweenhook{is}{io}{\ioparnum=0 } to do the reset, and then you’re looking for even more unusual cases. At some point your searching out unexpected situations takes as much time as numbering them by hand.
Tradução automática de English