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 | |
parent | 38bddb402ca3724721fb61aeca79ca9daf6bbc27 (diff) |
zref-vario (1feb22)
git-svn-id: svn://tug.org/texlive/trunk@61845 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.pdf | bin | 539239 -> 538943 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdf | bin | 119911 -> 121131 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex | 23 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx | 140 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty | 140 |
6 files changed, 176 insertions, 134 deletions
diff --git a/Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md b/Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md index 7702b1e8151..968785ecbf9 100644 --- a/Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog -## [Unreleased] +## [Unreleased](https://github.com/gusbrs/zref-vario/compare/v0.1.1-alpha...HEAD) + +## [v0.1.1-alpha](https://github.com/gusbrs/zref-vario/compare/v0.1.0-alpha...v0.1.1-alpha) (2022-02-01) + +### Changed +- Improved loading setup of required packages. ## [v0.1.0-alpha](https://github.com/gusbrs/zref-vario/releases/tag/v0.1.0-alpha) (2022-01-31) diff --git a/Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.pdf b/Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.pdf Binary files differindex 00e63f3389d..88f16366360 100644 --- a/Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.pdf +++ b/Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.pdf diff --git a/Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdf b/Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdf Binary files differindex 8ff1c89bca0..8a37e41a8d2 100644 --- a/Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdf +++ b/Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdf diff --git a/Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex b/Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex index 522e46a2076..7801d52f5d6 100644 --- a/Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex +++ b/Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex @@ -111,10 +111,10 @@ \begin{quotation} \pkg{zref-vario} offers a compatibility layer for \pkg{varioref} to be used - alongside \pkg{zref-clever}. It provides ``\texttt{\cs{z}}\dots{}'' - counterparts to \pkg{varioref}'s main reference commands, each of which - essentially does some (scoped) setup for \pkg{varioref}, then calls the - original one. + alongside \pkg{zref-clever}. It provides + ``\texttt{\textbackslash{}z}\dots{}'' counterparts to \pkg{varioref}'s main + reference commands, each of which essentially does some (scoped) setup for + \pkg{varioref}, then calls the original one. \end{quotation} \bigskip{} @@ -135,6 +135,12 @@ As usual: \usepackage{zref-vario} \end{zvexample} +\pkg{zref-vario} will load \pkg{varioref} and \pkg{zref-clever} at +\texttt{begindocument/before}, if they have not already been loaded. However, +considering \pkg{varioref} has known load order interaction with other +packages, prominently with \pkg{hyperref}, you may wish to load it explicitly +to ensure its load order requirements are met. + \section{Dependencies} @@ -210,7 +216,6 @@ supports them. \section{Customization} - \begin{function}{\zvLanguageSetup} \begin{syntax} \cs{zvLanguageSetup}\marg{language}\marg{options} @@ -235,6 +240,14 @@ options. Language independent default values are provided for the But, if you need to adjust them, the default values can be overridden by setting the corresponding options in \cs{zvLanguageSetup}. +As far as \pkg{zref-vario} is concerned, \pkg{varioref}'s options are (mostly) +not taken into account: the language options are disregarded (settings made +with \cs{zvLanguageSetup} are used instead), the \opt{nospace} option is +hard-coded (locally) for the ``\texttt{\textbackslash{}z}\dots{}'' commands, +and \opt{draft} and \opt{final} are typically given to \cs{documentclass}, +though they do affect \pkg{zref-vario}'s commands, just as they do with +\pkg{varioref}'s. + % \section{Acknowledgments} % diff --git a/Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx b/Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx index f58b39af256..9d5992f8f3c 100644 --- a/Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx +++ b/Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx @@ -128,7 +128,7 @@ % % Identify the package. % \begin{macrocode} -\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} % \end{macrocode} % @@ -136,8 +136,11 @@ % Required packages. % % \begin{macrocode} -\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 + } % \end{macrocode} % % @@ -314,16 +317,19 @@ \seq_new:N \g_@@_setup_languages_seq \NewDocumentCommand \zvLanguageSetup { m m } { - \group_begin: - \zrefclever_language_if_declared:nTF {#1} + \AddToHook { begindocument/before } { - \tl_set:Nn \l_@@_setup_language_tl {#1} - \keys_set:nn { zref-vario/langsetup } {#2} - \seq_gput_right:Nx \g_@@_setup_languages_seq - { \@@_base_lang:n {#1} } + \group_begin: + \zrefclever_language_if_declared:nTF {#1} + { + \tl_set:Nn \l_@@_setup_language_tl {#1} + \keys_set:nn { zref-vario/langsetup } {#2} + \seq_gput_right:Nx \g_@@_setup_languages_seq + { \@@_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 } { @@ -498,56 +504,59 @@ % \begin{macrocode} \group_begin: \tl_set:Nn \l_@@_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_@@_ref_language_tl } - \zref@default - } , - reftextfacebefore = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextfacebefore } { \l_@@_ref_language_tl } - \zref@default - } , - reftextafter = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextafter } { \l_@@_ref_language_tl } - \zref@default - } , - reftextbefore = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextbefore } { \l_@@_ref_language_tl } - \zref@default - } , - reftextcurrent = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextcurrent } { \l_@@_ref_language_tl } - \zref@default - } , - reftextfaraway = + \keys_set:nn { zref-vario/langsetup } { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextfaraway } { \l_@@_ref_language_tl } - \zref@default - } , - reftextpagerange = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextpagerange } { \l_@@_ref_language_tl } - \zref@default - } , - reftextlabelrange = - { - \msg_warning:nnxx { zref-vario } { missing-string } - { reftextlabelrange } { \l_@@_ref_language_tl } - \zref@default - } , + reftextfaceafter = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextfaceafter } { \l_@@_ref_language_tl } + \zref@default + } , + reftextfacebefore = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextfacebefore } { \l_@@_ref_language_tl } + \zref@default + } , + reftextafter = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextafter } { \l_@@_ref_language_tl } + \zref@default + } , + reftextbefore = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextbefore } { \l_@@_ref_language_tl } + \zref@default + } , + reftextcurrent = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextcurrent } { \l_@@_ref_language_tl } + \zref@default + } , + reftextfaraway = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextfaraway } { \l_@@_ref_language_tl } + \zref@default + } , + reftextpagerange = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextpagerange } { \l_@@_ref_language_tl } + \zref@default + } , + reftextlabelrange = + { + \msg_warning:nnxx { zref-vario } { missing-string } + { reftextlabelrange } { \l_@@_ref_language_tl } + \zref@default + } , + } } \group_end: \msg_new:nnn { zref-vario } { missing-string } @@ -558,13 +567,16 @@ % A general initial warning in case the language is altogether not set up. % % \begin{macrocode} -\AddToHook { begindocument } +\AddToHook { begindocument/before } { - \seq_if_in:NxF \g_@@_setup_languages_seq - { \@@_base_lang:e { \l_@@_ref_language_tl } } + \AddToHook { begindocument } { - \msg_warning:nnx { zref-vario } { language-not-setup } - { \l_@@_ref_language_tl } + \seq_if_in:NxF \g_@@_setup_languages_seq + { \@@_base_lang:e { \l_@@_ref_language_tl } } + { + \msg_warning:nnx { zref-vario } { language-not-setup } + { \l_@@_ref_language_tl } + } } } \msg_new:nnn { zref-vario } { language-not-setup } 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 } |