texlive[43595] Master/texmf-dist: seealso (24mar17)
commits+karl at tug.org
commits+karl at tug.org
Fri Mar 24 23:27:33 CET 2017
Revision: 43595
http://tug.org/svn/texlive?view=revision&revision=43595
Author: karl
Date: 2017-03-24 23:27:33 +0100 (Fri, 24 Mar 2017)
Log Message:
-----------
seealso (24mar17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/seealso/seealso.pdf
trunk/Master/texmf-dist/source/latex/seealso/seealso.dtx
trunk/Master/texmf-dist/source/latex/seealso/seealso.ins
trunk/Master/texmf-dist/tex/latex/seealso/seealso.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/seealso/README
Added: trunk/Master/texmf-dist/doc/latex/seealso/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/seealso/README (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/seealso/README 2017-03-24 22:27:33 UTC (rev 43595)
@@ -0,0 +1,11 @@
+The seealso package
+
+Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku at gmail.com>
+
+The package amends the \see and \seealso macros that are used in building
+indexes with makeindex, to deal with repetitions, and to ensure page numbers
+are present in the actual index entries.
+
+This work is released under the LPPL v1.3c or later.
+
+The project is hosted on https://github.com/leo-liu/tex-pkg
Property changes on: trunk/Master/texmf-dist/doc/latex/seealso/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/seealso/seealso.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/seealso/seealso.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/seealso/seealso.dtx 2017-03-24 22:27:21 UTC (rev 43594)
+++ trunk/Master/texmf-dist/source/latex/seealso/seealso.dtx 2017-03-24 22:27:33 UTC (rev 43595)
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2014 by Leo Liu <leoliu.pku at gmail.com>
+% Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku at gmail.com>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -26,7 +26,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{seealso}
%<*package>
- [2014/04/10 v1.1 makeidx's see and seealso with page number support.]
+ [2017/03/23 v1.2 makeidx's see and seealso with page number support.]
%</package>
%
%<*driver>
@@ -119,7 +119,7 @@
%</driver>
% \fi
%
-% \CheckSum{253}
+% \CheckSum{279}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -625,8 +625,33 @@
% \subsection{准备工作}
%
% 引入相关编程工具。
+%
+% \pkg{etoolbox} 是基本宏工具。原有的 \cs{ifinlist} 和 \cs{ifinlistcs} 不能用
+% 于带花括号的文字的查找,会限制我们的使用。为此按 \pkg{etoolbox} 手册的建议,
+% 补充了 \cs{seealso at ifstrinlist} 和 \cs{seealso at ifstrinlistcs} 两个宏来在列表
+% 中搜索字符串。它们会比 \cs{ifinlist} 与 \cs{ifinlistcs} 性能略差一点。
+% \changes{v1.2}{2017/03/23}{允许 \cs{see} 等命令参数中带花括号。}
% \begin{macrocode}
\RequirePackage{etoolbox}
+% {<listmacro>}{<string>}{<true>}{<false>}
+\long\def\seealso at ifinlist@#1#2#3#4{%
+ \def\next{#4}%
+ \def\do##1{%
+ \ifstrequal{##1}{#2}
+ {\def\next{#3}\listbreak}
+ {}}%
+ \dolistloop{#1}%
+ \next}
+% {<string>}{<listmacro>}{<true>}{<false>}
+\protected\long\def\seealso at ifinlist#1#2{%
+ \seealso at ifinlist@{#2}{#1}}
+% {<string>}{<listcsname>}{<true>}{<false>}
+\protected\long\def\seealso at ifinlistcs#1#2{%
+ \expandafter\seealso at ifinlist@\csname #2\endcsname{#1}}
+% \end{macrocode}
+%
+% \pkg{kvoptions} 用于处理宏包选项。
+% \begin{macrocode}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=seealso at opt,
@@ -749,7 +774,7 @@
% \begin{macrocode}
\newcommand#1[2]{%
\seealso at setactivecr
- \ifinlistcs{##1}{seealso@#2 at list}
+ \seealso at ifinlistcs{##1}{seealso@#2 at list}
{}
{\listcsgadd{seealso@#2 at list}{##1}}%
\csuse{seealso@#2 at pageformat}{##2}}%
@@ -866,7 +891,7 @@
% 向结束记号列表中增加一项。
% \begin{macrocode}
\def\seealso at enditemlistadd#1{%
- \ifinlist{#1}\seealso at enditemlist
+ \seealso at ifinlist{#1}\seealso at enditemlist
{}
{\listadd\seealso at enditemlist{#1}}}
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/seealso/seealso.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/seealso/seealso.ins 2017-03-24 22:27:21 UTC (rev 43594)
+++ trunk/Master/texmf-dist/source/latex/seealso/seealso.ins 2017-03-24 22:27:33 UTC (rev 43595)
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 by Leo Liu <leoliu.pku at gmail.com>
+%% Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku at gmail.com>
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -25,7 +25,7 @@
This is a generated file.
-Copyright (C) 2014 by Leo Liu <leoliu.pku at gmail.com>
+Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku at gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
Modified: trunk/Master/texmf-dist/tex/latex/seealso/seealso.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/seealso/seealso.sty 2017-03-24 22:27:21 UTC (rev 43594)
+++ trunk/Master/texmf-dist/tex/latex/seealso/seealso.sty 2017-03-24 22:27:33 UTC (rev 43595)
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2014 by Leo Liu <leoliu.pku at gmail.com>
+%% Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku at gmail.com>
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,8 +20,20 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{seealso}
- [2014/04/10 v1.1 makeidx's see and seealso with page number support.]
+ [2017/03/23 v1.2 makeidx's see and seealso with page number support.]
\RequirePackage{etoolbox}
+\long\def\seealso at ifinlist@#1#2#3#4{%
+ \def\next{#4}%
+ \def\do##1{%
+ \ifstrequal{##1}{#2}
+ {\def\next{#3}\listbreak}
+ {}}%
+ \dolistloop{#1}%
+ \next}
+\protected\long\def\seealso at ifinlist#1#2{%
+ \seealso at ifinlist@{#2}{#1}}
+\protected\long\def\seealso at ifinlistcs#1#2{%
+ \expandafter\seealso at ifinlist@\csname #2\endcsname{#1}}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=seealso at opt,
@@ -62,7 +74,7 @@
\newcommand\DeclareSeealsoMacro[3]{%
\newcommand#1[2]{%
\seealso at setactivecr
- \ifinlistcs{##1}{seealso@#2 at list}
+ \seealso at ifinlistcs{##1}{seealso@#2 at list}
{}
{\listcsgadd{seealso@#2 at list}{##1}}%
\csuse{seealso@#2 at pageformat}{##2}}%
@@ -114,7 +126,7 @@
\fi}
\let\seealso at enditemlist\empty
\def\seealso at enditemlistadd#1{%
- \ifinlist{#1}\seealso at enditemlist
+ \seealso at ifinlist{#1}\seealso at enditemlist
{}
{\listadd\seealso at enditemlist{#1}}}
\define at key{seealso}{enditem}{%
More information about the tex-live-commits
mailing list