diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-01 22:10:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-01 22:10:41 +0000 |
commit | 9226226e16b7696c316f2b99c80a567b4b37a9c1 (patch) | |
tree | e74fa4e3eccedbb59b481b2c470d6cf5fc7d5557 /Master/texmf-dist/tex/latex/zref-vario | |
parent | 38bddb402ca3724721fb61aeca79ca9daf6bbc27 (diff) |
zref-vario (1feb22)
git-svn-id: svn://tug.org/texlive/trunk@61845 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/zref-vario')
-rw-r--r-- | Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty | 140 |
1 files changed, 76 insertions, 64 deletions
diff --git a/Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty b/Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty index 20610f09d0c..c082b423948 100644 --- a/Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty +++ b/Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty @@ -42,10 +42,13 @@ %% %% ----------------------------------------------------------------------- %% -\ProvidesExplPackage {zref-vario} {2022-01-31} {0.1.0-alpha} +\ProvidesExplPackage {zref-vario} {2022-02-01} {0.1.1-alpha} {Extended LaTeX page cross-references with varioref and zref-clever} -\RequirePackage { varioref } -\RequirePackage { zref-clever } [ 2022-01-28 ] % v0.2.0-alpha +\AddToHook { begindocument/before } + { + \RequirePackage { varioref } + \RequirePackage { zref-clever } [ 2022-01-28 ] % v0.2.0-alpha + } \cs_new:Npn \__zrefvario_ref_opt_default_cs:nn #1#2 { __zrefvario_ref_opt_default_ #1 : #2 } \cs_new:Npn \__zrefvario_base_lang:n #1 @@ -133,16 +136,19 @@ \seq_new:N \g__zrefvario_setup_languages_seq \NewDocumentCommand \zvLanguageSetup { m m } { - \group_begin: - \zrefclever_language_if_declared:nTF {#1} + \AddToHook { begindocument/before } { - \tl_set:Nn \l__zrefvario_setup_language_tl {#1} - \keys_set:nn { zref-vario/langsetup } {#2} - \seq_gput_right:Nx \g__zrefvario_setup_languages_seq - { \__zrefvario_base_lang:n {#1} } + \group_begin: + \zrefclever_language_if_declared:nTF {#1} + { + \tl_set:Nn \l__zrefvario_setup_language_tl {#1} + \keys_set:nn { zref-vario/langsetup } {#2} + \seq_gput_right:Nx \g__zrefvario_setup_languages_seq + { \__zrefvario_base_lang:n {#1} } + } + { \msg_warning:nnn { zref-vario } { unknown-language-setup } {#1} } + \group_end: } - { \msg_warning:nnn { zref-vario } { unknown-language-setup } {#1} } - \group_end: } \msg_new:nnn { zref-vario } { unknown-language-setup } { @@ -296,67 +302,73 @@ } \group_begin: \tl_set:Nn \l__zrefvario_setup_language_tl { zv_unknown_language } -\keys_set:nn { zref-vario/langsetup } +\AddToHook { begindocument/before } { - reftextfaceafter = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextfaceafter } { \l__zrefvario_ref_language_tl } - \zref@default - } , - reftextfacebefore = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextfacebefore } { \l__zrefvario_ref_language_tl } - \zref@default - } , - reftextafter = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextafter } { \l__zrefvario_ref_language_tl } - \zref@default - } , - reftextbefore = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextbefore } { \l__zrefvario_ref_language_tl } - \zref@default - } , - reftextcurrent = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextcurrent } { \l__zrefvario_ref_language_tl } - \zref@default - } , - reftextfaraway = + \keys_set:nn { zref-vario/langsetup } { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextfaraway } { \l__zrefvario_ref_language_tl } - \zref@default - } , - reftextpagerange = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextpagerange } { \l__zrefvario_ref_language_tl } - \zref@default - } , - reftextlabelrange = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextlabelrange } { \l__zrefvario_ref_language_tl } - \zref@default - } , + reftextfaceafter = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextfaceafter } { \l__zrefvario_ref_language_tl } + \zref@default + } , + reftextfacebefore = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextfacebefore } { \l__zrefvario_ref_language_tl } + \zref@default + } , + reftextafter = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextafter } { \l__zrefvario_ref_language_tl } + \zref@default + } , + reftextbefore = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextbefore } { \l__zrefvario_ref_language_tl } + \zref@default + } , + reftextcurrent = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextcurrent } { \l__zrefvario_ref_language_tl } + \zref@default + } , + reftextfaraway = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextfaraway } { \l__zrefvario_ref_language_tl } + \zref@default + } , + reftextpagerange = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextpagerange } { \l__zrefvario_ref_language_tl } + \zref@default + } , + reftextlabelrange = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextlabelrange } { \l__zrefvario_ref_language_tl } + \zref@default + } , + } } \group_end: \msg_new:nnn { zref-vario } { missing-string } { Missing~'#1'~string~for~language~'#2'~\msg_line_context:. } -\AddToHook { begindocument } +\AddToHook { begindocument/before } { - \seq_if_in:NxF \g__zrefvario_setup_languages_seq - { \__zrefvario_base_lang:e { \l__zrefvario_ref_language_tl } } + \AddToHook { begindocument } { - \msg_warning:nnx { zref-vario } { language-not-setup } - { \l__zrefvario_ref_language_tl } + \seq_if_in:NxF \g__zrefvario_setup_languages_seq + { \__zrefvario_base_lang:e { \l__zrefvario_ref_language_tl } } + { + \msg_warning:nnx { zref-vario } { language-not-setup } + { \l__zrefvario_ref_language_tl } + } } } \msg_new:nnn { zref-vario } { language-not-setup } |