summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base/source2edoc.cls
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-10-22 03:01:42 +0000
committerNorbert Preining <norbert@preining.info>2021-10-22 03:01:42 +0000
commitd8b81c54ee53a93b7f939601fd6438d0f194978b (patch)
tree778d96f9997157967c023e7de3b72d9ef6d6bbe2 /macros/latex-dev/base/source2edoc.cls
parenta94181338fbbc4c93ae38719f727b05d3e5be421 (diff)
CTAN sync 202110220301
Diffstat (limited to 'macros/latex-dev/base/source2edoc.cls')
-rw-r--r--macros/latex-dev/base/source2edoc.cls18
1 files changed, 18 insertions, 0 deletions
diff --git a/macros/latex-dev/base/source2edoc.cls b/macros/latex-dev/base/source2edoc.cls
index ba6acf9f80..bef81d995d 100644
--- a/macros/latex-dev/base/source2edoc.cls
+++ b/macros/latex-dev/base/source2edoc.cls
@@ -61,6 +61,24 @@
\int_compare:nNnTF \@auxout = \@partaux
{ \@latexerr{\string\include\space cannot~be~nested}\@eha }
{ \@docinclude {#1} } % <--- braces needed!
+ \int_compare:nNnF { \tex_currentgrouplevel:D } = { 0 }
+ {
+ \int_compare:nNnT { \tex_interactionmode:D } = { 0 }
+ { \int_set:Nn \tex_interactionmode:D { 1 } }
+ \msg_fatal:nnn { source2edoc } { missing-endgroup } {#1}
+ }
+ }
+\msg_new:nnn { source2edoc } { missing-endgroup }
+ {
+ \str_if_eq:VnTF \@currenvir { document }
+ {
+ There~are~\int_use:N \tex_currentgrouplevel:D
+ \c_space_tl unclosed~groups~in~#1.dtx.
+ }
+ {
+ The~\@currenvir \c_space_tl environment~on~line~\@currenvline
+ \c_space_tl doesn't~have~a~matching~\iow_char:N\\end{\@currenvir}.
+ }
}
\cs_gset:Npn \@docinclude #1
{