I'm working on a Table of Contents with two folio columns, and the editors want to use the same tagging for both columns. I can put a space between them, but the second column does not line up due to the difference of character length in the first column. Is there a way to set two measurements, so the first instance of the tag goes to the first one and the second instance of the tag goes to the second one?
[tocent1]BOARD OF EDITORS[cntpgnum]v[cntpgnum]v
I tried to get them to use different tags so I could have [cntpgnum1] and [cntpgnum2], and vary the style that way. Unfortunately we can't do that.
Well, you've given very few details.
But if you can get the results you want if there were different [cntpgnum1]/[cntpgnum2] tags, then I would think it should be pretty easy to get the results you want even if there is only the one [cntpgnum] tag - as long as there is a regular "pattern" of use of the tags.
My idea would be to use a number register (do not use a temp x register) to keep track of whether you are in the "first" [cntpgnum] tag or the "second" one.
For example, let's assume that number register 250 is available to use. In your [tocent1] tag you could do <ns;250;1>. Then in your [cntpgnum] tag you could check the value of number register 250 and if it equals 1 then you can do your [cntpgnum1] style (e.g. by calling a <cntpgnum1> macro), otherwise do your [cntpgnum2] style (e.g. by callling a <cntpgnum2> macro) and then add one to number register 250: <mc;#250=1;nul;skp><cntpgnum1><mc;#250=1;skp;nul><cntpgnum2>...<ns;250;&1>.
Depending on what your <cntpgnum1> and <cntpgnum2> macros (styles) are doing, you might be able to simplify this by just doing <mc;#250=1;cntpgnum1;cntpgnum2>, but the way I've shown it above (using skp/nul arguments and separate macro callouts) is "safer". There can be problems with things called out by <mc> getting generated more than once with the "simpler" <mc>, depending on what cntpgnum1/cntpgnum2 actually do.
You haven't shown what the rest of the markup is, i.e. if the [tocent1] tag appears every time before there are the pair of [cntpgnum] tags. If not, then you might have to have other tags also do the <ns;250;1> or you might need to have some global "starting" tag do that initialization and then manage the setting of number register 250 to 2 and then back to 1 in the [cntpgnum] tag expansion itself (after it tests to do cntpgnum1/cntpgnum2).