summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemmacros/ghsystem.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/ghsystem.sty')
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/ghsystem.sty62
1 files changed, 40 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/ghsystem.sty b/Master/texmf-dist/tex/latex/chemmacros/ghsystem.sty
index 8c4f9d37708..8f0cea54cda 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/ghsystem.sty
+++ b/Master/texmf-dist/tex/latex/chemmacros/ghsystem.sty
@@ -12,7 +12,7 @@
% - If you have any ideas, questions, suggestions or bugs to report, please - %
% - feel free to contact me. - %
% --------------------------------------------------------------------------- %
-% - Copyright 2011-2013 Clemens Niederberger - %
+% - Copyright 2011-2014 Clemens Niederberger - %
% - - %
% - This work may be distributed and/or modified under the - %
% - conditions of the LaTeX Project Public License, either version 1.3 - %
@@ -27,8 +27,8 @@
% - The Current Maintainer of this work is Clemens Niederberger. - %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{ expl3, xparse, l3keys2e }
-\def\ghsystem@version{4.0a}
-\def\ghsystem@date{2013/12/13}
+\def\ghsystem@version{4.2e}
+\def\ghsystem@date{2014/01/09}
\ProvidesExplPackage
{ghsystem}
{\ghsystem@date}
@@ -209,34 +209,50 @@
\bool_new:N \l__ghsystem_language_directory_bool
% load the language file -- it needs expl3 namespace but shouldn't care about
-% what catcode regime was before and simply restore it
+% what catcode regime was before and simply restore it...
+% so we basically copy the definitions of \ExplSyntaxOn and \ExplSyntaxOff
-\cs_new:Npn \__ghsystem_namespace_restore: {}
+\cs_new_protected:Npn \__ghsystem_namespace_restore: {}
+\bool_new:N \l__ghsystem_expl_namespace_bool
\cs_new_protected:Npn \__ghsystem_expl_namespace:
{
- \group_begin:
- \cs_gset_protected:Npx \__ghsystem_namespace_restore:
- {
- \char_set_catcode:nn { 9 } { \char_value_catcode:n { 9 } }
- \char_set_catcode:nn { 32 } { \char_value_catcode:n { 32 } }
- \char_set_catcode:nn { 34 } { \char_value_catcode:n { 34 } }
- \char_set_catcode:nn { 38 } { \char_value_catcode:n { 38 } }
- \char_set_catcode:nn { 58 } { \char_value_catcode:n { 58 } }
- \char_set_catcode:nn { 94 } { \char_value_catcode:n { 94 } }
- \char_set_catcode:nn { 95 } { \char_value_catcode:n { 95 } }
- \char_set_catcode:nn { 124 } { \char_value_catcode:n { 124 } }
- \char_set_catcode:nn { 126 } { \char_value_catcode:n { 126 } }
- \tex_endlinechar:D = \tex_the:D \tex_endlinechar:D \scan_stop:
- }
- \group_end:
- \ExplSyntaxOn
+ \bool_if:NF \l__ghsystem_expl_namespace_bool
+ {
+ \cs_set_protected:Npx \__ghsystem_namespace_restore:
+ {
+ \char_set_catcode:nn { 9 } { \char_value_catcode:n { 9 } }
+ \char_set_catcode:nn { 32 } { \char_value_catcode:n { 32 } }
+ \char_set_catcode:nn { 34 } { \char_value_catcode:n { 34 } }
+ \char_set_catcode:nn { 38 } { \char_value_catcode:n { 38 } }
+ \char_set_catcode:nn { 58 } { \char_value_catcode:n { 58 } }
+ \char_set_catcode:nn { 94 } { \char_value_catcode:n { 94 } }
+ \char_set_catcode:nn { 95 } { \char_value_catcode:n { 95 } }
+ \char_set_catcode:nn { 124 } { \char_value_catcode:n { 124 } }
+ \char_set_catcode:nn { 126 } { \char_value_catcode:n { 126 } }
+ \tex_endlinechar:D = \tex_the:D \tex_endlinechar:D \scan_stop:
+ \bool_set_false:N \l__ghsystem_expl_namespace_bool
+ \cs_set_protected:Npn \__ghsystem_namespace_restore: {}
+ }
+ }
+ \char_set_catcode_ignore:n { 9 }
+ \char_set_catcode_ignore:n { 32 }
+ \char_set_catcode_other:n { 34 }
+ \char_set_catcode_math_toggle:n { 36 }
+ \char_set_catcode_alignment:n { 38 }
+ \char_set_catcode_letter:n { 58 }
+ \char_set_catcode_math_superscript:n { 94 }
+ \char_set_catcode_letter:n { 95 }
+ \char_set_catcode_other:n { 124 }
+ \char_set_catcode_space:n { 126 }
+ \tex_endlinechar:D = 32 \scan_stop:
+ \bool_set_true:N \l__ghsystem_expl_namespace_bool
}
\cs_new:Npn \ghsystem_load_language_file:n #1
{
\__ghsystem_expl_namespace:
- \input ghsystem_#1.def \scan_stop:
+ \file_input:n { ghsystem_#1.def }
\__ghsystem_namespace_restore:
}
@@ -623,6 +639,8 @@ VERSION HISTORY
`chemmacros'
2013/12/13 - version 4.0a - small changes to `ghsystem_german.def'
- added \ghsystem_dash: and \ghsystem_slash:
+2014/01/09 - version 4.2e - bug fix: namespace after language file loading
+ properly restored
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO: