From c1e543f3983621497544fe41fca6db5043023d9e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 1 Oct 2019 21:18:25 +0000 Subject: ghsystem (1oct19) git-svn-id: svn://tug.org/texlive/trunk@52245 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/ghsystem/ghsystem.sty | 70 ++++++++++++++++------- 1 file changed, 50 insertions(+), 20 deletions(-) (limited to 'Master/texmf-dist/tex/latex/ghsystem/ghsystem.sty') diff --git a/Master/texmf-dist/tex/latex/ghsystem/ghsystem.sty b/Master/texmf-dist/tex/latex/ghsystem/ghsystem.sty index 4583ad182d2..3ff663d7c0b 100644 --- a/Master/texmf-dist/tex/latex/ghsystem/ghsystem.sty +++ b/Master/texmf-dist/tex/latex/ghsystem/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-2016 Clemens Niederberger +% Copyright 2011--2019 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -29,8 +29,8 @@ \RequirePackage{ expl3, xparse, chemmacros } \ExplSyntaxOn -\tl_const:Nn \c_ghsystem_version_tl {4.8} -\tl_const:Nn \c_ghsystem_date_tl {2016/07/16} +\tl_const:Nn \c_ghsystem_version_tl {4.8a} +\tl_const:Nn \c_ghsystem_date_tl {2019/09/30} \tl_const:Nn \c_ghsystem_info_tl {globally~ harmonised~ system} \ProvidesExplPackage @@ -106,14 +106,14 @@ \cs_new:Npn \ghsystem_text: {} \cs_new:Npn \ghsystem_dash: { - \tex_penalty:D \c_ten_thousand + \tex_penalty:D 10000 \scan_stop: - \skip_horizontal:N \c_zero_skip } \cs_new:Npn \ghsystem_slash: { - \tex_penalty:D \c_ten_thousand + \tex_penalty:D 10000 \scan_stop: / \skip_horizontal:N \c_zero_skip } @@ -208,19 +208,45 @@ {#3} } -\cs_new:Npn \ghsystem_load_language_file:n #1 +\cs_new_protected:Npn \__ghsystem_load_language:n #1 + { + \seq_gput_right:Nn \g__ghsystem_loadad_languages_seq {#1} + \str_set:Nn \l_ghsystem_current_language_str {#1} + \@onefilewithoptions + {\c__ghsystem_definition_file_prefix_tl _ #1} [][] + \c__ghsystem_definition_file_extension_tl + } +\cs_generate_variant:Nn \__ghsystem_load_language:n {V} +\cs_generate_variant:Nn \file_if_exist:nTF {V} + +\cs_new_protected:Npn \__ghsystem_load_language_file:n #1 + { + \tl_set:Nx \l__ghsystem_tmpa_tl { \@trnslt@language {#1} } + \file_if_exist:nTF + { + \c__ghsystem_definition_file_prefix_tl _ \l__ghsystem_tmpa_tl . + \c__ghsystem_definition_file_extension_tl + } + { \__ghsystem_load_language:V \l__ghsystem_tmpa_tl } + { + \tl_set:Nx \l__ghsystem_tmpa_tl { \baselanguage {#1} } + \file_if_exist:nTF + { + \c__ghsystem_definition_file_prefix_tl _ \l__ghsystem_tmpa_tl . + \c__ghsystem_definition_file_extension_tl + } + { \__ghsystem_load_language:V \l__ghsystem_tmpa_tl } + { \errorTODO } + } + } + +\cs_new_protected:Npn \ghsystem_load_language_file:n #1 { \ghsystem_if_language_file_loaded:nF {#1} { \cs_if_eq:NNTF \@onefilewithoptions\@notprerr { \msg_error:nnn {ghsystem} {language-file} {#1} } - { - \seq_gput_right:Nx \g__ghsystem_loadad_languages_seq - { \@trnslt@language {#1} } - \@onefilewithoptions - {\c__ghsystem_definition_file_prefix_tl _ #1} [][] - \c__ghsystem_definition_file_extension_tl - } + { \__ghsystem_load_language_file:n {#1} } } } \cs_generate_variant:Nn \ghsystem_load_language_file:n { V } @@ -230,7 +256,12 @@ \seq_if_in:NxTF \g__ghsystem_loadad_languages_seq { \@trnslt@language {#1} } { \prg_return_true: } - { \prg_return_false: } + { + \seq_if_in:NxTF \g__ghsystem_loadad_languages_seq + { \baselanguage {#1} } + { \prg_return_true: } + { \prg_return_false: } + } } % TODO: an neuen Mechanismus anpassen: @@ -238,7 +269,6 @@ { \ghsystem_if_language_file_loaded:nF {#1} { \ghsystem_load_language_file:n {#1} } - \str_set:Nx \l_ghsystem_current_language_str { \@trnslt@language {#1} } \bool_set_true:N \l__ghsystem_language_file_loaded_bool } \cs_generate_variant:Nn \ghsystem_load_language:n { V } @@ -638,9 +668,10 @@ \chemmacros_load_module:n {nomenclature} -\chemmacros_integrate_package:nnn {} {ghsystem} {2016/01/11} +\cs_generate_variant:Nn \chemmacros_integrate_package:nnn {nnV} +\chemmacros_integrate_package:nnV {} {ghsystem} \c_ghsystem_date_tl -\tex_endinput:D +\file_input_stop: % -------------------------------------------------------------------------- VERSION HISTORY @@ -680,7 +711,6 @@ VERSION HISTORY proper value 2016/07/16 - version 4.8 - French translations, thanks to Bréal Frédéric and Beaude Aurélien +2019/09/30 - version 4.8a - add \l_ghsystem_table_next_page_tl to the template + and the French translations -% -------------------------------------------------------------------------- -% TODO: -- add option to switch between `longtable` and `supertabular` for \ghslistall ? -- cgit v1.2.3