summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wtref/wtref.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/wtref/wtref.sty')
-rw-r--r--macros/latex/contrib/wtref/wtref.sty14
1 files changed, 8 insertions, 6 deletions
diff --git a/macros/latex/contrib/wtref/wtref.sty b/macros/latex/contrib/wtref/wtref.sty
index 856852d69d..cb1cc9ffc5 100644
--- a/macros/latex/contrib/wtref/wtref.sty
+++ b/macros/latex/contrib/wtref/wtref.sty
@@ -1,7 +1,7 @@
%%
%% This is file `wtref.sty'.
%%
-%% Copyright 2016-2020 Takuto ASAKURA (wtsnjp)
+%% Copyright 2016-2023 Takuto Asakura (wtsnjp)
%% GitHub: https://github.com/wtsnjp
%% Twitter: @wtsnjp
%%
@@ -11,7 +11,7 @@
% Package declaration
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{wtref}
- [2020/06/15 v0.4.0 A small extension for LaTeX2e's cross-referencing]
+ [2023/12/24 v1.0.0 A small extension for LaTeX2e's cross-referencing]
\def\wtrf@pkgname{WTRef}
\RequirePackage{xparse,xkeyval}
@@ -46,7 +46,7 @@
\@tempcnta=\catcode`\Q
\catcode`\Q=3
\def\wtrf@trim@spaces#1{%
- \romannumeral-`\q\wtrf@trim@trim@\noexpand#1Q Q}
+ \romannumeral-`>\wtrf@trim@trim@\noexpand#1Q Q}
\long\def\wtrf@trim@trim@#1 Q{\wtrf@trim@trim@@#1Q}
\long\def\wtrf@trim@trim@@#1Q#2{#1}
\catcode`\Q=\@tempcnta
@@ -119,7 +119,9 @@
% the \label-like command
\wtrf@check@command{#1label}%
\expandafter\DeclareExpandableDocumentCommand\csname #1label\endcsname{m}{%
- \label{\wtrf@name@use{wtrf@#1@namespace}\wtrf@name@use{wtrf@#1@scope}##1}}%
+ \expandafter\expandafter\expandafter\label\expandafter\expandafter\expandafter
+ {\csname wtrf@#1@namespace\expandafter\endcsname
+ \romannumeral-`>\csname wtrf@#1@scope\endcsname ##1}}%
% the \ref-like command
\wtrf@check@command{#1ref}%
\expandafter\DeclareExpandableDocumentCommand\csname #1ref\endcsname{om}{%
@@ -148,7 +150,7 @@
\wtrf@name@use{wtrf@#4@refcmd}{%
\wtrf@name@use{wtrf@#4@namespace}#3\wtrf@trim@spaces@noexp{#1}}%
\expandafter\ifx\wtrf@head#2\wtrf@nil\wtrf@qmark\else
- \wtrf@construct@#2,\wtrf@qmark\wtrf@nil{#3}{#4}%
+ \wtrf@construct@#2\wtrf@nil{#3}{#4}%
\fi}
\def\wtrf@construct@#1,#2\wtrf@nil#3#4{%
\expandafter\ifx\wtrf@head#2\wtrf@nil\wtrf@qmark
@@ -159,7 +161,7 @@
\wtrf@name@use{wtrf@#4@sep}%
\wtrf@name@use{wtrf@#4@refcmd}{%
\wtrf@name@use{wtrf@#4@namespace}#3\wtrf@trim@spaces@noexp{#1}}%
- \wtrf@construct@#2,\wtrf@qmark\wtrf@nil{#3}{#4}%
+ \wtrf@construct@#2\wtrf@nil{#3}{#4}%
\fi}
% Defining \setrefstyle command