4

Sometimes I have cases when \everypar calls in other group level than before. For example, \everypar calls inside document, but the second time it calls inside \xalignat environment.

Is there an existing variable in expl3 which allows us to know the group level to compare it inside \everypar command? If not, how to solve it for all environments?

Maybe I should redefine \bgroup and \egroup commands, and increase or decrease my own variable connected with the group level? If yes, how it do correct?

1
  • Please clarify: {A}{B}{C}\bgroup D\egroup\bgroup E\egroup\bgroup F\egroup -- A, B, C, D, E and F are not in the same group. Are they to be considered in the same group-level ? Dec 15 '20 at 19:45
10

The etex primitive \currentgrouplevel holds the group nesting level.

2
  • Thank you very much for your answer. Where i can find all latex variables,usefull for each other? Dec 15 '20 at 22:30
  • 1
    @AleksandrKozlovskiy this is a primitive not latex-defined, these are documented in the texbook or the manuals for etex, xetex, luatex etc. so in this case texdoc etex Dec 15 '20 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.