summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/seealso/README11
-rw-r--r--Master/texmf-dist/doc/latex/seealso/seealso.pdfbin163261 -> 254867 bytes
-rw-r--r--Master/texmf-dist/source/latex/seealso/seealso.dtx35
-rw-r--r--Master/texmf-dist/source/latex/seealso/seealso.ins4
-rw-r--r--Master/texmf-dist/tex/latex/seealso/seealso.sty20
5 files changed, 59 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/seealso/README b/Master/texmf-dist/doc/latex/seealso/README
new file mode 100644
index 00000000000..70da5b9c816
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/seealso/README
@@ -0,0 +1,11 @@
+The seealso package
+
+Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku@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
diff --git a/Master/texmf-dist/doc/latex/seealso/seealso.pdf b/Master/texmf-dist/doc/latex/seealso/seealso.pdf
index 9640bde81a2..d4cd87fb1d4 100644
--- a/Master/texmf-dist/doc/latex/seealso/seealso.pdf
+++ b/Master/texmf-dist/doc/latex/seealso/seealso.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/seealso/seealso.dtx b/Master/texmf-dist/source/latex/seealso/seealso.dtx
index 37af75cd1ef..f3b49e6c3e8 100644
--- a/Master/texmf-dist/source/latex/seealso/seealso.dtx
+++ b/Master/texmf-dist/source/latex/seealso/seealso.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2014 by Leo Liu <leoliu.pku@gmail.com>
+% Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku@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@ifstrinlist} 和 \cs{seealso@ifstrinlistcs} 两个宏来在列表
+% 中搜索字符串。它们会比 \cs{ifinlist} 与 \cs{ifinlistcs} 性能略差一点。
+% \changes{v1.2}{2017/03/23}{允许 \cs{see} 等命令参数中带花括号。}
% \begin{macrocode}
\RequirePackage{etoolbox}
+% {<listmacro>}{<string>}{<true>}{<false>}
+\long\def\seealso@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@ifinlist#1#2{%
+ \seealso@ifinlist@{#2}{#1}}
+% {<string>}{<listcsname>}{<true>}{<false>}
+\protected\long\def\seealso@ifinlistcs#1#2{%
+ \expandafter\seealso@ifinlist@\csname #2\endcsname{#1}}
+% \end{macrocode}
+%
+% \pkg{kvoptions} 用于处理宏包选项。
+% \begin{macrocode}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=seealso@opt,
@@ -749,7 +774,7 @@
% \begin{macrocode}
\newcommand#1[2]{%
\seealso@setactivecr
- \ifinlistcs{##1}{seealso@#2@list}
+ \seealso@ifinlistcs{##1}{seealso@#2@list}
{}
{\listcsgadd{seealso@#2@list}{##1}}%
\csuse{seealso@#2@pageformat}{##2}}%
@@ -866,7 +891,7 @@
% 向结束记号列表中增加一项。
% \begin{macrocode}
\def\seealso@enditemlistadd#1{%
- \ifinlist{#1}\seealso@enditemlist
+ \seealso@ifinlist{#1}\seealso@enditemlist
{}
{\listadd\seealso@enditemlist{#1}}}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/seealso/seealso.ins b/Master/texmf-dist/source/latex/seealso/seealso.ins
index f3492ed93a3..2524e5a3e63 100644
--- a/Master/texmf-dist/source/latex/seealso/seealso.ins
+++ b/Master/texmf-dist/source/latex/seealso/seealso.ins
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 by Leo Liu <leoliu.pku@gmail.com>
+%% Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku@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@gmail.com>
+Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku@gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/Master/texmf-dist/tex/latex/seealso/seealso.sty b/Master/texmf-dist/tex/latex/seealso/seealso.sty
index 235beb8f4a8..18a341a5aa8 100644
--- a/Master/texmf-dist/tex/latex/seealso/seealso.sty
+++ b/Master/texmf-dist/tex/latex/seealso/seealso.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2014 by Leo Liu <leoliu.pku@gmail.com>
+%% Copyright (C) 2014, 2017 by Leo Liu <leoliu.pku@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@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@ifinlist#1#2{%
+ \seealso@ifinlist@{#2}{#1}}
+\protected\long\def\seealso@ifinlistcs#1#2{%
+ \expandafter\seealso@ifinlist@\csname #2\endcsname{#1}}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=seealso@opt,
@@ -62,7 +74,7 @@
\newcommand\DeclareSeealsoMacro[3]{%
\newcommand#1[2]{%
\seealso@setactivecr
- \ifinlistcs{##1}{seealso@#2@list}
+ \seealso@ifinlistcs{##1}{seealso@#2@list}
{}
{\listcsgadd{seealso@#2@list}{##1}}%
\csuse{seealso@#2@pageformat}{##2}}%
@@ -114,7 +126,7 @@
\fi}
\let\seealso@enditemlist\empty
\def\seealso@enditemlistadd#1{%
- \ifinlist{#1}\seealso@enditemlist
+ \seealso@ifinlist{#1}\seealso@enditemlist
{}
{\listadd\seealso@enditemlist{#1}}}
\define@key{seealso}{enditem}{%