summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md8
-rw-r--r--Master/texmf-dist/doc/latex/zref-vario/DEPENDS.txt2
-rw-r--r--Master/texmf-dist/doc/latex/zref-vario/MANIFEST.md148
-rw-r--r--Master/texmf-dist/doc/latex/zref-vario/README.md19
-rw-r--r--Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.pdfbin0 -> 539239 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.tex52
-rw-r--r--Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdfbin0 -> 119911 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex261
-rw-r--r--Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx908
-rw-r--r--Master/texmf-dist/source/latex/zref-vario/zref-vario.ins94
-rw-r--r--Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty584
11 files changed, 2076 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md b/Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md
new file mode 100644
index 00000000000..7702b1e8151
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zref-vario/CHANGELOG.md
@@ -0,0 +1,8 @@
+# Changelog
+
+## [Unreleased]
+
+## [v0.1.0-alpha](https://github.com/gusbrs/zref-vario/releases/tag/v0.1.0-alpha) (2022-01-31)
+
+### Added
+- Initial release.
diff --git a/Master/texmf-dist/doc/latex/zref-vario/DEPENDS.txt b/Master/texmf-dist/doc/latex/zref-vario/DEPENDS.txt
new file mode 100644
index 00000000000..b593a243a79
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zref-vario/DEPENDS.txt
@@ -0,0 +1,2 @@
+hard zref-clever
+hard varioref
diff --git a/Master/texmf-dist/doc/latex/zref-vario/MANIFEST.md b/Master/texmf-dist/doc/latex/zref-vario/MANIFEST.md
new file mode 100644
index 00000000000..050277efd7b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zref-vario/MANIFEST.md
@@ -0,0 +1,148 @@
+# Manifest for zref-vario
+
+This file is a listing of all files considered to be part of this package.
+It is automatically generated with `l3build manifest`.
+
+
+## Repository manifest
+
+The following groups list the files included in the development repository of the package.
+Files listed with a ‘†’ marker are included in the TDS but not CTAN files, and files listed
+with ‘‡’ are included in both.
+
+### Source files
+
+These are source files for a number of purposes, including the `unpack` process which
+generates the installation files of the package. Additional files included here will also
+be installed for processing such as testing.
+
+* zref-vario.dtx ‡
+* zref-vario.ins ‡
+
+### Typeset documentation source files
+
+These files are typeset using LaTeX to produce the PDF documentation for the package.
+
+* zref-vario-code.tex ‡
+* zref-vario.tex ‡
+
+### Text files
+
+Plain text files included as documentation or metadata.
+
+* CHANGELOG.md ‡
+* MANIFEST.md ‡
+* README.md ‡
+* readme-ctan.md
+* DEPENDS.txt ‡
+
+### Derived files
+
+The files created by ‘unpacking’ the package sources. This typically includes
+`.sty` and `.cls` files created from DocStrip `.dtx` files.
+
+* zref-vario.sty †
+
+### Typeset documents
+
+The output files (PDF, essentially) from typesetting the various source, demo,
+etc., package files.
+
+* zref-vario-code.pdf ‡
+* zref-vario.pdf ‡
+
+### Test files
+
+These files form the test suite for the package. `.lvt` or `.lte` files are the individual
+unit tests, and `.tlg` are the stored output for ensuring changes to the package produce
+the same output. These output files are sometimes shared and sometime specific for
+different engines (pdfTeX, XeTeX, LuaTeX, etc.).
+
+* zv-basic01.lvt
+* zv-basic02.lvt
+* zv-basic03.lvt
+* zv-basic04.lvt
+* zv-hyperref01.lvt
+* zv-languages01.lvt
+* zv-zcref-options01.lvt
+* zv-basic01.luatex.tlg
+* zv-basic01.luatexdev.tlg
+* zv-basic01.tlg
+* zv-basic01.xetex.tlg
+* zv-basic01.xetexdev.tlg
+* zv-basic02.luatex.tlg
+* zv-basic02.luatexdev.tlg
+* zv-basic02.tlg
+* zv-basic02.xetex.tlg
+* zv-basic02.xetexdev.tlg
+* zv-basic03.luatex.tlg
+* zv-basic03.luatexdev.tlg
+* zv-basic03.tlg
+* zv-basic03.xetex.tlg
+* zv-basic03.xetexdev.tlg
+* zv-basic04.luatex.tlg
+* zv-basic04.luatexdev.tlg
+* zv-basic04.tlg
+* zv-basic04.xetex.tlg
+* zv-basic04.xetexdev.tlg
+* zv-hyperref01.luatex.tlg
+* zv-hyperref01.luatexdev.tlg
+* zv-hyperref01.tlg
+* zv-hyperref01.xetex.tlg
+* zv-hyperref01.xetexdev.tlg
+* zv-languages01.tlg
+* zv-zcref-options01.luatex.tlg
+* zv-zcref-options01.luatexdev.tlg
+* zv-zcref-options01.tlg
+* zv-zcref-options01.xetex.tlg
+* zv-zcref-options01.xetexdev.tlg
+
+
+## TDS manifest
+
+The following groups list the files included in the TeX Directory Structure used to install
+the package into a TeX distribution.
+
+### Source files (TDS)
+
+All files included in the `zref-vario/source` directory.
+
+* zref-vario.dtx
+* zref-vario.ins
+
+### TeX files (TDS)
+
+All files included in the `zref-vario/tex` directory.
+
+* zref-vario.sty
+
+### Doc files (TDS)
+
+All files included in the `zref-vario/doc` directory.
+
+* CHANGELOG.md
+* DEPENDS.txt
+* MANIFEST.md
+* README.md
+* zref-vario-code.pdf
+* zref-vario-code.tex
+* zref-vario.pdf
+* zref-vario.tex
+
+
+## CTAN manifest
+
+The following group lists the files included in the CTAN package.
+
+### CTAN files
+
+* CHANGELOG.md
+* DEPENDS.txt
+* MANIFEST.md
+* README.md
+* zref-vario-code.pdf
+* zref-vario-code.tex
+* zref-vario.dtx
+* zref-vario.ins
+* zref-vario.pdf
+* zref-vario.tex
diff --git a/Master/texmf-dist/doc/latex/zref-vario/README.md b/Master/texmf-dist/doc/latex/zref-vario/README.md
new file mode 100644
index 00000000000..a76d0b945c3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zref-vario/README.md
@@ -0,0 +1,19 @@
+# zref-vario
+
+**Extended LaTeX page cross-references with varioref and zref-clever**
+
+Author: Gustavo Barros
+Maintainer: Gustavo Barros
+
+`zref-vario` offers a compatibility layer for `varioref` to be used alongside
+`zref-clever`. It provides "`\z...`" counterparts to `varioref`'s main
+reference commands, each of which essentially does some (scoped) setup for
+`varioref`, then calls the original one.
+
+License: LPPL Version 1.3c
+
+Repository: https://github.com/gusbrs/zref-vario
+
+Bug tracker: https://github.com/gusbrs/zref-vario/issues
+
+CTAN: https://ctan.org/pkg/zref-vario
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
new file mode 100644
index 00000000000..00e63f3389d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.tex b/Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.tex
new file mode 100644
index 00000000000..949376f1972
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zref-vario/zref-vario-code.tex
@@ -0,0 +1,52 @@
+% \iffalse meta-comment
+%
+% File: zref-vario-code.tex
+%
+% This file is part of the LaTeX package "zref-vario".
+%
+% Copyright (C) 2022 Gustavo Barros
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file:
+%
+% https://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+%
+% This work is "maintained" (as per LPPL maintenance status) by
+% Gustavo Barros.
+%
+% This work consists of the files zref-vario.dtx,
+% zref-vario.ins,
+% zref-vario.tex,
+% zref-vario-code.tex,
+% and the files listed in MANIFEST.md.
+%
+% The released version of this package is available from CTAN.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the package can be found at
+%
+% https://github.com/gusbrs/zref-vario
+%
+% for those people who are interested.
+%
+% -----------------------------------------------------------------------
+%
+% \fi
+
+\documentclass{l3doc}
+
+% Have \GetFileInfo pick up date and version data.
+\usepackage{zref-vario}
+
+\begin{document}
+
+\DocInput{zref-vario.dtx}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdf b/Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdf
new file mode 100644
index 00000000000..8ff1c89bca0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zref-vario/zref-vario.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex b/Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex
new file mode 100644
index 00000000000..522e46a2076
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zref-vario/zref-vario.tex
@@ -0,0 +1,261 @@
+% \iffalse meta-comment
+%
+% File: zref-vario.tex
+%
+% This file is part of the LaTeX package "zref-vario".
+%
+% Copyright (C) 2022 Gustavo Barros
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file:
+%
+% https://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+%
+% This work is "maintained" (as per LPPL maintenance status) by
+% Gustavo Barros.
+%
+% This work consists of the files zref-vario.dtx,
+% zref-vario.ins,
+% zref-vario.tex,
+% zref-vario-code.tex,
+% and the files listed in MANIFEST.md.
+%
+% The released version of this package is available from CTAN.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the package can be found at
+%
+% https://github.com/gusbrs/zref-vario
+%
+% for those people who are interested.
+%
+% -----------------------------------------------------------------------
+%
+% \fi
+
+\documentclass{l3doc}
+
+% The package itself *must* be loaded so that \GetFileInfo can pick up date
+% and version data.
+\usepackage{zref-vario}
+
+\usepackage[T1]{fontenc}
+
+\usepackage[sc]{mathpazo}
+\linespread{1.05}
+\usepackage[scale=.88]{tgheros} % sans
+\usepackage[varqu,scaled=1.03]{inconsolata} % tt
+
+\usepackage{listings}
+
+\usepackage{microtype}
+
+\hypersetup{hidelinks}
+
+\NewDocumentCommand\opt{m}{\texttt{#1}}
+
+\lstdefinestyle{code}{
+ language=[LaTeX]TeX,
+ % moretexcs={
+ % }
+}
+\lstdefinestyle{zrefvario}{
+ style=code,
+ % moretexcs={
+ % }
+}
+\lstset{
+ style=zrefvario,
+ basicstyle=\ttfamily\small,
+ columns=fullflexible,
+ keepspaces,
+ xleftmargin=\leftmargin,
+ xrightmargin=.5\leftmargin,
+}
+\lstnewenvironment{zvexample}[1][]{%
+ \renewcommand{\lstlistingname}{Example}%
+ \lstset{#1}%
+}{}
+
+\begin{document}
+
+\GetFileInfo{zref-vario.sty}
+
+\title{%
+ The \pkg{zref-vario} package%
+ \thanks{This file describes \fileversion, released \filedate.}%
+ \texorpdfstring{\\{}\medskip{}}{ - }%
+ User manual%
+ \texorpdfstring{\medskip{}}{}%
+}
+
+\author{%
+ Gustavo Barros%
+ \thanks{\url{https://github.com/gusbrs/zref-vario}}%
+}
+
+\date{\filedate}
+
+\maketitle
+
+\begin{center}
+ {\bfseries \abstractname\vspace{-.5em}\vspace{0pt}}
+\end{center}
+
+\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.
+\end{quotation}
+
+\bigskip{}
+
+\begin{center}
+ \textbf{EXPERIMENTAL}
+\end{center}
+
+\tableofcontents
+
+\clearpage{}
+
+\section{Loading the package}
+
+As usual:
+
+\begin{zvexample}
+\usepackage{zref-vario}
+\end{zvexample}
+
+
+\section{Dependencies}
+
+\pkg{zref-vario} requires \pkg{varioref} and \pkg{zref-clever}.
+
+
+\section{User interface}
+
+\begin{function}{\zvref}
+ \begin{syntax}
+ \cs{zvref}\meta{*}\oarg{options}\marg{label}
+ \end{syntax}
+\end{function}
+
+\begin{function}{\zvpageref}
+ \begin{syntax}
+ \cs{zvpageref}\meta{*}\oarg{options}\marg{label}
+ \end{syntax}
+\end{function}
+
+\begin{function}{\zvrefrange}
+ \begin{syntax}
+ \cs{zvrefrange}\meta{*}\oarg{options}\marg{label}\marg{label}
+ \end{syntax}
+\end{function}
+
+\begin{function}{\zvpagerefrange}
+ \begin{syntax}
+ \cs{zvpagerefrange}\meta{*}\oarg{options}\marg{label}\marg{label}
+ \end{syntax}
+\end{function}
+
+\begin{function}{\zfullref}
+ \begin{syntax}
+ \cs{zfullref}\meta{*}\oarg{options}\marg{label}
+ \end{syntax}
+\end{function}
+
+These user commands work pretty much as their \pkg{varioref}
+counterparts.\footnote{If you are not acquainted with them, see
+ \pkg{varioref}'s documentation.} Indeed, they are just wrappers around
+them. As such, differently from \pkg{zref-clever}'s commands, these can
+receive single labels as arguments, not lists of them. In all of them the
+starred version inhibits hyperlinking, and they (locally) set \pkg{varioref}'s
+\opt{nospace} option, so that the this syntax can be used unambiguously.
+
+All of them have a single optional argument, which can receive any of
+\cs{zcref}'s options, and those are set for calls to \cs{zcref} or
+\cs{zpageref} which are part of the building blocks of the reference formats
+and strings set for \pkg{varioref}. However, there is indeed some potential
+friction and caveats stemming from the use of these options, which were
+designed to work for single calls of \cs{zcref}, to apply to \emph{pairs} of
+them. Hence, whether each and every of these options is meaningful, useful,
+or potentially harmful in this context depends on the case, and it is up to
+the user to make proper use of them. Of course, one can always split the pair
+using \cs{zcref} and then \cs{zvpageref}, \cs{zvpagerefrange}, or
+\cs{zcpageref}, and have more control over each part. Anyway, the package
+does what it says: passes the options along to the underlying call(s) to
+\cs{zcref}.\footnote{Note that the options given to each call of these user
+ macros are set \emph{before} the call to the original \pkg{varioref}
+ counterpart. This means that options given to \cs{zcref} or \cs{zpageref}
+ in the strings and formats in \cs{zvLanguageSetup} will have precedence over
+ the former. Which is useful, so that we can distinguish to some degree the
+ first from the second call of \cs{zcref}/\cs{zpageref} done in the formats,
+ but does not eliminate the limitations which arise from the underlying
+ problem.}
+
+Besides these options, two other are provided corresponding to
+\pkg{varioref}'s commands' optional arguments: \opt{vcurrent} (the first
+optional argument) and \opt{vother} (the second optional argument). Of
+course, these are only available when the underlying \pkg{varioref} command
+supports them.
+
+\section{Customization}
+
+
+\begin{function}{\zvLanguageSetup}
+ \begin{syntax}
+ \cs{zvLanguageSetup}\marg{language}\marg{options}
+ \end{syntax}
+\end{function}
+
+User interface for customization of ``strings'' and ``formats'' for
+\meta{language}. \meta{language} must be known to \pkg{zref-clever}. The
+\meta{options} are familiar to users of \pkg{varioref}:
+\opt{reftextfaceafter}, \opt{reftextfacebefore}, \opt{reftextafter},
+\opt{reftextbefore}, \opt{reftextcurrent}, \opt{reftextfaraway},
+\opt{reftextpagerange}, \opt{reftextlabelrange}, \opt{vrefformat},
+\opt{vrefrangeformat}, and \opt{fullrefformat}.\footnote{For details, see
+ \pkg{varioref}'s documentation.} Their meaning is the same as the ones they
+have in \pkg{varioref} and, indeed, they work by setting those \pkg{varioref}
+macros to the values given to the corresponding options in
+\cs{zvLanguageSetup}. If you are setting up a language which has no built-in
+support, you should set at least the whole set of ``\texttt{reftext}\dots{}''
+options. Language independent default values are provided for the
+``\dots{}\texttt{format}'' options (equivalent to the ones from
+\pkg{varioref}, which are adequate to most use cases), so you may omit them.
+But, if you need to adjust them, the default values can be overridden by
+setting the corresponding options in \cs{zvLanguageSetup}.
+
+
+% \section{Acknowledgments}
+%
+% A number of people have contributed to \pkg{zref-vario}. Suggestions,
+% ideas, solutions to problems, bug reports or even encouragement were
+% generously provided by (in chronological order):
+%
+% The package's language settings have been provided or improved thanks to:
+%
+% If I have inadvertently left anyone off the list I apologize, and please let
+% me know, so that I can correct the oversight.
+%
+% Thank you all very much!
+
+
+\section{Change history}
+
+A change log with relevant changes for each version, eventual upgrade
+instructions, and upcoming changes, is maintained in the package's repository,
+at \url{https://github.com/gusbrs/zref-vario/blob/main/CHANGELOG.md}. An
+archive of historical versions of the package is also kept at
+\url{https://github.com/gusbrs/zref-vario/releases}.
+
+\end{document}
diff --git a/Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx b/Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx
new file mode 100644
index 00000000000..f58b39af256
--- /dev/null
+++ b/Master/texmf-dist/source/latex/zref-vario/zref-vario.dtx
@@ -0,0 +1,908 @@
+% \iffalse meta-comment
+%
+% File: zref-vario.dtx
+%
+% This file is part of the LaTeX package "zref-vario".
+%
+% Copyright (C) 2022 Gustavo Barros
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file:
+%
+% https://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+%
+% This work is "maintained" (as per LPPL maintenance status) by
+% Gustavo Barros.
+%
+% This work consists of the files zref-vario.dtx,
+% zref-vario.ins,
+% zref-vario.tex,
+% zref-vario-code.tex,
+% and the files listed in MANIFEST.md.
+%
+% The released version of this package is available from CTAN.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the package can be found at
+%
+% https://github.com/gusbrs/zref-vario
+%
+% for those people who are interested.
+%
+% -----------------------------------------------------------------------
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\documentclass{l3doc}
+
+% Have \GetFileInfo pick up date and version data and used in the
+% documentation.
+\usepackage{zref-vario}
+
+\begin{document}
+
+\DocInput{zref-vario.dtx}
+
+\end{document}
+%</driver>
+% \fi
+%
+% \DoNotIndex{\\,\{,\}}
+%
+% \NewDocumentCommand\githubissue{m}{^^A
+% issue~\href{https://github.com/gusbrs/zref-vario/issues/#1}{\##1}}
+%
+% \NewDocumentCommand\githubPR{m}{^^A
+% PR~\href{https://github.com/gusbrs/zref-vario/pull/#1}{\##1}}
+%
+% ^^A Currently just for keeping semantic markup on this.
+% \NewDocumentCommand\contributor{m}{#1}
+%
+% \NewDocumentCommand\opt{m}{\texttt{#1}}
+%
+% \pdfstringdefDisableCommands{^^A
+% \def\opt#1{#1}
+% }
+%
+% ^^A Have the Index at 'section' level rather than 'part'. Otherwise it is
+% ^^A just the same definition from 'l3doc.cls'.
+% \IndexPrologue{^^A
+% \section*{Index}
+% \markboth{Index}{Index}
+% \addcontentsline{toc}{section}{Index}
+% The italic numbers denote the pages where the corresponding entry is
+% described, numbers underlined point to the definition, all others indicate
+% the places where it is used.^^A
+% }
+%
+%
+% \GetFileInfo{zref-vario.sty}
+%
+% \title{^^A
+% The \pkg{zref-vario} package^^A
+% \thanks{This file describes \fileversion, released \filedate.}^^A
+% \texorpdfstring{\\{}\medskip{}}{ - }^^A
+% Code documentation^^A
+% \texorpdfstring{\medskip{}}{}^^A
+% }
+%
+% \author{^^A
+% Gustavo Barros^^A
+% \thanks{\url{https://github.com/gusbrs/zref-vario}}^^A
+% }
+%
+% \date{\filedate}
+%
+% \maketitle
+%
+% \begin{center}
+% \textbf{EXPERIMENTAL}
+% \end{center}
+%
+%
+% \tableofcontents
+%
+% \clearpage{}
+%
+% \section{Initial setup}
+%
+% Start the \pkg{DocStrip} guards.
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% Identify the internal prefix (\LaTeX3 \pkg{DocStrip} convention).
+% \begin{macrocode}
+%<@@=zrefvario>
+% \end{macrocode}
+%
+%
+% Identify the package.
+% \begin{macrocode}
+\ProvidesExplPackage {zref-vario} {2022-01-31} {0.1.0-alpha}
+ {Extended LaTeX page cross-references with varioref and zref-clever}
+% \end{macrocode}
+%
+%
+% Required packages.
+%
+% \begin{macrocode}
+\RequirePackage { varioref }
+\RequirePackage { zref-clever } [ 2022-01-28 ] % v0.2.0-alpha
+% \end{macrocode}
+%
+%
+% \section{Customization}
+%
+% Provide some functions to define options names in a standard form.
+%
+% \begin{macro}[EXP]{\@@_ref_opt_default_cs:nn}
+% \begin{syntax}
+% \cs{@@_ref_opt_default_cs:nn} \Arg{option} \Arg{signature}
+% \end{syntax}
+% \begin{macrocode}
+\cs_new:Npn \@@_ref_opt_default_cs:nn #1#2
+ { @@_ref_opt_default_ #1 : #2 }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[EXP]{\@@_base_lang:n}
+% \begin{syntax}
+% \cs{@@_base_lang:n} \Arg{language}
+% \end{syntax}
+% \begin{macrocode}
+\cs_new:Npn \@@_base_lang:n #1
+ {
+ \zrefclever_language_if_declared:nTF {#1}
+ { \tl_use:c { \zrefclever_language_varname:n {#1} } }
+ { zv_unknown_language }
+ }
+\cs_generate_variant:Nn \@@_base_lang:n { e }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_ref_language_tl}
+% An internal version of \cs{l_zrefclever_ref_language_tl}, since we need to
+% retreive the current value of the variable in multiple places.
+% \begin{macrocode}
+\tl_new:N \l_@@_ref_language_tl
+\tl_set:Nn \l_@@_ref_language_tl { \l_zrefclever_ref_language_tl }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_ref_opt_name_lang_tl:nn}
+% \begin{syntax}
+% \cs{@@_ref_opt_name_lang_tl:nn} \Arg{lang} \Arg{option}
+% \end{syntax}
+% \begin{macrocode}
+\cs_new:Npn \@@_ref_opt_name_lang_tl:nn #1#2
+ { g_@@_ref_opt_lang_ \@@_base_lang:n {#1} _ #2 _tl }
+\cs_generate_variant:Nn \@@_ref_opt_name_lang_tl:nn { en }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\@@_ref_opt_name_lang_cs:nnn}
+% \begin{syntax}
+% \cs{@@_ref_opt_name_lang_cs:nnn} \Arg{lang} \Arg{option} \Arg{signature}
+% \end{syntax}
+% \begin{macrocode}
+\cs_new:Npn \@@_ref_opt_name_lang_cs:nnn #1#2#3
+ { @@_ref_opt_lang_ \@@_base_lang:n {#1} _ #2 : #3 }
+\cs_generate_variant:Nn \@@_ref_opt_name_lang_cs:nnn { enn }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Retrieving options values.
+%
+% \begin{macro}
+% {
+% \@@_ref_opt_tl_get:nnN ,
+% \@@_ref_opt_cs_get:nnnN ,
+% }
+% \begin{syntax}
+% \cs{@@_ref_opt_tl_get:nnN} \Arg{lang} \Arg{option} \Arg{tl var to set}
+% \cs{@@_ref_opt_cs_get:nnnN} \Arg{lang} \Arg{option}
+% ~~\Arg{cs signature} \Arg{cs to set}
+% \end{syntax}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_ref_opt_tl_get:nnN #1#2#3
+ {
+ \tl_if_exist:cTF
+ { \@@_ref_opt_name_lang_tl:nn {#1} {#2} }
+ {
+ \tl_set_eq:Nc #3
+ { \@@_ref_opt_name_lang_tl:nn {#1} {#2} }
+ }
+ {
+ \tl_set_eq:Nc #3
+ { \@@_ref_opt_name_lang_tl:nn { zv_unknown_language } {#2} }
+ }
+ }
+\cs_generate_variant:Nn \@@_ref_opt_tl_get:nnN { xnN }
+\cs_new_protected:Npn \@@_ref_opt_cs_get:nnnN #1#2#3#4
+ {
+ \cs_if_exist:cTF
+ { \@@_ref_opt_name_lang_cs:nnn {#1} {#2} {#3} }
+ {
+ \cs_set_eq:Nc #4
+ { \@@_ref_opt_name_lang_cs:nnn {#1} {#2} {#3} }
+ }
+ {
+ \cs_if_exist:cTF
+ { \@@_ref_opt_default_cs:nn {#2} {#3} }
+ {
+ \cs_set_eq:Nc #4
+ { \@@_ref_opt_default_cs:nn {#2} {#3} }
+ }
+ {
+ \cs_set_eq:Nc #4
+ {
+ \@@_ref_opt_name_lang_cs:nnn
+ { zv_unknown_language } {#2} {#3}
+ }
+ }
+ }
+ }
+\cs_generate_variant:Nn \@@_ref_opt_cs_get:nnnN { xnnN }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Handle the options set of the user commands, and add support for
+% \pkg{varioref} optional arguments. All commands can receive the same set of
+% options \cs{zcref} can, and these are processed the same way and
+% ``consumed'' by any \cs{zcref} or \cs{zcpageref} calls. Besides those,
+% \opt{vother} is made available for \cs{zvpageref}, corresponding to its
+% second optional argument, and \opt{vcurrent} which is available to all
+% commands except \cs{fullref}, corresponding to their first optional
+% arguments. The distinction between \cs{l_@@_reftextcurrent_tl} and
+% \cs{l_@@_vref_reftextcurrent_tl} is in their default/initial values. The
+% default values for the optional arguments of \cs{vpageref}, \cs{vrefrange},
+% and \cs{vpagerefrange} are set to \cs{reftextcurrent}, while the default
+% value of the optional argument of \cs{vref} is empty.
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_reftextcurrent_tl
+\tl_set:Nn \l_@@_reftextcurrent_tl { \reftextcurrent }
+\tl_new:N \l_@@_vref_reftextcurrent_tl
+\tl_new:N \l_@@_reftextother_tl
+\keys_define:nn { zref-vario/current }
+ {
+ vcurrent .code:n =
+ {
+ \tl_set:Nn \l_@@_reftextcurrent_tl {#1}
+ \tl_set:Nn \l_@@_vref_reftextcurrent_tl {#1}
+ } ,
+ vcurrent .value_required:n = true ,
+ }
+\keys_define:nn { zref-vario/other }
+ {
+ vother .tl_set:N = \l_@@_reftextother_tl ,
+ vother .value_required:n = true ,
+ }
+\keys_define:nn { }
+ {
+ zref-vario/ref .inherit:n =
+ { zref-clever/reference } ,
+ zref-vario/ref-oneoptarg .inherit:n =
+ { zref-clever/reference , zref-vario/current } ,
+ zref-vario/ref-twooptargs .inherit:n =
+ { zref-clever/reference , zref-vario/current , zref-vario/other } ,
+ }
+% \end{macrocode}
+%
+%
+% \begin{macro}[int]{\zvLanguageSetup}
+% User interface for setting ``strings'' (\texttt{reftext\dots{}} options) and
+% ``formats'' (\texttt{\dots{}format} options) for each language.
+% \begin{syntax}
+% \cs{zvLanguageSetup}\marg{language}\marg{options}
+% \end{syntax}
+% \begin{macrocode}
+\tl_new:N \l_@@_setup_language_tl
+\seq_new:N \g_@@_setup_languages_seq
+\NewDocumentCommand \zvLanguageSetup { m m }
+ {
+ \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_new:nnn { zref-vario } { unknown-language-setup }
+ {
+ Language~'#1'~is~unknown~\msg_line_context:.~Can't~set~it~up.~
+ The~language~must~be~declared~for~'zref-clever',~see~its~documentation.
+ }
+\@onlypreamble \zvLanguageSetup
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+\keys_define:nn { zref-vario/langsetup }
+ {
+ reftextfaceafter .code:n =
+ {
+ \tl_gset:cn
+ {
+ \@@_ref_opt_name_lang_tl:en
+ { \l_@@_setup_language_tl }
+ { reftextfaceafter }
+ } {#1}
+ } ,
+ reftextfacebefore .code:n =
+ {
+ \tl_gset:cn
+ {
+ \@@_ref_opt_name_lang_tl:en
+ { \l_@@_setup_language_tl }
+ { reftextfacebefore }
+ } {#1}
+ } ,
+ reftextafter .code:n =
+ {
+ \tl_gset:cn
+ {
+ \@@_ref_opt_name_lang_tl:en
+ { \l_@@_setup_language_tl }
+ { reftextafter }
+ } {#1}
+ } ,
+ reftextbefore .code:n =
+ {
+ \tl_gset:cn
+ {
+ \@@_ref_opt_name_lang_tl:en
+ { \l_@@_setup_language_tl }
+ { reftextbefore }
+ } {#1}
+ } ,
+ reftextcurrent .code:n =
+ {
+ \tl_gset:cn
+ {
+ \@@_ref_opt_name_lang_tl:en
+ { \l_@@_setup_language_tl }
+ { reftextcurrent }
+ } {#1}
+ } ,
+ reftextfaraway .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \@@_ref_opt_name_lang_cs:enn
+ { \l_@@_setup_language_tl }
+ { reftextfaraway } { n }
+ }
+ ##1
+ {#1}
+ } ,
+ reftextpagerange .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \@@_ref_opt_name_lang_cs:enn
+ { \l_@@_setup_language_tl }
+ { reftextpagerange } { nn }
+ }
+ ##1##2
+ {#1}
+ } ,
+ reftextlabelrange .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \@@_ref_opt_name_lang_cs:enn
+ { \l_@@_setup_language_tl }
+ { reftextlabelrange } { nn }
+ }
+ ##1##2
+ {#1}
+ } ,
+ vrefformat .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \@@_ref_opt_name_lang_cs:enn
+ { \l_@@_setup_language_tl }
+ { vrefformat } { nn }
+ }
+ ##1##2
+ {#1}
+ } ,
+ vrefrangeformat .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \@@_ref_opt_name_lang_cs:enn
+ { \l_@@_setup_language_tl }
+ { vrefrangeformat } { nnn }
+ }
+ ##1##2##3
+ {#1}
+ } ,
+ fullrefformat .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \@@_ref_opt_name_lang_cs:enn
+ { \l_@@_setup_language_tl }
+ { fullrefformat } { n }
+ }
+ ##1
+ {#1}
+ } ,
+ }
+% \end{macrocode}
+%
+%
+% Default reference formats for all languages. These will be used by
+% \cs{@@_ref_opt_cs_get:nnnN}, unless a language specific setting for the same
+% format has been set. \cs{zreftextfaraway} is defined so it can be called
+% with different arguments in \cs{zvpageref} (where it is alone) and in
+% \cs{zfullref} (where it is the second of the pair).
+%
+% \begin{macrocode}
+\cs_new_nopar:cpn
+ { \@@_ref_opt_default_cs:nn { vrefformat } { nn } } #1#2
+ {
+ \zcref {#2} ~
+ \zvpageref [ S=false, typeset=both, vcurrent={#1} ] {#2}
+ }
+\cs_new_nopar:cpn
+ { \@@_ref_opt_default_cs:nn { vrefrangeformat } { nnn } } #1#2#3
+ {
+ \reftextlabelrange {#2} {#3} ~
+ \zvpagerefrange [ S=false, typeset=both, vcurrent={#1} ] {#2} {#3}
+ }
+\cs_new_nopar:cpn
+ { \@@_ref_opt_default_cs:nn { fullrefformat } { n } } #1
+ {
+ \zcref {#1} ~
+ \zreftextfaraway [ S=false, typeset=both ] {#1}
+ }
+\NewDocumentCommand \zreftextfaraway { s O { } m }
+ { \zref@wrapper@babel \@@_zreftextfaraway:nnn {#3} {#1} {#2} }
+\cs_new_protected:Npn \@@_zreftextfaraway:nnn #1#2#3
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref } {#3}
+ \bool_if:nT {#2}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \@@_varioref_setup:
+ \reftextfaraway {#1}
+ \group_end:
+ }
+% \end{macrocode}
+%
+%
+% Warnings and values for missing strings / unknown languages.
+%
+% \begin{macrocode}
+\group_begin:
+\tl_set:Nn \l_@@_setup_language_tl { zv_unknown_language }
+\keys_set:nn { zref-vario/langsetup }
+ {
+ 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 }
+ { Missing~'#1'~string~for~language~'#2'~\msg_line_context:. }
+% \end{macrocode}
+%
+%
+% A general initial warning in case the language is altogether not set up.
+%
+% \begin{macrocode}
+\AddToHook { begindocument }
+ {
+ \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 }
+ {
+ Language~'#1'~is~not~set~up~for~'zref-vario'.~
+ See~documentation~for~'\iow_char:N\\zvLanguageSetup'.
+ }
+% \end{macrocode}
+%
+%
+%
+% \section{User interface}
+%
+% \begin{macro}
+% {
+% \@@_vref_pagenum:Nn ,
+% \@@_vrefpagenum:Nn ,
+% \@@_vref_label:n ,
+% }
+% These three small functions are responsible for ``connecting''
+% \pkg{varioref} with \pkg{zref}, instead of with the standard referencing
+% system. They are meant to locally replace their \pkg{varioref}
+% counterparts: \cs{vref@pagenum}, \cs{vrefpagenum}, and \cs{vref@label}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_vref_pagenum:Nn #1#2
+ {
+ \exp_args:NNNo \exp_args:NNo \tl_set:Nn #1
+ { \zref@extractdefault {#2} { page } { ?? } }
+ }
+\cs_new_protected:Npn \@@_vrefpagenum:Nn #1#2
+ {
+ \zref@refused {#2}
+ \@@_vref_pagenum:Nn #1 {#2}
+ }
+\cs_new_protected:Npn \@@_vref_label:n #1
+ { \zref@labelbyprops {#1} { page } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_varioref_setup:}
+% Sets things up for \pkg{varioref} to work with \pkg{zref}/\pkg{zref-clever}.
+% It is pretty straightforward, but it is the core of the package.
+% \cs{l_@@_varioref_setup_bool} ensures this setup runs only once in case of
+% nested calls to the package's commands.
+% \begin{macrocode}
+\bool_new:N \l_@@_varioref_setup_bool
+\cs_new_protected:Npn \@@_varioref_setup:
+ {
+ \bool_if:NF \l_@@_varioref_setup_bool
+ {
+ \bool_set_true:N \l_@@_varioref_setup_bool
+ \@vrefhandlespacefalse
+ \cs_set_eq:NN \vref@pagenum \@@_vref_pagenum:Nn
+ \cs_set_eq:NN \vrefpagenum \@@_vrefpagenum:Nn
+ \cs_set_eq:NN \vref@label \@@_vref_label:n
+ \@@_ref_opt_tl_get:xnN
+ { \l_@@_ref_language_tl }
+ { reftextfaceafter }
+ \reftextfaceafter
+ \@@_ref_opt_tl_get:xnN
+ { \l_@@_ref_language_tl }
+ { reftextfacebefore }
+ \reftextfacebefore
+ \@@_ref_opt_tl_get:xnN
+ { \l_@@_ref_language_tl }
+ { reftextafter }
+ \reftextafter
+ \@@_ref_opt_tl_get:xnN
+ { \l_@@_ref_language_tl }
+ { reftextbefore }
+ \reftextbefore
+ \@@_ref_opt_tl_get:xnN
+ { \l_@@_ref_language_tl }
+ { reftextcurrent }
+ \reftextcurrent
+ \@@_ref_opt_cs_get:xnnN
+ { \l_@@_ref_language_tl }
+ { reftextfaraway } { n }
+ \reftextfaraway
+ \@@_ref_opt_cs_get:xnnN
+ { \l_@@_ref_language_tl }
+ { reftextpagerange } { nn }
+ \reftextpagerange
+ \@@_ref_opt_cs_get:xnnN
+ { \l_@@_ref_language_tl }
+ { reftextlabelrange } { nn }
+ \reftextlabelrange
+ \@@_ref_opt_cs_get:xnnN
+ { \l_@@_ref_language_tl }
+ { vrefformat } { nn }
+ \vrefformat
+ \@@_ref_opt_cs_get:xnnN
+ { \l_@@_ref_language_tl }
+ { vrefrangeformat } { nnn }
+ \vrefrangeformat
+ \@@_ref_opt_cs_get:xnnN
+ { \l_@@_ref_language_tl }
+ { fullrefformat } { n }
+ \fullrefformat
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% User commands.
+%
+% \begin{macro}[int]{\zvref}
+% \begin{syntax}
+% \cs{zvref}\meta{*}\oarg{options}\marg{label}
+% \end{syntax}
+% \begin{macrocode}
+\NewDocumentCommand \zvref { s O { } m }
+ { \zref@wrapper@babel \@@_zvref:nnn {#3} {#1} {#2} }
+\cs_new_protected:Npn \@@_zvref:nnn #1#2#3
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref-oneoptarg } {#3}
+ \bool_if:nT {#2}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \@@_varioref_setup:
+ \@@_vref:Vn \l_@@_vref_reftextcurrent_tl {#1}
+ \group_end:
+ }
+% \end{macrocode}
+% ``Ideally'', we'd be using \cs{vref} here, but \pkg{hyperref} redefines
+% \cs{vref@star} and \cs{vr@f}, hard-coding what was supposed to be
+% configurable\dots{}, so we use \cs{vrefformat} instead, which is the
+% original definition of \cs{vref@star}, and \cs{vr@f} also boils down to
+% \cs{vref@star} when \cs{@vrefhandlespace} is false, which is our case.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_vref:nn #1#2
+ { \vrefformat {#1} {#2} }
+\cs_generate_variant:Nn \@@_vref:nn { Vn }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[int]{\zvpageref}
+% \begin{syntax}
+% \cs{zvpageref}\meta{*}\oarg{options}\marg{label}
+% \end{syntax}
+% \begin{macrocode}
+\NewDocumentCommand \zvpageref { s O { } m }
+ { \zref@wrapper@babel \@@_zvpageref:nnn {#3} {#1} {#2} }
+\cs_new_protected:Npn \@@_zvpageref:nnn #1#2#3
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref-twooptargs } {#3}
+ \bool_if:nT {#2}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \@@_varioref_setup:
+ \@@_vpageref:VVn \l_@@_reftextcurrent_tl
+ \l_@@_reftextother_tl {#1}
+ \group_end:
+ }
+\cs_new_protected:Npn \@@_vpageref:nnn #1#2#3
+ { \vpageref [{#1}] [#2] {#3} }
+\cs_generate_variant:Nn \@@_vpageref:nnn { VVn }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[int]{\zvrefrange}
+% \begin{syntax}
+% \cs{zvrefrange}\meta{*}\oarg{options}\marg{label}\marg{label}
+% \end{syntax}
+% \begin{macrocode}
+\NewDocumentCommand \zvrefrange { s O { } m m }
+ {
+ \zref@wrapper@babel
+ { \zref@wrapper@babel \@@_zvrefrange:nnnn {#3} }
+ {#4} {#1} {#2}
+ }
+\cs_new_protected:Npn \@@_zvrefrange:nnnn #1#2#3#4
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref-oneoptarg } {#4}
+ \bool_if:nT {#3}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \@@_varioref_setup:
+ \@@_vrefrange:Vnn \l_@@_reftextcurrent_tl {#1} {#2}
+ \group_end:
+ }
+\cs_new_protected:Npn \@@_vrefrange:nnn #1#2#3
+ { \vrefrange [{#1}] {#2} {#3} }
+\cs_generate_variant:Nn \@@_vrefrange:nnn { Vnn }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[int]{\zvpagerefrange}
+% \begin{syntax}
+% \cs{zvpagerefrange}\meta{*}\oarg{options}\marg{label}\marg{label}
+% \end{syntax}
+% \begin{macrocode}
+\NewDocumentCommand \zvpagerefrange { s O { } m m }
+ {
+ \zref@wrapper@babel
+ { \zref@wrapper@babel \@@_zvpagerefrange:nnnn {#3} }
+ {#4} {#1} {#2}
+ }
+\cs_new_protected:Npn \@@_zvpagerefrange:nnnn #1#2#3#4
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref-oneoptarg } {#4}
+ \bool_if:nT {#3}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \@@_varioref_setup:
+ \@@_vpagerefrange:Vnn \l_@@_reftextcurrent_tl {#1} {#2}
+ \group_end:
+ }
+\cs_new_protected:Npn \@@_vpagerefrange:nnn #1#2#3
+ { \vpagerefrange [{#1}] {#2} {#3} }
+\cs_generate_variant:Nn \@@_vpagerefrange:nnn { Vnn }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[int]{\zfullref}
+% \begin{syntax}
+% \cs{zfullref}\meta{*}\oarg{options}\marg{label}
+% \end{syntax}
+% \begin{macrocode}
+\NewDocumentCommand \zfullref { s O { } m }
+ { \zref@wrapper@babel \@@_zfullref:nnn {#3} {#1} {#2} }
+\cs_new_protected:Npn \@@_zfullref:nnn #1#2#3
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref } {#3}
+ \bool_if:nT {#2}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \@@_varioref_setup:
+ \fullref {#1}
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \section{Languages}
+%
+%
+% \begin{macrocode}
+\zvLanguageSetup { english }
+ {
+ reftextfaceafter = {on~the~\reftextvario{facing}{next}~page} ,
+ reftextfacebefore = {on~the~\reftextvario{facing}{preceding}~page} ,
+ reftextafter = {on~the~\reftextvario{following}{next}~page} ,
+ reftextbefore = {on~the~\reftextvario{preceding}{previous}~page} ,
+ reftextcurrent = {on~\reftextvario{this}{the~current}~page} ,
+ reftextfaraway = {on~\zcpageref{#1}} ,
+ reftextpagerange = {on~\zcpageref[range]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\zvLanguageSetup { german }
+ {
+ reftextfaceafter = {auf~der~nächsten~Seite} ,
+ reftextfacebefore = {auf~der~vorherigen~Seite} ,
+ reftextafter = {auf~der~nächsten~Seite} ,
+ reftextbefore = {auf~der~vorherigen~Seite} ,
+ reftextcurrent = {auf~dieser~Seite} ,
+ reftextfaraway = {auf~\zcpageref[d=D,g=f]{#1}} ,
+ reftextpagerange = {auf~den~\zcpageref[range,d=D,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\zvLanguageSetup { french }
+ {
+ reftextfaceafter = {page~\reftextvario{ci-contre}{suivante}} ,
+ reftextfacebefore = {page~\reftextvario{ci-contre}{précédente}} ,
+ reftextafter = {page~suivante} ,
+ reftextbefore = {page~précédente} ,
+ reftextcurrent = {de~la~présente~page} ,
+ reftextfaraway = {\zcpageref[g=f]{#1}} ,
+ reftextpagerange = {\zcpageref[range,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\zvLanguageSetup { portuguese }
+ {
+ reftextfaceafter = {na~\reftextvario{página~oposta}{próxima~página}} ,
+ reftextfacebefore = {na~página~\reftextvario{oposta}{anterior}} ,
+ reftextafter = {na~\reftextvario{página~seguinte}{próxima~página}} ,
+ reftextbefore = {na~página~\reftextvario{anterior}{precedente}} ,
+ reftextcurrent = {nesta~página} ,
+ reftextfaraway = {na~\zcpageref[g=f]{#1}} ,
+ reftextpagerange = {nas~\zcpageref[range,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\zvLanguageSetup { spanish }
+ {
+ reftextfaceafter = {en~la~página~siguiente} ,
+ reftextfacebefore = {en~la~página~anterior} ,
+ reftextafter = {en~la~página~siguiente} ,
+ reftextbefore = {en~la~página~anterior} ,
+ reftextcurrent = {en~esta~página} ,
+ reftextfaraway = {en~la~\zcpageref[g=f]{#1}} ,
+ reftextpagerange = {en~las~\zcpageref[range,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\zvLanguageSetup { dutch }
+ {
+ reftextfaceafter = {op~de~\reftextvario{rechter~pagina}{pagina~hiernaast}} ,
+ reftextfacebefore = {op~de~\reftextvario{linker~pagina}{pagina~hiernaast}} ,
+ reftextafter = {op~de~\reftextvario{volgende~pagina}{pagina~hierna}} ,
+ reftextbefore = {op~de~\reftextvario{vorige~pagina}{pagina~hiervoor}} ,
+ reftextcurrent = {op~deze~pagina} ,
+ reftextfaraway = {op~\zcpageref[g=f]{#1}} ,
+ reftextpagerange = {op~\zcpageref[range,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+%
+% \PrintIndex
+%
diff --git a/Master/texmf-dist/source/latex/zref-vario/zref-vario.ins b/Master/texmf-dist/source/latex/zref-vario/zref-vario.ins
new file mode 100644
index 00000000000..c04eb45c3e9
--- /dev/null
+++ b/Master/texmf-dist/source/latex/zref-vario/zref-vario.ins
@@ -0,0 +1,94 @@
+% \iffalse meta-comment
+%
+% File: zref-vario.ins
+%
+% This file is part of the LaTeX package "zref-vario".
+%
+% Copyright (C) 2022 Gustavo Barros
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file:
+%
+% https://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+%
+% This work is "maintained" (as per LPPL maintenance status) by
+% Gustavo Barros.
+%
+% This work consists of the files zref-vario.dtx,
+% zref-vario.ins,
+% zref-vario.tex,
+% zref-vario-code.tex,
+% and the files listed in MANIFEST.md.
+%
+% The released version of this package is available from CTAN.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the package can be found at
+%
+% https://github.com/gusbrs/zref-vario
+%
+% for those people who are interested.
+%
+% -----------------------------------------------------------------------
+%
+% \fi
+
+\input l3docstrip.tex
+
+\keepsilent
+
+\askforoverwritefalse
+
+\preamble
+
+This file was generated from file(s) of the LaTeX package "zref-vario".
+
+Copyright (C) 2022 Gustavo Barros
+
+It may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in the file:
+
+ https://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+
+This work is "maintained" (as per LPPL maintenance status) by
+ Gustavo Barros.
+
+This work consists of the files zref-vario.dtx,
+ zref-vario.ins,
+ zref-vario.tex,
+ zref-vario-code.tex,
+ and the files listed in MANIFEST.md.
+
+The released version of this package is available from CTAN.
+
+-----------------------------------------------------------------------
+
+The development version of the package can be found at
+
+ https://github.com/gusbrs/zref-vario
+
+for those people who are interested.
+
+-----------------------------------------------------------------------
+
+\endpreamble
+
+\postamble
+\endpostamble
+
+\generate{\file{zref-vario.sty}{\from{zref-vario.dtx}{package}}}
+
+\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty b/Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty
new file mode 100644
index 00000000000..20610f09d0c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/zref-vario/zref-vario.sty
@@ -0,0 +1,584 @@
+%%
+%% This is file `zref-vario.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% zref-vario.dtx (with options: `package')
+%%
+%% This file was generated from file(s) of the LaTeX package "zref-vario".
+%%
+%% Copyright (C) 2022 Gustavo Barros
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is in the file:
+%%
+%% https://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Gustavo Barros.
+%%
+%% This work consists of the files zref-vario.dtx,
+%% zref-vario.ins,
+%% zref-vario.tex,
+%% zref-vario-code.tex,
+%% and the files listed in MANIFEST.md.
+%%
+%% The released version of this package is available from CTAN.
+%%
+%% -----------------------------------------------------------------------
+%%
+%% The development version of the package can be found at
+%%
+%% https://github.com/gusbrs/zref-vario
+%%
+%% for those people who are interested.
+%%
+%% -----------------------------------------------------------------------
+%%
+\ProvidesExplPackage {zref-vario} {2022-01-31} {0.1.0-alpha}
+ {Extended LaTeX page cross-references with varioref and zref-clever}
+\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
+ {
+ \zrefclever_language_if_declared:nTF {#1}
+ { \tl_use:c { \zrefclever_language_varname:n {#1} } }
+ { zv_unknown_language }
+ }
+\cs_generate_variant:Nn \__zrefvario_base_lang:n { e }
+\tl_new:N \l__zrefvario_ref_language_tl
+\tl_set:Nn \l__zrefvario_ref_language_tl { \l_zrefclever_ref_language_tl }
+\cs_new:Npn \__zrefvario_ref_opt_name_lang_tl:nn #1#2
+ { g__zrefvario_ref_opt_lang_ \__zrefvario_base_lang:n {#1} _ #2 _tl }
+\cs_generate_variant:Nn \__zrefvario_ref_opt_name_lang_tl:nn { en }
+\cs_new:Npn \__zrefvario_ref_opt_name_lang_cs:nnn #1#2#3
+ { __zrefvario_ref_opt_lang_ \__zrefvario_base_lang:n {#1} _ #2 : #3 }
+\cs_generate_variant:Nn \__zrefvario_ref_opt_name_lang_cs:nnn { enn }
+\cs_new_protected:Npn \__zrefvario_ref_opt_tl_get:nnN #1#2#3
+ {
+ \tl_if_exist:cTF
+ { \__zrefvario_ref_opt_name_lang_tl:nn {#1} {#2} }
+ {
+ \tl_set_eq:Nc #3
+ { \__zrefvario_ref_opt_name_lang_tl:nn {#1} {#2} }
+ }
+ {
+ \tl_set_eq:Nc #3
+ { \__zrefvario_ref_opt_name_lang_tl:nn { zv_unknown_language } {#2} }
+ }
+ }
+\cs_generate_variant:Nn \__zrefvario_ref_opt_tl_get:nnN { xnN }
+\cs_new_protected:Npn \__zrefvario_ref_opt_cs_get:nnnN #1#2#3#4
+ {
+ \cs_if_exist:cTF
+ { \__zrefvario_ref_opt_name_lang_cs:nnn {#1} {#2} {#3} }
+ {
+ \cs_set_eq:Nc #4
+ { \__zrefvario_ref_opt_name_lang_cs:nnn {#1} {#2} {#3} }
+ }
+ {
+ \cs_if_exist:cTF
+ { \__zrefvario_ref_opt_default_cs:nn {#2} {#3} }
+ {
+ \cs_set_eq:Nc #4
+ { \__zrefvario_ref_opt_default_cs:nn {#2} {#3} }
+ }
+ {
+ \cs_set_eq:Nc #4
+ {
+ \__zrefvario_ref_opt_name_lang_cs:nnn
+ { zv_unknown_language } {#2} {#3}
+ }
+ }
+ }
+ }
+\cs_generate_variant:Nn \__zrefvario_ref_opt_cs_get:nnnN { xnnN }
+\tl_new:N \l__zrefvario_reftextcurrent_tl
+\tl_set:Nn \l__zrefvario_reftextcurrent_tl { \reftextcurrent }
+\tl_new:N \l__zrefvario_vref_reftextcurrent_tl
+\tl_new:N \l__zrefvario_reftextother_tl
+\keys_define:nn { zref-vario/current }
+ {
+ vcurrent .code:n =
+ {
+ \tl_set:Nn \l__zrefvario_reftextcurrent_tl {#1}
+ \tl_set:Nn \l__zrefvario_vref_reftextcurrent_tl {#1}
+ } ,
+ vcurrent .value_required:n = true ,
+ }
+\keys_define:nn { zref-vario/other }
+ {
+ vother .tl_set:N = \l__zrefvario_reftextother_tl ,
+ vother .value_required:n = true ,
+ }
+\keys_define:nn { }
+ {
+ zref-vario/ref .inherit:n =
+ { zref-clever/reference } ,
+ zref-vario/ref-oneoptarg .inherit:n =
+ { zref-clever/reference , zref-vario/current } ,
+ zref-vario/ref-twooptargs .inherit:n =
+ { zref-clever/reference , zref-vario/current , zref-vario/other } ,
+ }
+\tl_new:N \l__zrefvario_setup_language_tl
+\seq_new:N \g__zrefvario_setup_languages_seq
+\NewDocumentCommand \zvLanguageSetup { m m }
+ {
+ \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_new:nnn { zref-vario } { unknown-language-setup }
+ {
+ Language~'#1'~is~unknown~\msg_line_context:.~Can't~set~it~up.~
+ The~language~must~be~declared~for~'zref-clever',~see~its~documentation.
+ }
+\@onlypreamble \zvLanguageSetup
+\keys_define:nn { zref-vario/langsetup }
+ {
+ reftextfaceafter .code:n =
+ {
+ \tl_gset:cn
+ {
+ \__zrefvario_ref_opt_name_lang_tl:en
+ { \l__zrefvario_setup_language_tl }
+ { reftextfaceafter }
+ } {#1}
+ } ,
+ reftextfacebefore .code:n =
+ {
+ \tl_gset:cn
+ {
+ \__zrefvario_ref_opt_name_lang_tl:en
+ { \l__zrefvario_setup_language_tl }
+ { reftextfacebefore }
+ } {#1}
+ } ,
+ reftextafter .code:n =
+ {
+ \tl_gset:cn
+ {
+ \__zrefvario_ref_opt_name_lang_tl:en
+ { \l__zrefvario_setup_language_tl }
+ { reftextafter }
+ } {#1}
+ } ,
+ reftextbefore .code:n =
+ {
+ \tl_gset:cn
+ {
+ \__zrefvario_ref_opt_name_lang_tl:en
+ { \l__zrefvario_setup_language_tl }
+ { reftextbefore }
+ } {#1}
+ } ,
+ reftextcurrent .code:n =
+ {
+ \tl_gset:cn
+ {
+ \__zrefvario_ref_opt_name_lang_tl:en
+ { \l__zrefvario_setup_language_tl }
+ { reftextcurrent }
+ } {#1}
+ } ,
+ reftextfaraway .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \__zrefvario_ref_opt_name_lang_cs:enn
+ { \l__zrefvario_setup_language_tl }
+ { reftextfaraway } { n }
+ }
+ ##1
+ {#1}
+ } ,
+ reftextpagerange .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \__zrefvario_ref_opt_name_lang_cs:enn
+ { \l__zrefvario_setup_language_tl }
+ { reftextpagerange } { nn }
+ }
+ ##1##2
+ {#1}
+ } ,
+ reftextlabelrange .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \__zrefvario_ref_opt_name_lang_cs:enn
+ { \l__zrefvario_setup_language_tl }
+ { reftextlabelrange } { nn }
+ }
+ ##1##2
+ {#1}
+ } ,
+ vrefformat .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \__zrefvario_ref_opt_name_lang_cs:enn
+ { \l__zrefvario_setup_language_tl }
+ { vrefformat } { nn }
+ }
+ ##1##2
+ {#1}
+ } ,
+ vrefrangeformat .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \__zrefvario_ref_opt_name_lang_cs:enn
+ { \l__zrefvario_setup_language_tl }
+ { vrefrangeformat } { nnn }
+ }
+ ##1##2##3
+ {#1}
+ } ,
+ fullrefformat .code:n =
+ {
+ \cs_gset_nopar:cpn
+ {
+ \__zrefvario_ref_opt_name_lang_cs:enn
+ { \l__zrefvario_setup_language_tl }
+ { fullrefformat } { n }
+ }
+ ##1
+ {#1}
+ } ,
+ }
+\cs_new_nopar:cpn
+ { \__zrefvario_ref_opt_default_cs:nn { vrefformat } { nn } } #1#2
+ {
+ \zcref {#2} ~
+ \zvpageref [ S=false, typeset=both, vcurrent={#1} ] {#2}
+ }
+\cs_new_nopar:cpn
+ { \__zrefvario_ref_opt_default_cs:nn { vrefrangeformat } { nnn } } #1#2#3
+ {
+ \reftextlabelrange {#2} {#3} ~
+ \zvpagerefrange [ S=false, typeset=both, vcurrent={#1} ] {#2} {#3}
+ }
+\cs_new_nopar:cpn
+ { \__zrefvario_ref_opt_default_cs:nn { fullrefformat } { n } } #1
+ {
+ \zcref {#1} ~
+ \zreftextfaraway [ S=false, typeset=both ] {#1}
+ }
+\NewDocumentCommand \zreftextfaraway { s O { } m }
+ { \zref@wrapper@babel \__zrefvario_zreftextfaraway:nnn {#3} {#1} {#2} }
+\cs_new_protected:Npn \__zrefvario_zreftextfaraway:nnn #1#2#3
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref } {#3}
+ \bool_if:nT {#2}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \__zrefvario_varioref_setup:
+ \reftextfaraway {#1}
+ \group_end:
+ }
+\group_begin:
+\tl_set:Nn \l__zrefvario_setup_language_tl { zv_unknown_language }
+\keys_set:nn { zref-vario/langsetup }
+ {
+ 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 }
+ {
+ \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 }
+ {
+ Language~'#1'~is~not~set~up~for~'zref-vario'.~
+ See~documentation~for~'\iow_char:N\\zvLanguageSetup'.
+ }
+\cs_new_protected:Npn \__zrefvario_vref_pagenum:Nn #1#2
+ {
+ \exp_args:NNNo \exp_args:NNo \tl_set:Nn #1
+ { \zref@extractdefault {#2} { page } { ?? } }
+ }
+\cs_new_protected:Npn \__zrefvario_vrefpagenum:Nn #1#2
+ {
+ \zref@refused {#2}
+ \__zrefvario_vref_pagenum:Nn #1 {#2}
+ }
+\cs_new_protected:Npn \__zrefvario_vref_label:n #1
+ { \zref@labelbyprops {#1} { page } }
+\bool_new:N \l__zrefvario_varioref_setup_bool
+\cs_new_protected:Npn \__zrefvario_varioref_setup:
+ {
+ \bool_if:NF \l__zrefvario_varioref_setup_bool
+ {
+ \bool_set_true:N \l__zrefvario_varioref_setup_bool
+ \@vrefhandlespacefalse
+ \cs_set_eq:NN \vref@pagenum \__zrefvario_vref_pagenum:Nn
+ \cs_set_eq:NN \vrefpagenum \__zrefvario_vrefpagenum:Nn
+ \cs_set_eq:NN \vref@label \__zrefvario_vref_label:n
+ \__zrefvario_ref_opt_tl_get:xnN
+ { \l__zrefvario_ref_language_tl }
+ { reftextfaceafter }
+ \reftextfaceafter
+ \__zrefvario_ref_opt_tl_get:xnN
+ { \l__zrefvario_ref_language_tl }
+ { reftextfacebefore }
+ \reftextfacebefore
+ \__zrefvario_ref_opt_tl_get:xnN
+ { \l__zrefvario_ref_language_tl }
+ { reftextafter }
+ \reftextafter
+ \__zrefvario_ref_opt_tl_get:xnN
+ { \l__zrefvario_ref_language_tl }
+ { reftextbefore }
+ \reftextbefore
+ \__zrefvario_ref_opt_tl_get:xnN
+ { \l__zrefvario_ref_language_tl }
+ { reftextcurrent }
+ \reftextcurrent
+ \__zrefvario_ref_opt_cs_get:xnnN
+ { \l__zrefvario_ref_language_tl }
+ { reftextfaraway } { n }
+ \reftextfaraway
+ \__zrefvario_ref_opt_cs_get:xnnN
+ { \l__zrefvario_ref_language_tl }
+ { reftextpagerange } { nn }
+ \reftextpagerange
+ \__zrefvario_ref_opt_cs_get:xnnN
+ { \l__zrefvario_ref_language_tl }
+ { reftextlabelrange } { nn }
+ \reftextlabelrange
+ \__zrefvario_ref_opt_cs_get:xnnN
+ { \l__zrefvario_ref_language_tl }
+ { vrefformat } { nn }
+ \vrefformat
+ \__zrefvario_ref_opt_cs_get:xnnN
+ { \l__zrefvario_ref_language_tl }
+ { vrefrangeformat } { nnn }
+ \vrefrangeformat
+ \__zrefvario_ref_opt_cs_get:xnnN
+ { \l__zrefvario_ref_language_tl }
+ { fullrefformat } { n }
+ \fullrefformat
+ }
+ }
+\NewDocumentCommand \zvref { s O { } m }
+ { \zref@wrapper@babel \__zrefvario_zvref:nnn {#3} {#1} {#2} }
+\cs_new_protected:Npn \__zrefvario_zvref:nnn #1#2#3
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref-oneoptarg } {#3}
+ \bool_if:nT {#2}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \__zrefvario_varioref_setup:
+ \__zrefvario_vref:Vn \l__zrefvario_vref_reftextcurrent_tl {#1}
+ \group_end:
+ }
+\cs_new_protected:Npn \__zrefvario_vref:nn #1#2
+ { \vrefformat {#1} {#2} }
+\cs_generate_variant:Nn \__zrefvario_vref:nn { Vn }
+\NewDocumentCommand \zvpageref { s O { } m }
+ { \zref@wrapper@babel \__zrefvario_zvpageref:nnn {#3} {#1} {#2} }
+\cs_new_protected:Npn \__zrefvario_zvpageref:nnn #1#2#3
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref-twooptargs } {#3}
+ \bool_if:nT {#2}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \__zrefvario_varioref_setup:
+ \__zrefvario_vpageref:VVn \l__zrefvario_reftextcurrent_tl
+ \l__zrefvario_reftextother_tl {#1}
+ \group_end:
+ }
+\cs_new_protected:Npn \__zrefvario_vpageref:nnn #1#2#3
+ { \vpageref [{#1}] [#2] {#3} }
+\cs_generate_variant:Nn \__zrefvario_vpageref:nnn { VVn }
+\NewDocumentCommand \zvrefrange { s O { } m m }
+ {
+ \zref@wrapper@babel
+ { \zref@wrapper@babel \__zrefvario_zvrefrange:nnnn {#3} }
+ {#4} {#1} {#2}
+ }
+\cs_new_protected:Npn \__zrefvario_zvrefrange:nnnn #1#2#3#4
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref-oneoptarg } {#4}
+ \bool_if:nT {#3}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \__zrefvario_varioref_setup:
+ \__zrefvario_vrefrange:Vnn \l__zrefvario_reftextcurrent_tl {#1} {#2}
+ \group_end:
+ }
+\cs_new_protected:Npn \__zrefvario_vrefrange:nnn #1#2#3
+ { \vrefrange [{#1}] {#2} {#3} }
+\cs_generate_variant:Nn \__zrefvario_vrefrange:nnn { Vnn }
+\NewDocumentCommand \zvpagerefrange { s O { } m m }
+ {
+ \zref@wrapper@babel
+ { \zref@wrapper@babel \__zrefvario_zvpagerefrange:nnnn {#3} }
+ {#4} {#1} {#2}
+ }
+\cs_new_protected:Npn \__zrefvario_zvpagerefrange:nnnn #1#2#3#4
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref-oneoptarg } {#4}
+ \bool_if:nT {#3}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \__zrefvario_varioref_setup:
+ \__zrefvario_vpagerefrange:Vnn \l__zrefvario_reftextcurrent_tl {#1} {#2}
+ \group_end:
+ }
+\cs_new_protected:Npn \__zrefvario_vpagerefrange:nnn #1#2#3
+ { \vpagerefrange [{#1}] {#2} {#3} }
+\cs_generate_variant:Nn \__zrefvario_vpagerefrange:nnn { Vnn }
+\NewDocumentCommand \zfullref { s O { } m }
+ { \zref@wrapper@babel \__zrefvario_zfullref:nnn {#3} {#1} {#2} }
+\cs_new_protected:Npn \__zrefvario_zfullref:nnn #1#2#3
+ {
+ \group_begin:
+ \keys_set:nn { zref-vario/ref } {#3}
+ \bool_if:nT {#2}
+ { \keys_set:nn { zref-vario/ref } { nohyperref } }
+ \__zrefvario_varioref_setup:
+ \fullref {#1}
+ \group_end:
+ }
+\zvLanguageSetup { english }
+ {
+ reftextfaceafter = {on~the~\reftextvario{facing}{next}~page} ,
+ reftextfacebefore = {on~the~\reftextvario{facing}{preceding}~page} ,
+ reftextafter = {on~the~\reftextvario{following}{next}~page} ,
+ reftextbefore = {on~the~\reftextvario{preceding}{previous}~page} ,
+ reftextcurrent = {on~\reftextvario{this}{the~current}~page} ,
+ reftextfaraway = {on~\zcpageref{#1}} ,
+ reftextpagerange = {on~\zcpageref[range]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+\zvLanguageSetup { german }
+ {
+ reftextfaceafter = {auf~der~nächsten~Seite} ,
+ reftextfacebefore = {auf~der~vorherigen~Seite} ,
+ reftextafter = {auf~der~nächsten~Seite} ,
+ reftextbefore = {auf~der~vorherigen~Seite} ,
+ reftextcurrent = {auf~dieser~Seite} ,
+ reftextfaraway = {auf~\zcpageref[d=D,g=f]{#1}} ,
+ reftextpagerange = {auf~den~\zcpageref[range,d=D,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+\zvLanguageSetup { french }
+ {
+ reftextfaceafter = {page~\reftextvario{ci-contre}{suivante}} ,
+ reftextfacebefore = {page~\reftextvario{ci-contre}{précédente}} ,
+ reftextafter = {page~suivante} ,
+ reftextbefore = {page~précédente} ,
+ reftextcurrent = {de~la~présente~page} ,
+ reftextfaraway = {\zcpageref[g=f]{#1}} ,
+ reftextpagerange = {\zcpageref[range,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+\zvLanguageSetup { portuguese }
+ {
+ reftextfaceafter = {na~\reftextvario{página~oposta}{próxima~página}} ,
+ reftextfacebefore = {na~página~\reftextvario{oposta}{anterior}} ,
+ reftextafter = {na~\reftextvario{página~seguinte}{próxima~página}} ,
+ reftextbefore = {na~página~\reftextvario{anterior}{precedente}} ,
+ reftextcurrent = {nesta~página} ,
+ reftextfaraway = {na~\zcpageref[g=f]{#1}} ,
+ reftextpagerange = {nas~\zcpageref[range,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+\zvLanguageSetup { spanish }
+ {
+ reftextfaceafter = {en~la~página~siguiente} ,
+ reftextfacebefore = {en~la~página~anterior} ,
+ reftextafter = {en~la~página~siguiente} ,
+ reftextbefore = {en~la~página~anterior} ,
+ reftextcurrent = {en~esta~página} ,
+ reftextfaraway = {en~la~\zcpageref[g=f]{#1}} ,
+ reftextpagerange = {en~las~\zcpageref[range,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+\zvLanguageSetup { dutch }
+ {
+ reftextfaceafter = {op~de~\reftextvario{rechter~pagina}{pagina~hiernaast}} ,
+ reftextfacebefore = {op~de~\reftextvario{linker~pagina}{pagina~hiernaast}} ,
+ reftextafter = {op~de~\reftextvario{volgende~pagina}{pagina~hierna}} ,
+ reftextbefore = {op~de~\reftextvario{vorige~pagina}{pagina~hiervoor}} ,
+ reftextcurrent = {op~deze~pagina} ,
+ reftextfaraway = {op~\zcpageref[g=f]{#1}} ,
+ reftextpagerange = {op~\zcpageref[range,g=f]{#1,#2}} ,
+ reftextlabelrange = {\zcref[range]{#1,#2}} ,
+ }
+%%
+%%
+%% End of file `zref-vario.sty'.