endgroup
Endgroup is a TeX primitive used to end a group that was started by begingroup (or by an opening brace). Grouping creates a local scope for assignments and definitions, and endgroup marks the point at which that local scope ends. When a group ends, most changes made inside it are discarded unless they were made global.
In TeX, many operations are scoped by groups. Within a group, changes to registers such as counts,
Syntax and related terms: The primitive end of a group is \endgroup. Its synonym is \egroup, and
Typical uses: Endgroup is used in macro and package development to confine temporary changes to a small,
Example (conceptual): A count is set inside a group, and without global, its new value does not