diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-17 22:26:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-17 22:26:34 +0000 |
commit | c8ec67e7148b3e55dcc223df363e08720fe43a32 (patch) | |
tree | 7308ccc6b87521c8c9db90520bd817ae565463b8 /Master | |
parent | 44710df8ad36ca2a4e67e39764d42b2656c93ed0 (diff) |
wtref (17jan17)
git-svn-id: svn://tug.org/texlive/trunk@42981 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/wtref/LICENSE | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/wtref/README.md | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/wtref/wtref-ja.pdf | bin | 121214 -> 120211 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/wtref/wtref-ja.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/wtref/wtref.pdf | bin | 218453 -> 220864 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/wtref/wtref.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/wtref/wtref.sty | 99 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 |
8 files changed, 67 insertions, 55 deletions
diff --git a/Master/texmf-dist/doc/latex/wtref/LICENSE b/Master/texmf-dist/doc/latex/wtref/LICENSE index fbc564d9ead..0dddce08b78 100644 --- a/Master/texmf-dist/doc/latex/wtref/LICENSE +++ b/Master/texmf-dist/doc/latex/wtref/LICENSE @@ -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 diff --git a/Master/texmf-dist/doc/latex/wtref/README.md b/Master/texmf-dist/doc/latex/wtref/README.md index 106424f9123..b965038d6be 100644 --- a/Master/texmf-dist/doc/latex/wtref/README.md +++ b/Master/texmf-dist/doc/latex/wtref/README.md @@ -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 @@ Move wtref.sty file to $TEXMF/tex/latex/wtref. ## 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 diff --git a/Master/texmf-dist/doc/latex/wtref/wtref-ja.pdf b/Master/texmf-dist/doc/latex/wtref/wtref-ja.pdf Binary files differindex 5d4dcbfa88b..8d216eab71a 100644 --- a/Master/texmf-dist/doc/latex/wtref/wtref-ja.pdf +++ b/Master/texmf-dist/doc/latex/wtref/wtref-ja.pdf diff --git a/Master/texmf-dist/doc/latex/wtref/wtref-ja.tex b/Master/texmf-dist/doc/latex/wtref/wtref-ja.tex index 1ddba67c5f8..e8e8eaa0cc8 100644 --- a/Master/texmf-dist/doc/latex/wtref/wtref-ja.tex +++ b/Master/texmf-dist/doc/latex/wtref/wtref-ja.tex @@ -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} diff --git a/Master/texmf-dist/doc/latex/wtref/wtref.pdf b/Master/texmf-dist/doc/latex/wtref/wtref.pdf Binary files differindex 6366c4ded40..4787b420257 100644 --- a/Master/texmf-dist/doc/latex/wtref/wtref.pdf +++ b/Master/texmf-dist/doc/latex/wtref/wtref.pdf diff --git a/Master/texmf-dist/doc/latex/wtref/wtref.tex b/Master/texmf-dist/doc/latex/wtref/wtref.tex index a94113ec282..02e482ac7fd 100644 --- a/Master/texmf-dist/doc/latex/wtref/wtref.tex +++ b/Master/texmf-dist/doc/latex/wtref/wtref.tex @@ -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 @@ No package option is available. \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} diff --git a/Master/texmf-dist/tex/latex/wtref/wtref.sty b/Master/texmf-dist/tex/latex/wtref/wtref.sty index 7b0c2281929..a196692ae3c 100644 --- a/Master/texmf-dist/tex/latex/wtref/wtref.sty +++ b/Master/texmf-dist/tex/latex/wtref/wtref.sty @@ -2,46 +2,50 @@ % 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@pkgname{WTRef} \RequirePackage{xkeyval} -%%%% error messages +% Messages \def\wtrf@info{\PackageInfo\wtrf@pkgname} +\def\wtrf@warn{\PackageWarningNoLine\wtrf@pkgname} \def\wtrf@error{\PackageError\wtrf@pkgname} -%%%% new ifs and new counts +% New ifs and counts \newif\if@wtrf@use@scope@ \newif\if@wtrf@use@namespace@ \newif\if@wtrf@set@namespace@ \newcount\wtrf@tempcnta \newcount\wtrf@tempcntb -%%%% utility +% Utilities \def\wtrf@name@def#1{\expandafter\def\csname #1\endcsname} \def\wtrf@name@edef#1{\expandafter\edef\csname #1\endcsname} \def\wtrf@name@use#1{\csname #1\endcsname} -\def\wtrf@if@option@exist{\@ifnextchar[} -\def\wtrf@if@reftype@not@exist#1{\@ifundefined{wtrf@#1@namespace}} +\def\wtrf@if@option@exists{\@ifnextchar[} +\def\wtrf@if@reftype@not@exists#1{\@ifundefined{wtrf@#1@namespace}} -%%%% check commands +% Check commands \def\wtrf@check@counter#1{% - \@ifundefined{c@#1} - {\wtrf@error{Undefined LaTeX counter '#1'}} - {}} + \@ifundefined{c@#1}{% + \wtrf@error + {Undefined LaTeX counter '#1'} + {Check the spelling or declare new LaTeX counter}% + }{}} \def\wtrf@check@command#1{% - \@ifundefined{#1} - {} - {\wtrf@info{Redefining \expandafter\string\csname#1\endcsname}}} + \@ifundefined{#1}{}{% else + \wtrf@warn{Redefining \expandafter\string\csname#1\endcsname}}} -%%%% trimming spaces -\define@cmdkeys[wtrf]{ts}[wtrf@temp@]{ref@name, label} -\def\wtrf@set@ref@name#1{\setkeys[wtrf]{ts}{ref@name=#1}} -\def\wtrf@set@label#1{\setkeys[wtrf]{ts}{label=#1}} +% Trimming spaces +\def\wtrf@inner@setkeys#1{\setkeys[wtrf]{inner}{key=#1}} +\def\wtrf@trimming@spaces#1{% + \define@key[wtrf]{inner}{key}{\def#1{##1}}% + \expandafter\wtrf@inner@setkeys\expandafter{#1}% + \disable@keys[wtrf]{inner}{key}} -%%%% define keys for new ref +% Define keys for \newref command \define@key[wtrf]{ns}{namespace}{% \@wtrf@set@namespace@true \def\wtrf@namespace@temp{#1}} @@ -52,13 +56,13 @@ \@wtrf@use@scope@true \def\wtrf@scope@temp{#1}} -%%%% new ref +% Define \newref command \newcommand{\newref}{% \let\wtrf@namespace@temp\@empty \@wtrf@use@namespace@true \@wtrf@set@namespace@false \@wtrf@use@scope@false - \wtrf@if@option@exist + \wtrf@if@option@exists {\wtrf@set@namespace} {\wtrf@@newref}} \@onlypreamble\newref @@ -66,13 +70,17 @@ \setkeys[wtrf]{ns}{#1}% \wtrf@@newref} \def\wtrf@@newref#1{% - \@for\wtrf@member:=#1\do{% - \expandafter\wtrf@set@ref@name\expandafter{\wtrf@member}% - \expandafter\wtrf@newref@pre\expandafter{\wtrf@temp@ref@name}}} + \@for\wtrf@temp@ref@type:=#1\do{% + \wtrf@trimming@spaces\wtrf@temp@ref@type + \expandafter\wtrf@newref@pre\expandafter{\wtrf@temp@ref@type}}} \def\wtrf@newref@pre#1{% - \wtrf@if@reftype@not@exist{#1}% - {\wtrf@newref{#1}} - {\wtrf@error{ref type '#1' already exists}}} + \wtrf@if@reftype@not@exists{#1}{% + \wtrf@newref{#1}% + }{% else + \wtrf@error + {ref type '#1' already exists} + {You can declare ref type only once}% + }} \def\wtrf@newref#1{% % define namespace \if@wtrf@use@namespace@ @@ -92,12 +100,12 @@ \wtrf@name@def{wtrf@#1@scope}{}% \fi % define keys for setting styles - \define@key[wtrf]{#1@style}{refcmd}{\wtrf@name@def{wtrf@#1@refcmd}####1{##1}}% - \define@key[wtrf]{#1@style}{last sep}[\wtrf@name@use{wtrf@#1@sep}]{% + \define@key[wtrf]{#1-style}{refcmd}{\wtrf@name@def{wtrf@#1@refcmd}####1{##1}}% + \define@key[wtrf]{#1-style}{last sep}[\wtrf@name@use{wtrf@#1@sep}]{% \wtrf@name@def{wtrf@#1@last@sep}{##1}}% - \define@cmdkeys[wtrf]{#1@style}[wtrf@#1@]{sep, prefix, suffix}% + \define@cmdkeys[wtrf]{#1-style}[wtrf@#1@]{sep, prefix, suffix}% % default key settings - \setkeys[wtrf]{#1@style}{% + \setkeys[wtrf]{#1-style}{% refcmd=\ref{##1}, sep={,\space}, last sep, prefix={}, suffix={}}% @@ -110,10 +118,10 @@ \wtrf@check@command{#1ref}% \wtrf@name@def{#1ref}{\protect\wtrf@name@use{wtrf@#1ref}} \wtrf@name@def{wtrf@#1ref}{% - \wtrf@if@option@exist + \wtrf@if@option@exists {\wtrf@name@use{wtrf@#1ref@with@option}} {\def\wtrf@scope{\wtrf@name@use{wtrf@#1@scope}}\wtrf@name@use{wtrf@#1@print}}}% - % when option exist + % when option exists \if@wtrf@use@scope@ \wtrf@name@def{wtrf@#1ref@with@option}[##1]##2{% \def\wtrf@scope{##1:}% @@ -136,8 +144,8 @@ \wtrf@tempcntb\@ne \advance\wtrf@tempcnta\m@ne \wtrf@name@use{wtrf@#1@prefix}% - \@for\wtrf@member:=##1\do{% - \expandafter\wtrf@set@label\expandafter{\wtrf@member}% + \@for\wtrf@temp@label:=##1\do{% + \wtrf@trimming@spaces\wtrf@temp@label \wtrf@name@use{wtrf@#1@refcmd}{% \wtrf@name@use{wtrf@#1@namespace}\wtrf@scope\wtrf@temp@label}% \ifnum\wtrf@tempcnta>\wtrf@tempcntb @@ -153,14 +161,19 @@ \let\wtrf@namespace@temp\@empty \fi} -%%%% set ref style +% Define \setrefstyle command \newcommand{\setrefstyle}[2]{% - \@for\wtrf@member:=#1\do{% - \expandafter\wtrf@set@ref@name\expandafter{\wtrf@member}% - \expandafter\wtrf@setrefstyle\expandafter{\wtrf@temp@ref@name}{#2}}} + \@for\wtrf@temp@ref@type:=#1\do{% + \wtrf@trimming@spaces\wtrf@temp@ref@type + \expandafter\wtrf@setrefstyle\expandafter{\wtrf@temp@ref@type}{#2}}} \def\wtrf@setrefstyle#1#2{% - \wtrf@if@reftype@not@exist{#1}% - {\wtrf@error{ref type '#1' does not exist}} - {\setkeys[wtrf]{#1@style}{#2}}} + \wtrf@if@reftype@not@exists{#1}{% + \wtrf@error + {ref type '#1' does not exist} + {You can declare ref type only once}% + }{% else + \setkeys[wtrf]{#1-style}{#2}% + }} -%% EOF +% EOF +\endinput diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index d5bac07b408..ea5e241df6d 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1173,6 +1173,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); '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'", |