texlive[42981] Master: wtref (17jan17)

commits+karl at tug.org commits+karl at tug.org
Tue Jan 17 23:26:34 CET 2017


Revision: 42981
          http://tug.org/svn/texlive?view=revision&revision=42981
Author:   karl
Date:     2017-01-17 23:26:34 +0100 (Tue, 17 Jan 2017)
Log Message:
-----------
wtref (17jan17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/wtref/LICENSE
    trunk/Master/texmf-dist/doc/latex/wtref/README.md
    trunk/Master/texmf-dist/doc/latex/wtref/wtref-ja.pdf
    trunk/Master/texmf-dist/doc/latex/wtref/wtref-ja.tex
    trunk/Master/texmf-dist/doc/latex/wtref/wtref.pdf
    trunk/Master/texmf-dist/doc/latex/wtref/wtref.tex
    trunk/Master/texmf-dist/tex/latex/wtref/wtref.sty
    trunk/Master/tlpkg/libexec/ctan2tds

Modified: trunk/Master/texmf-dist/doc/latex/wtref/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/wtref/LICENSE	2017-01-17 22:24:06 UTC (rev 42980)
+++ trunk/Master/texmf-dist/doc/latex/wtref/LICENSE	2017-01-17 22:26:34 UTC (rev 42981)
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2016 WatsonDNA
+Copyright (c) 2016-2017 Takuto ASAKURA (wtsnjp)
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Modified: trunk/Master/texmf-dist/doc/latex/wtref/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/wtref/README.md	2017-01-17 22:24:06 UTC (rev 42980)
+++ trunk/Master/texmf-dist/doc/latex/wtref/README.md	2017-01-17 22:26:34 UTC (rev 42981)
@@ -1,6 +1,6 @@
-# WTRef Package (v0.3.1)
+# WTRef Package (v0.3.2)
 
-WTRef package extend cross-reference system of LaTeX2e and introduce concepts of namespace and scope. This package is a part of the [WT Series](https://watson-lab.com/wt-series/).
+WTRef package extend cross-reference system of LaTeX2e and introduce concepts of namespace and scope. This package is a part of the WT Series.
 
 ## System Requirements
 
@@ -15,14 +15,12 @@
 
 ## Documents
 
-Documents for this pacakge are available in [English](./wtref.pdf) and [Japanese](./wtref-ja.pdf).
+Documents for this pacakge are available in [English](http://mirrors.ctan.org/macros/latex/contrib/wtref/wtref.pdf) and [Japanese](http://mirrors.ctan.org/macros/latex/contrib/wtref/wtref-ja.pdf).
 
 ## License
 
 This package released under [the MIT license](./LICENSE).
 
-
 ---
 
-Takuto ASAKURA (a.k.a. wtsnjp)  
-<https://watson-lab.com>
+Takuto ASAKURA ([wtsnjp](https://twitter.com/wtsnjp))
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/wtref/wtref-ja.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/wtref/wtref-ja.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/wtref/wtref-ja.tex	2017-01-17 22:24:06 UTC (rev 42980)
+++ trunk/Master/texmf-dist/doc/latex/wtref/wtref-ja.tex	2017-01-17 22:26:34 UTC (rev 42981)
@@ -8,8 +8,8 @@
 \newcommand{\Meta}[1]{$\langle$\mbox{}\textit{#1}\mbox{}$\rangle$}
 \newenvironment{syntax}{\begin{quote}\small}{\end{quote}}
 
-\title{\PkgName パッケージ (v0.3.1)}
-\author{ワトソン}
+\title{\PkgName パッケージ (v0.3.2)}
+\author{朝倉卓人 (wtsnjp)}
 
 \begin{document}
 

Modified: trunk/Master/texmf-dist/doc/latex/wtref/wtref.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/wtref/wtref.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/wtref/wtref.tex	2017-01-17 22:24:06 UTC (rev 42980)
+++ trunk/Master/texmf-dist/doc/latex/wtref/wtref.tex	2017-01-17 22:26:34 UTC (rev 42981)
@@ -7,8 +7,8 @@
 \newcommand{\Meta}[1]{$\langle$\mbox{}\textit{#1}\mbox{}$\rangle$}
 \newenvironment{syntax}{\begin{quote}\small}{\end{quote}}
 
-\title{{\PkgName} Package (v0.3.1)}
-\author{Watson}
+\title{{\PkgName} Package (v0.3.2)}
+\author{Takuto ASAKURA (wtsnjp)}
 
 \begin{document}
 
@@ -46,7 +46,7 @@
 
 \subsection{Definition of New Cross-Reference Commands}
 
-|\newref| command create a set of cross-reference commands. This command can only be used
+|\newref| command creates a set of cross-reference commands. This command can only be used
 in preamble.
 %
 \begin{syntax}

Modified: trunk/Master/texmf-dist/tex/latex/wtref/wtref.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/wtref/wtref.sty	2017-01-17 22:24:06 UTC (rev 42980)
+++ trunk/Master/texmf-dist/tex/latex/wtref/wtref.sty	2017-01-17 22:26:34 UTC (rev 42981)
@@ -2,17 +2,18 @@
 % wtref.sty
 %
 
-%%%% package declaration
+% Package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{wtref}[2016/08/09 v0.3.1]
+\ProvidesPackage{wtref}[2017/01/17 v0.3.2 Extend cross-reference system]
 \def\wtrf at pkgname{WTRef}
 \RequirePackage{xkeyval}
 
-%%%% error messages
+% Messages
 \def\wtrf at info{\PackageInfo\wtrf at pkgname}
+\def\wtrf at warn{\PackageWarningNoLine\wtrf at pkgname}
 \def\wtrf at error{\PackageError\wtrf at pkgname}
 
-%%%% new ifs and new counts
+% New ifs and counts
 \newif\if at wtrf@use at scope@
 \newif\if at wtrf@use at namespace@
 \newif\if at wtrf@set at namespace@
@@ -19,29 +20,32 @@
 \newcount\wtrf at tempcnta
 \newcount\wtrf at tempcntb
 
-%%%% utility
+% Utilities
 \def\wtrf at name@def#1{\expandafter\def\csname #1\endcsname}
 \def\wtrf at name@edef#1{\expandafter\edef\csname #1\endcsname}
 \def\wtrf at name@use#1{\csname #1\endcsname}
-\def\wtrf at if@option at exist{\@ifnextchar[}
-\def\wtrf at if@reftype at not@exist#1{\@ifundefined{wtrf@#1 at namespace}}
+\def\wtrf at if@option at exists{\@ifnextchar[}
+\def\wtrf at if@reftype at not@exists#1{\@ifundefined{wtrf@#1 at namespace}}
 
-%%%% check commands
+% Check commands
 \def\wtrf at check@counter#1{%
-  \@ifundefined{c@#1}
-    {\wtrf at error{Undefined LaTeX counter '#1'}}
-    {}}
+  \@ifundefined{c@#1}{%
+    \wtrf at error
+      {Undefined LaTeX counter '#1'}
+      {Check the spelling or declare new LaTeX counter}%
+  }{}}
 \def\wtrf at check@command#1{%
-  \@ifundefined{#1}
-    {}
-    {\wtrf at info{Redefining \expandafter\string\csname#1\endcsname}}}
+  \@ifundefined{#1}{}{% else
+    \wtrf at warn{Redefining \expandafter\string\csname#1\endcsname}}}
 
-%%%% trimming spaces
-\define at cmdkeys[wtrf]{ts}[wtrf at temp@]{ref at name, label}
-\def\wtrf at set@ref at name#1{\setkeys[wtrf]{ts}{ref at name=#1}}
-\def\wtrf at set@label#1{\setkeys[wtrf]{ts}{label=#1}}
+% Trimming spaces
+\def\wtrf at inner@setkeys#1{\setkeys[wtrf]{inner}{key=#1}}
+\def\wtrf at trimming@spaces#1{%
+  \define at key[wtrf]{inner}{key}{\def#1{##1}}%
+  \expandafter\wtrf at inner@setkeys\expandafter{#1}%
+  \disable at keys[wtrf]{inner}{key}}
 
-%%%% define keys for new ref
+% Define keys for \newref command
 \define at key[wtrf]{ns}{namespace}{%
   \@wtrf at set@namespace at true
   \def\wtrf at namespace@temp{#1}}
@@ -52,13 +56,13 @@
   \@wtrf at use@scope at true
   \def\wtrf at scope@temp{#1}}
 
-%%%% new ref
+% Define \newref command
 \newcommand{\newref}{%
   \let\wtrf at namespace@temp\@empty
   \@wtrf at use@namespace at true
   \@wtrf at set@namespace at false
   \@wtrf at use@scope at false
-  \wtrf at if@option at exist
+  \wtrf at if@option at exists
     {\wtrf at set@namespace}
     {\wtrf@@newref}}
 \@onlypreamble\newref
@@ -66,13 +70,17 @@
   \setkeys[wtrf]{ns}{#1}%
   \wtrf@@newref}
 \def\wtrf@@newref#1{%
-  \@for\wtrf at member:=#1\do{%
-    \expandafter\wtrf at set@ref at name\expandafter{\wtrf at member}%
-    \expandafter\wtrf at newref@pre\expandafter{\wtrf at temp@ref at name}}}
+  \@for\wtrf at temp@ref at type:=#1\do{%
+    \wtrf at trimming@spaces\wtrf at temp@ref at type
+    \expandafter\wtrf at newref@pre\expandafter{\wtrf at temp@ref at type}}}
 \def\wtrf at newref@pre#1{%
-  \wtrf at if@reftype at not@exist{#1}%
-    {\wtrf at newref{#1}}
-    {\wtrf at error{ref type '#1' already exists}}}
+  \wtrf at if@reftype at not@exists{#1}{%
+    \wtrf at newref{#1}%
+  }{% else
+    \wtrf at error
+      {ref type '#1' already exists}
+      {You can declare ref type only once}%
+  }}
 \def\wtrf at newref#1{%
   % define namespace
   \if at wtrf@use at namespace@
@@ -92,12 +100,12 @@
     \wtrf at name@def{wtrf@#1 at scope}{}%
   \fi
   % define keys for setting styles
-  \define at key[wtrf]{#1 at style}{refcmd}{\wtrf at name@def{wtrf@#1 at refcmd}####1{##1}}%
-  \define at key[wtrf]{#1 at style}{last sep}[\wtrf at name@use{wtrf@#1 at sep}]{%
+  \define at key[wtrf]{#1-style}{refcmd}{\wtrf at name@def{wtrf@#1 at refcmd}####1{##1}}%
+  \define at key[wtrf]{#1-style}{last sep}[\wtrf at name@use{wtrf@#1 at sep}]{%
     \wtrf at name@def{wtrf@#1 at last@sep}{##1}}%
-  \define at cmdkeys[wtrf]{#1 at style}[wtrf@#1@]{sep, prefix, suffix}%
+  \define at cmdkeys[wtrf]{#1-style}[wtrf@#1@]{sep, prefix, suffix}%
   % default key settings
-  \setkeys[wtrf]{#1 at style}{%
+  \setkeys[wtrf]{#1-style}{%
     refcmd=\ref{##1},
     sep={,\space}, last sep,
     prefix={}, suffix={}}%
@@ -110,10 +118,10 @@
   \wtrf at check@command{#1ref}%
   \wtrf at name@def{#1ref}{\protect\wtrf at name@use{wtrf@#1ref}}
   \wtrf at name@def{wtrf@#1ref}{%
-    \wtrf at if@option at exist
+    \wtrf at if@option at exists
       {\wtrf at name@use{wtrf@#1ref at with@option}}
       {\def\wtrf at scope{\wtrf at name@use{wtrf@#1 at scope}}\wtrf at name@use{wtrf@#1 at print}}}%
-  % when option exist
+  % when option exists
   \if at wtrf@use at scope@
     \wtrf at name@def{wtrf@#1ref at with@option}[##1]##2{%
       \def\wtrf at scope{##1:}%
@@ -136,8 +144,8 @@
       \wtrf at tempcntb\@ne
       \advance\wtrf at tempcnta\m at ne
       \wtrf at name@use{wtrf@#1 at prefix}%
-      \@for\wtrf at member:=##1\do{%
-        \expandafter\wtrf at set@label\expandafter{\wtrf at member}%
+      \@for\wtrf at temp@label:=##1\do{%
+        \wtrf at trimming@spaces\wtrf at temp@label
         \wtrf at name@use{wtrf@#1 at refcmd}{%
           \wtrf at name@use{wtrf@#1 at namespace}\wtrf at scope\wtrf at temp@label}%
         \ifnum\wtrf at tempcnta>\wtrf at tempcntb
@@ -153,14 +161,19 @@
     \let\wtrf at namespace@temp\@empty
   \fi}
 
-%%%% set ref style
+% Define \setrefstyle command
 \newcommand{\setrefstyle}[2]{%
-  \@for\wtrf at member:=#1\do{%
-    \expandafter\wtrf at set@ref at name\expandafter{\wtrf at member}%
-    \expandafter\wtrf at setrefstyle\expandafter{\wtrf at temp@ref at name}{#2}}}
+  \@for\wtrf at temp@ref at type:=#1\do{%
+    \wtrf at trimming@spaces\wtrf at temp@ref at type
+    \expandafter\wtrf at setrefstyle\expandafter{\wtrf at temp@ref at type}{#2}}}
 \def\wtrf at setrefstyle#1#2{%
-  \wtrf at if@reftype at not@exist{#1}%
-    {\wtrf at error{ref type '#1' does not exist}}
-    {\setkeys[wtrf]{#1 at style}{#2}}}
+  \wtrf at if@reftype at not@exists{#1}{%
+    \wtrf at error
+      {ref type '#1' does not exist}
+      {You can declare ref type only once}%
+  }{% else
+    \setkeys[wtrf]{#1-style}{#2}%
+  }}
 
-%% EOF
+% EOF
+\endinput

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2017-01-17 22:24:06 UTC (rev 42980)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2017-01-17 22:26:34 UTC (rev 42981)
@@ -1173,6 +1173,7 @@
  'wordcount',   "&MAKEwordcount",
  'wp-conv',     "die 'skipping, nonfree license'",
  'wp2latex',    "die 'skipping, compilation'",
+ 'wtref',	"&MAKEflatten",
  'xbase',       "die 'skipping, use xpackages'",
  'xcoffins',    "die 'skipping, use xpackages'",
  'xeCJK',       "die 'skipping, use xecjk'",



More information about the tex-live-commits mailing list