From 460879b45ff6e83765da88734e8cc0c6da5043eb Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 2 Feb 2022 03:04:47 +0000 Subject: CTAN sync 202202020304 --- macros/latex/contrib/zref-vario/CHANGELOG.md | 7 +- .../latex/contrib/zref-vario/zref-vario-code.pdf | Bin 539239 -> 538943 bytes macros/latex/contrib/zref-vario/zref-vario.dtx | 140 +++++++++++---------- macros/latex/contrib/zref-vario/zref-vario.pdf | Bin 119911 -> 121131 bytes macros/latex/contrib/zref-vario/zref-vario.tex | 23 +++- 5 files changed, 100 insertions(+), 70 deletions(-) (limited to 'macros/latex/contrib/zref-vario') diff --git a/macros/latex/contrib/zref-vario/CHANGELOG.md b/macros/latex/contrib/zref-vario/CHANGELOG.md index 7702b1e815..968785ecbf 100644 --- a/macros/latex/contrib/zref-vario/CHANGELOG.md +++ b/macros/latex/contrib/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/macros/latex/contrib/zref-vario/zref-vario-code.pdf b/macros/latex/contrib/zref-vario/zref-vario-code.pdf index 00e63f3389..88f1636636 100644 Binary files a/macros/latex/contrib/zref-vario/zref-vario-code.pdf and b/macros/latex/contrib/zref-vario/zref-vario-code.pdf differ diff --git a/macros/latex/contrib/zref-vario/zref-vario.dtx b/macros/latex/contrib/zref-vario/zref-vario.dtx index f58b39af25..9d5992f8f3 100644 --- a/macros/latex/contrib/zref-vario/zref-vario.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/zref-vario/zref-vario.pdf b/macros/latex/contrib/zref-vario/zref-vario.pdf index 8ff1c89bca..8a37e41a8d 100644 Binary files a/macros/latex/contrib/zref-vario/zref-vario.pdf and b/macros/latex/contrib/zref-vario/zref-vario.pdf differ diff --git a/macros/latex/contrib/zref-vario/zref-vario.tex b/macros/latex/contrib/zref-vario/zref-vario.tex index 522e46a207..7801d52f5d 100644 --- a/macros/latex/contrib/zref-vario/zref-vario.tex +++ b/macros/latex/contrib/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} % -- cgit v1.2.3