[latex3-commits] [git/LaTeX3-latex3-latex2e] gh352: fix for #352 (952651ad)
Frank Mittelbach
frank.mittelbach at latex-project.org
Mon Jul 20 15:43:53 CEST 2020
Repository : https://github.com/latex3/latex2e
On branch : gh352
Link : https://github.com/latex3/latex2e/commit/952651adb565f283ad3ec5641e477eb3cad0899d
>---------------------------------------------------------------
commit 952651adb565f283ad3ec5641e477eb3cad0899d
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Jul 20 15:43:53 2020 +0200
fix for #352
>---------------------------------------------------------------
952651adb565f283ad3ec5641e477eb3cad0899d
base/doc/ltnews32.tex | 12 +-
required/tools/changes.txt | 5 +
required/tools/testfiles-TU/github-0352.luatex.tlg | 226 +++++++++++++++++++++
required/tools/testfiles-TU/github-0352.lvt | 39 ++++
required/tools/testfiles-TU/github-0352.tlg | 140 +++++++++++++
required/tools/varioref.dtx | 87 +++++++-
6 files changed, 501 insertions(+), 8 deletions(-)
diff --git a/base/doc/ltnews32.tex b/base/doc/ltnews32.tex
index 1befde91..8de273ba 100644
--- a/base/doc/ltnews32.tex
+++ b/base/doc/ltnews32.tex
@@ -640,13 +640,15 @@ in such documents.
%
\githubissue{297}
-\subsection{\pkg{xr}: Support for spaces in filenames}
+\subsection{\pkg{varioref}: Support Japanese as a language option}
-The commannd \cs{externaldocument}, provided by \pkg{xr}, now also
-supports filenames with spaces, just like \cs{include} and
-\cs{includeonly}.
+The package now recognizes \texttt{japanese} as a language option.
+The extra complication is that for gramatical reasons \cs{vrefrange}
+needs a structure different from all other languages currently
+supported. To accomodate for this \cs{vrefrangeformat} was added to
+all languages.
%
-\githubissue{223}
+\githubissue{352}
\section{Changes to packages in the \pkg{amsmath} category}
diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index 53c22c82..aafc20b5 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -5,6 +5,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2020-07-20 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * varioref.dtx (subsection{Options}):
+ Option japanese added (gh/352)
+
2020-06-06 Johannes Braams <Johannes.Braams at latex-project.org>
* verbatim.dtx: Save the value if \@filef at und before the call to
diff --git a/required/tools/testfiles-TU/github-0352.luatex.tlg b/required/tools/testfiles-TU/github-0352.luatex.tlg
new file mode 100644
index 00000000..4b3d5c22
--- /dev/null
+++ b/required/tools/testfiles-TU/github-0352.luatex.tlg
@@ -0,0 +1,226 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+[1
+] [2] [3]
+! Undefined control sequence.
+l. ...Pageref B: \vrefpageref
+ {B}.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+Completed box being shipped out [4]
+\vbox(633.0+0.0)x407.0, direction TLT
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0, direction TLT
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil, direction TLT
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0, direction TLT
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 491.94745fil, direction TLT
+...\glue(\topskip) 2.84
+...\hbox(7.16+0.22)x345.0, glue set 279.28998fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\TU/lmr/m/n/10 R
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 f
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 :
+....\penalty 10000
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 1
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\write1{\newlabel{1 at xvr}{{}{\thepage }}}
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 1
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\TU/lmr/m/n/10 頁
+....\TU/lmr/m/n/10
+....\write1{\newlabel{1 at vr}{{}{\thepage }}}
+....\TU/lmr/m/n/10 .
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 4.73
+...\hbox(7.05+2.06)x345.0, glue set 271.22998fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\TU/lmr/m/n/10 P
+....\kern-0.28 (font)
+....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 g
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 r
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 f
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 B
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 B
+....\TU/lmr/m/n/10 .
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 2.89
+...\hbox(7.05+0.22)x345.0, glue set 281.76999fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\TU/lmr/m/n/10 R
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 f
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 C
+....\TU/lmr/m/n/10 :
+....\penalty 10000
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 3
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\write1{\newlabel{2 at xvr}{{}{\thepage }}}
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 前
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 頁
+....\TU/lmr/m/n/10
+....\write1{\newlabel{2 at vr}{{}{\thepage }}}
+....\TU/lmr/m/n/10 .
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 4.62
+...\hbox(7.16+2.06)x345.0, glue set 232.23997fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\TU/lmr/m/n/10 R
+....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 n
+....\TU/lmr/m/n/10 g
+....\TU/lmr/m/n/10 e
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 A
+....\discretionary (penalty 50)
+.....< \TU/lmr/m/n/10 -
+.....= \TU/lmr/m/n/10 -
+....\TU/lmr/m/n/10 C
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 1
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\TU/lmr/m/n/10 か
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 ら
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 3
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 1
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\TU/lmr/m/n/10 頁
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 か
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 ら
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 3
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\TU/lmr/m/n/10 頁
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 .
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 2.89
+...\hbox(7.05+2.06)x345.0, glue set 232.65997fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\TU/lmr/m/n/10 R
+....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 n
+....\TU/lmr/m/n/10 g
+....\TU/lmr/m/n/10 e
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 B
+....\discretionary (penalty 50)
+.....< \TU/lmr/m/n/10 -
+.....= \TU/lmr/m/n/10 -
+....\TU/lmr/m/n/10 C
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 2
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\TU/lmr/m/n/10 か
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 ら
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 3
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 2
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\TU/lmr/m/n/10 頁
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 か
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 ら
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 3
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\TU/lmr/m/n/10 頁
+....\TU/lmr/m/n/10
+....\TU/lmr/m/n/10 .
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -2.06
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.23
+..\hbox(6.77+0.0)x345.0, glue set 170.0fil, direction TLT
+...\glue 0.0 plus 1.0fil
+...\TU/lmr/m/n/10 4
+...\glue 0.0 plus 1.0fil
+Missing character: There is no 頁 (U+9801) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no 前 (U+524D) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no 頁 (U+9801) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no か (U+304B) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no ら (U+3089) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no 頁 (U+9801) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no か (U+304B) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no ら (U+3089) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no 頁 (U+9801) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no か (U+304B) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no ら (U+3089) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no 頁 (U+9801) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no か (U+304B) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no ら (U+3089) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no 頁 (U+9801) in font [lmroman10-regular]:+tlig;!
+(github-0352.aux)
diff --git a/required/tools/testfiles-TU/github-0352.lvt b/required/tools/testfiles-TU/github-0352.lvt
new file mode 100644
index 00000000..fdb7b8a7
--- /dev/null
+++ b/required/tools/testfiles-TU/github-0352.lvt
@@ -0,0 +1,39 @@
+% see also issue 0205
+
+\documentclass{article}
+
+\usepackage[japanese]{varioref}
+
+\input{test2e}
+
+\begin{document}
+
+\START
+
+\section{A}\label{A}
+
+\newpage
+
+\section{B} \label{B}
+
+\newpage
+
+\section{C} \label{C}
+
+\newpage
+
+\showoutput
+
+Ref A: \vref{A}.
+
+Pageref B: \vrefpageref{B}.
+
+Ref C: \vref{C}.
+
+Range A-C: \vrefrange{A}{C}.
+
+
+Range B-C: \vrefrange{B}{C}.
+
+\end{document}
+
diff --git a/required/tools/testfiles-TU/github-0352.tlg b/required/tools/testfiles-TU/github-0352.tlg
new file mode 100644
index 00000000..4657bed9
--- /dev/null
+++ b/required/tools/testfiles-TU/github-0352.tlg
@@ -0,0 +1,140 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+[1
+] [2] [3]
+Missing character: There is no 頁 in font [lmroman10-regular]:mapping=tex-text;!
+! Undefined control sequence.
+l. ...Pageref B: \vrefpageref
+ {B}.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+Missing character: There is no 前 in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no 頁 in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no か in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no ら in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no 頁 in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no か in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no ら in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no 頁 in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no か in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no ら in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no 頁 in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no か in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no ら in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no 頁 in font [lmroman10-regular]:mapping=tex-text;!
+Completed box being shipped out [4]
+\vbox(633.0+0.0)x407.0
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 491.94745fil
+...\glue(\topskip) 2.84
+...\hbox(7.16+0.21999)x345.0, glue set 279.29fil
+....\hbox(0.0+0.0)x15.0
+....\TU/lmr/m/n/10 Ref
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 A:
+....\penalty 10000
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 1
+....\hbox(0.0+0.0)x0.0
+....\write1{\newlabel{1 at xvr}{{}{\thepage }}}
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 1
+....\hbox(0.0+0.0)x0.0
+....\TU/lmr/m/n/10 頁
+....\write1{\newlabel{1 at vr}{{}{\thepage }}}
+....\TU/lmr/m/n/10 .
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 4.73001
+...\hbox(7.05+2.05998)x345.0, glue set 271.23fil
+....\hbox(0.0+0.0)x15.0
+....\TU/lmr/m/n/10 Pageref
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 B:
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 B.
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 2.89001
+...\hbox(7.05+0.21999)x345.0, glue set 281.76999fil
+....\hbox(0.0+0.0)x15.0
+....\TU/lmr/m/n/10 Ref
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 C:
+....\penalty 10000
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 3
+....\hbox(0.0+0.0)x0.0
+....\write1{\newlabel{2 at xvr}{{}{\thepage }}}
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 前頁
+....\write1{\newlabel{2 at vr}{{}{\thepage }}}
+....\TU/lmr/m/n/10 .
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 4.62001
+...\hbox(7.16+2.05998)x345.0, glue set 232.23999fil
+....\hbox(0.0+0.0)x15.0
+....\TU/lmr/m/n/10 Range
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 A-C:
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 1
+....\hbox(0.0+0.0)x0.0
+....\TU/lmr/m/n/10 から3
+....\hbox(0.0+0.0)x0.0
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 1
+....\hbox(0.0+0.0)x0.0
+....\TU/lmr/m/n/10 頁から3
+....\hbox(0.0+0.0)x0.0
+....\TU/lmr/m/n/10 頁.
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 2.89001
+...\hbox(7.05+2.05998)x345.0, glue set 232.65999fil
+....\hbox(0.0+0.0)x15.0
+....\TU/lmr/m/n/10 Range
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 B-C:
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 2
+....\hbox(0.0+0.0)x0.0
+....\TU/lmr/m/n/10 から3
+....\hbox(0.0+0.0)x0.0
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 2
+....\hbox(0.0+0.0)x0.0
+....\TU/lmr/m/n/10 頁から3
+....\hbox(0.0+0.0)x0.0
+....\TU/lmr/m/n/10 頁.
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -2.05998
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.23
+..\hbox(6.77+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\TU/lmr/m/n/10 4
+...\glue 0.0 plus 1.0fil
+(github-0352.aux)
diff --git a/required/tools/varioref.dtx b/required/tools/varioref.dtx
index 077103eb..06af00bc 100644
--- a/required/tools/varioref.dtx
+++ b/required/tools/varioref.dtx
@@ -40,7 +40,7 @@
%<package>\DeclareCurrentRelease{}{2019-10-01}
%<package>
%<package>\ProvidesPackage{varioref}
-%<package> [2020/01/23 v1.6c package for extended references (FMi)]
+%<package> [2020/07/20 v1.6d package for extended references (FMi)]
% \fi
%
%%
@@ -230,6 +230,11 @@
% The optional argument the command may take is the text to use in case
% both labels are placed on the current page.
%
+% In some languages (currently only for Japanese) the generated text
+% has to typeset the page range first and the reference range
+% afterwards. To accomodate for this \cs{vrefrangeformat} has been
+% added to allow to alter this on a per language basis.
+%
%
% \DescribeMacro\vpagerefrange This command is similar to |\vpageref|
% but takes two mandatory arguments which are two labels denoting a
@@ -708,6 +713,7 @@
\def\reftextfaraway#1{op bladsy~\pageref{#1}}%
\def\reftextpagerange#1#2{op bladsye~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} tot~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
%
@@ -723,6 +729,7 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Arabic option text was contributed by Ihab Samir Mattar
@@ -743,6 +750,7 @@
\def\reftextfaraway#1{بالصفحة رقم~\pageref{#1}}%
\def\reftextpagerange#1#2{بالصفحات~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} حتى~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \end{allowtofu}
@@ -759,6 +767,7 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2d}{2000/01/11}{Added naustrian defaults (identical to german)}
@@ -774,6 +783,7 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for basque defaults was contributed by
@@ -791,6 +801,7 @@
\def\reftextfaraway#1{~\pageref{#1}. orrialdean}%
\def\reftextpagerange#1#2{~\pageref{#1}--\pageref{#2} orrialdeetan}%
\def\reftextlabelrange#1#2{\ref{#1}.etik \ref{#2}.eraino}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for the Bahasa Malaysia defaults was contributed by
@@ -815,6 +826,7 @@
\def\reftextfaraway#1{pada muka surat~\pageref{#1}}%
\def\reftextpagerange#1#2{pada muka surat~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for brazil defaults was contributed by
@@ -837,6 +849,7 @@
\def\reftextfaraway#1{na p\'agina~\pageref{#1}}%
\def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for Breton defaults was contributed by
@@ -858,6 +871,7 @@
on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\vref at stringwarning\reflabelpagerange
\ref{#1} to~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for Bulgarian defaults was contributed by
@@ -892,6 +906,7 @@
\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyri
~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \cyrd\cyro~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for catalan defaults was contributed by Robert Fuster\\
@@ -910,6 +925,7 @@
\def\reftextpagerange#1#2{a les
p\`agines~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for croatian defaults was contributed by \v{S}ime Ungar
@@ -926,6 +942,7 @@
\def\reftextfaraway#1{na stranici~\pageref{#1}}%
\def\reftextpagerange#1#2{na stranicama~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} do~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for the Czech option provided by Milan Vancura
@@ -943,6 +960,7 @@
\def\reftextfaraway#1{na stran\v{e}~\pageref{#1}}%
\def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}\--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a\v{z}~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for Danish provided by Torsten Martinsen
@@ -965,6 +983,7 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Default string for dutch have been contributed by Frank Poppe
@@ -1004,6 +1023,7 @@
% \begin{macrocode}
\def\reftextpagerange#1#2{op pagina's~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2a}{1998/08/22}{Added english defaults for
@@ -1021,6 +1041,7 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
%
@@ -1041,6 +1062,7 @@
\def\reftextfaraway#1{en pa\^go~\pageref{#1}}%
\def\reftextpagerange#1#2{en pa\^goj~\pageref{#1} \^gis \pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \^gis~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The finnish strings were suggested by Matti Rintala
@@ -1064,6 +1086,7 @@
% Can't combine numbers with the necessary suffix well.
% \begin{macrocode}
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% French defaults are provided by Daniel Flippo
@@ -1083,6 +1106,7 @@
\def\reftextfaraway#1{page~\pageref{#1}}%
\def\reftextpagerange#1#2{pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \`a~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Galician defaults are provided by Matthias Moebius\\
@@ -1104,6 +1128,7 @@
\def\reftextpagerange#1#2{%
nas p\'axinas~\pageref{#1}-\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% There are no good variants for German (I think and still think but
@@ -1138,6 +1163,7 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2d}{2000/01/11}{Added ngerman defaults (identical to german)}
@@ -1155,6 +1181,7 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for greek suggested by Apostolos Syropoulos\\
@@ -1174,6 +1201,7 @@
\def\reftextpagerange#1#2{stis sel'ides\nobreakspace
\pageref{#1}---\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} ws\nobreakspace\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Icelandic defaults suggested by Thorhallur Sverrisson
@@ -1194,6 +1222,7 @@
\def\reftextfaraway#1{\'{a} s\'{i}{\dh}u~\pageref{#1}}%
\def\reftextpagerange#1#2{\'{a} s\'{i}{\dh}um~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for Italian suggested by Giovanni Pensa
@@ -1218,8 +1247,32 @@
\def\reftextfaraway#1{a pagina~\pageref{#1}}%
\def\reftextpagerange#1#2{nelle pagine~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{da~\ref{#1} a~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
+ }}
+% \end{macrocode}
+% Defaults for Japanese. It needs a special \cs{vrefrangeformat}
+% for gramatical reasons. As our standard documentation
+% workflow uses pdf\TeX{} the Japanese letters can't be displayed
+% easily, so you will see missing glyphs below. To see the real
+% letters you have to look at the source or package file.
+% \changes{v1.6d}{2020/07/20}{Option japanese added (gh/352)}
+% \begin{allowtofu}
+% \begin{macrocode}
+\DeclareOption{japanese}
+ {\vref at addto\extrasjapanese{%
+ \def\reftextfaceafter {\reftextvario{見開き}{次}頁}%
+ \def\reftextfacebefore{\reftextvario{見開き}{前}頁}%
+ \def\reftextafter {\reftextvario{直後の}{次}頁}%
+ \def\reftextbefore {\reftextvario{直前の}{前}頁}%
+ \def\reftextcurrent {\reftextvario{この}{現}頁}%
+ \def\reftextfaraway#1{\pageref{#1}頁}%
+ \def\reftextpagerange#1#2{\pageref{#1}頁から\pageref{#2}頁}%
+ \def\reftextlabelrange#1#2{\ref{#1}から\ref{#2}}%
+ \def\vrefrangeformat#1#2#3{\vpagerefrange[{#1}]{#2}{#3}の%
+ \reftextlabelrange{#2}{#3}}%
}}
% \end{macrocode}
+% \end{allowtofu}
% Defaults for Hungarian by Jeff Goldberg
% (\verb=jeffrey at goldmark.org=).
% There is a problem with the use of the definite article
@@ -1264,6 +1317,7 @@
on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\vref at stringwarning\reflabelpagerange
\ref{#1} to~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}%
% \end{macrocode}
% The |\AtBeginDocument| needs to be executed when the option is
@@ -1304,6 +1358,7 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{nynorsk}
{\vref at addto\extrasnynorsk{%
@@ -1315,6 +1370,7 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The polish translations have been provided by
@@ -1342,6 +1398,7 @@
\def\reftextfaraway#1{na stronie~\pageref{#1}}%
\def\reftextpagerange#1#2{na stronach~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The portuguese default text has been provided by
@@ -1362,6 +1419,7 @@
\def\reftextfaraway#1{na p\'agina~\pageref{#1}}%
\def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Updates to the default text for Romanian have been suggested by Florin Oprina
@@ -1381,6 +1439,7 @@
\def\reftextfaraway#1{pe pagina~\pageref{#1}}%
\def\reftextpagerange#1#2{pe paginile~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} la~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for russian was taken from the book in Russian by
@@ -1414,6 +1473,7 @@
\def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyrr\cyra\cyrn
\cyri\cyrc\cyra\cyrh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\cyrs~\ref{#1}\ \cyrp\cyro~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for slovak defaults was contributed by Miroslav Sedivy\\
@@ -1434,6 +1494,7 @@
\def\reftextfaraway#1{na strane~\pageref{#1}}%
\def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a\v z~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for slovene defaults was contributed by Roman Maurer\\
@@ -1450,6 +1511,7 @@
\def\reftextfaraway#1{na strani~\pageref{#1}}%
\def\reftextpagerange#1#2{na straneh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for spanish defaults was contributed by Julio Sanchez
@@ -1470,6 +1532,7 @@
\def\reftextpagerange#1#2{en las p\'aginas~\pageref{#1}%
-\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for swedish was contributed by Mats Dahlgren
@@ -1492,6 +1555,7 @@
\def\reftextpagerange#1#2{p\aa\
sidorna~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} till~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{turkish}
{\vref at excuse{turkish}%
@@ -1505,6 +1569,7 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for Ukrainian defaults was contributed by Mykola Lyakhovych\\
@@ -1532,6 +1597,7 @@
\def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyro\cyrr\cyrii
\cyrn\cyrk\cyra\cyrh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\cyrz~\ref{#1}\ \cyrd\cyro~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% We support francais as an alternative to french since people
@@ -2286,13 +2352,28 @@
% \changes{v1.2a}{1998/08/01}{Macro added}
% \changes{v1.4s}{2006/08/07}
% {Prevent loss of brackets}
+% \changes{v1.6d}{2020/07/20}{Changed for Japanese (gh/352)}
+% Argument two and three are implicitly picked up.
% \begin{macrocode}
-\newcommand\vrefrange[3][\reftextcurrent]
- {\reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}}
+\newcommand\vrefrange[1][\reftextcurrent]{\vrefrangeformat{#1}}
% \end{macrocode}
+%
% \end{macro}
%
%
+% \begin{macro}{\vrefrangeformat,\vrefrangedefaultformat}
+% Japanese needs a different word order in \cs{vrefrange} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6d}{2020/07/20}{Macro added (gh/352)}
+% \begin{macrocode}
+\def\vrefrangedefaultformat#1#2#3{%
+ \reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}}
+% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\vrefrangeformat\vrefrangedefaultformat
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\Vref}
% \changes{v1.4a}{2002/02/24}{Macro added}
More information about the latex3-commits
mailing list.