<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse meta-comment
%
% Copyright (C) 2014, 2017 by Leo Liu &lt;leoliu.pku@gmail.com&gt;
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Leo Liu.
%
% This work consists of the files seealso.dtx and seealso.ins
% and the derived filebase seealso.sty.
%
% \fi
%
% \iffalse
%&lt;*driver&gt;
\ProvidesFile{seealso.dtx}
%&lt;/driver&gt;
%&lt;package&gt;\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%&lt;package&gt;\ProvidesPackage{seealso}
%&lt;*package&gt;
    [2017/03/23 v1.2 makeidx's see and seealso with page number support.]
%&lt;/package&gt;
%
%&lt;*driver&gt;
\documentclass{ltxdoc}
\usepackage[a4paper,left=2in,right=1in,top=1in,bottom=1in]{geometry}
\newcommand\pkg[1]{\textsf{#1}}
\usepackage[UTF8,hyperref]{ctex}
\makeatletter
\renewcommand\glossary@prologue{%
  \section*{ç‰ˆæœ¬åŽ†å²}
  \markboth{ç‰ˆæœ¬åŽ†å²}{ç‰ˆæœ¬åŽ†å²}}
\renewcommand\index@prologue{%
  \section*{Index / ä»£ç&nbsp;ç´¢å¼•}
  \markboth{Index / ä»£ç&nbsp;ç´¢å¼•}{Index / ä»£ç&nbsp;ç´¢å¼•}
  æ–œä½“çš„æ•°å­—è¡¨ç¤ºå¯¹åº”é¡¹è¯´æ˜Žæ‰€åœ¨çš„é¡µç&nbsp;ã€‚ä¸‹åˆ’çº¿çš„æ•°å­—è¡¨ç¤ºå®šä¹‰æ‰€åœ¨çš„ä»£ç&nbsp;è¡Œå·ï¼›è€Œç›´
  ç«‹ä½“çš„æ•°å­—è¡¨ç¤ºå¯¹åº”é¡¹ä½¿ç”¨æ—¶æ‰€åœ¨çš„è¡Œå·ã€‚}
\def\option{\begingroup
   \catcode`\\12
   \MakePrivateLetters \option@}
\let\endoption\endtrivlist
\long\def\option@#1{\endgroup \topsep\MacroTopsep \trivlist
  \edef\saved@macroname{\string#1}%
  \def\makelabel##1{\llap{##1}}%
  \if@inlabel
    \let\@tempa\@empty \count@\macro@cnt
    \loop \ifnum\count@&gt;\z@
      \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
    \edef\makelabel##1{\llap{\vtop to\baselineskip
                               {\@tempa\hbox{##1}\vss}}}%
    \advance \macro@cnt \@ne
  \else  \macro@cnt\@ne  \fi
  \edef\@tempa{\noexpand\item[%
     \noexpand\PrintEnvName
     {\string#1}]}%
  \@tempa
  \global\advance\c@CodelineNo\@ne
      \SpecialMainOptionIndex{#1}\nobreak
  \global\advance\c@CodelineNo\m@ne
  \ignorespaces}
\def\SpecialMainOptionIndex#1{\@bsphack
  \special@index{%
    #1\actualchar
    {\string\ttfamily\space#1}
    (option)%
    \encapchar main}%
  \@esphack}
\def\SpecialOptionIndex#1{\@bsphack
  \begingroup
    \HD@target
    \let\HDorg@encapchar\encapchar
    \edef\encapchar usage{%
      \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}}%
    \index{#1\actualchar{\protect\ttfamily#1}
           (option)\encapchar usage}%
    \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
           usage}%
  \endgroup
  \@esphack}
\def\DescribeOption{\leavevmode\@bsphack\begingroup\MakePrivateLetters
  \Describe@Option}
\def\Describe@Option#1{\endgroup
              \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
              \SpecialOptionIndex{#1}\@esphack\ignorespaces}
\def\stylemeaning#1{\texttt{%
  \expandafter\expandafter\expandafter\strip@prefix
    \expandafter\meaning\csname seealso@#1\endcsname}}
\renewcommand\author[2][]{%
  \ifstrempty{#1}{}{%
    \hypersetup{pdfauthor=#1}}%
  \def\@author{#2}}
\renewcommand\title[2][]{%
  \ifstrempty{#1}{}{%
    \hypersetup{pdftitle=#1}}%
  \def\@title{#2}}
\makeatother
\usepackage{seealso}
\usepackage{fancyvrb}
\fvset{gobble=2}
\usepackage{hypdoc}
\hypersetup{pdfstartview=FitH}
\AtBeginDocument{\MakeShortVerb\|}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{seealso.dtx}
  \PrintChanges
  \PrintIndex
\end{document}
%&lt;/driver&gt;
% \fi
%
% \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
%   Lower-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
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&amp;
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \&lt;
%   Equals        \=     Greater than  \&gt;     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% \changes{v0.1}{2014/04/04}{åˆå§‹ç‰ˆæœ¬ã€‚}
% \changes{v1.0}{2014/04/05}{åŠŸèƒ½è¾ƒå®Œå¤‡çš„ç‰ˆæœ¬ã€‚}
%
% \DoNotIndex{\newcommand,\newenvironment,\^,\~,\@for,\@ifnextchar,
% \@let@token,\@onlypreamble, \active, \AtBeginDocument,\begingroup,\catcode,
% \csdef,\cslet,\cslet,\csuse, \DeclareBoolOption,\def,\define@key,\do,
% \docsvlist, \dolistloop,\edef,\else, \emph,\empty,\endgroup,\expandafter,
% \fi, \forcsvlist, \forlistcsloop, \forlistloop, \futurelet,\global,
% \ifcsdef, \ifcsempty,\ifinlist,\ifinlistcs, \ifstrempty,\ifundef,\ifx,
% \ignorespaces, \kvsetkeys,\lccode,\let, \listadd,\listbreak, \listcsgadd,
% \lowercase,\newif, \next, \noexpand,\ProcessKeyvalOptions, \RequirePackage,
% \reserved@a, \SetupKeyvalOptions,\space,\unexpanded,\unless}
%
% \GetFileInfo{seealso.dtx}
% \title[The seealso Package (\fileversion)]
%   {\hypertarget{English}{The \pkg{seealso} Package (\fileversion)}
%    \makebox[0pt][l]{\hspace{3cm}\large
%      \hyperlink{Chinese}{$\Rightarrow$ \textsf{ä¸­æ–‡ç‰ˆ}}}}
% \author[LiÃº HÇŽiyÃ¡ng (Leo Liu) &lt;leoliu.pku@gmail.com&gt;]
%   {LiÃº HÇŽiyÃ¡ng (Leo Liu) \\ \nolinkurl{leoliu.pku@gmail.com}}
% \date{\filedate}
%
% \maketitle
%
% \section{Introduction}
%
% When preparing index, the macros |\see| and |\seealso| defined by \LaTeXe's
% standard package \pkg{makeidx} are handy to use. They are used as special
% page format command, to present cross reference of index entry. For example,
% if we use
% \begin{Verbatim}
% \index{math|see{mathematics}}
% \end{Verbatim}
% to reference the index entry ``mathematics'', we will get
% \begin{quote}
% math, \emph{see} mathematics
% \end{quote}
% in the output index.
%
% However, |\see| and |\seealso| commands in \LaTeXe{} cannot produce page
% numbers. Moreover, if we use multiple |\see| or |\seealso|'s for one entry,
% there will be multiple reference targets produced. Therefore we may get
% this unexpected output:
% \begin{quote}
% math, \emph{see} mathematics, \emph{see} mathematics, \emph{see} mathematics
% \end{quote}
% if we have used \verb=\index{math|see{mathematics}}= at 3 different places
% in the document.
%
% The \pkg{seealso} package solve the problem. If we use
% \begin{Verbatim}
% \usepackage{seealso}
% \end{Verbatim}
% all cross references of index entry will produce page numbers, and the
% reference targets, which we call \emph{see list}, will be merged. The
% previous example will produce an output like this:
% \begin{quote}
% math, \seepage{mathematics}{2}, \seepage{mathematics}{4}, \seepage{mathematics}{5}
% \end{quote}
%
% \section{Reference}
%
% \subsection{Package Loading}
%
% The basic usage of the package is to simply load the package
% \begin{Verbatim}
% \usepackage{seealso}
% \end{Verbatim}
% then |\see| and |\seealso| commands will be redefined to support page number
% output and reference target merging.
%
% The \pkg{seealso} package should be loaded after \pkg{makeidx},
% \pkg{imakeidx}, etc. Or the redefinition of |\see| and |\seealso| may be
% broken.
%
% \subsection{Package Options}
%
% \DescribeOption{override}
% |override| is a boolean option, with a default value |true|. When it is set
% the original |\see| and |\seealso| will be overridden. However, when it is
% set to be |false|, say
% \begin{Verbatim}
% \usepackage[override=false]{seealso}
% \end{Verbatim}
% then |\see| and |\seealso| will not be overridden, and |\seepage| and
% |\seealsopage| should be used for page number output.
%
% \DescribeOption{activecr}
% |activecr| is a boolean option, with a default value |true|. When it is set,
% the see list will be output at the end of an index entry line (in a |.ind|
% file). If we set |activecr=false|, however, the see list will not be output
% automatically, one should use |\SeealsoPrintList| manually at the end of the
% index entry instead. Usually |\SeealsoPrintList| is added via |delim_t|
% style of Makeindex.
%
% \subsection{The \cs{see} and \cs{seealso} Commands}
%
% \DescribeMacro{\seepage}
% \DescribeMacro{\seealsopage}
% |\seepage| and |\seealsopage| provide the main functions of this package.
% They provide the same faculty of cross reference, but output page numbers
% and prevent redundancy. For example, suppose that there are
% \begin{Verbatim}
% \index{foo|seepage{bar}}
% \end{Verbatim}
% in page 1, 2, and 3, we will have a |.ind| file as below:
% \begin{Verbatim}
% foo, \seepage{bar}{1}, \seepage{bar}{2}, \seepage{bar}{3}
% \end{Verbatim}
% And the output of the index will be:
% \begin{quote}
% foo, \seepage{bar}{1}, \seepage{bar}{2}, \seepage{bar}{3}
% \end{quote}
%
% It is possible to use different references for one index entry. For example
% we can use
% \begin{Verbatim}
% \index{foo|seepage{bar}}
% \end{Verbatim}
% and
% \begin{Verbatim}
% \index{foo|seepage{foobaz}}
% \end{Verbatim}
% several times, the generated |.ind| file may be:
% \begin{Verbatim}
% foo, \seepage{bar}{1}, \seepage{bar}{2}, \seepage{foobaz}{3}
% \end{Verbatim}
% And the output of the index will be:
% \begin{quote}
% foo, \seepage{bar}{1}, \seepage{bar}{2}, \seepage{foobaz}{3}
% \end{quote}
%
% \DescribeMacro{\seenopage}
% \DescribeMacro{\seealsonopage}
% The macros |\seenopage| and |\seealsonopage| save the original definitions
% of |\see| and |\seealso| before loading \pkg{seealso}, which do not produce
% page numbers.
%
% \DescribeMacro{\see}
% \DescribeMacro{\seealso}
% When option |override| is |true|, which is the default, |\see| and
% |\seealso| works just as |\seepage| and |\seealsopage|.
%
% \DescribeMacro{\SeealsoPrintList}
% |\seepage| and |\seealsopage| will collect the see lists, which will be
% output at the end of the line under default |activecr| option. However, when
% |activecr| is set to be |false|, the see lists won't be output at the end of
% source line where |\seepage| and |\seealsopage| are. In the latter case, we
% can add |\SeealsoPrintList| manually at the end of line to output the see
% lists. Usually we can set |delim_t| variable in the style file of Makeindex,
% for example:
% \begin{Verbatim}
% % example.ist
% delim_t "\\SeealsoPrintList"
% \end{Verbatim}
% Then a |\SeealsoPrintList| will be appended at the end of every non-empty
% index entry, and the see lists will be output properly.
%
% \DescribeMacro{\DeclareSeealsoMacro}
% |\DeclareSeealsoMacro| can be used to define a new macro like |\see| and
% |\seealso|. The syntax is
% \begin{quote}
% |\DeclareSeealsoMacro\|\meta{macro}|{|\meta{seelist}|}{|\meta{name}|}|
% \end{quote}
% where |\|\meta{macro} is the macro name, \meta{seelist} is the new see list,
% and \meta{name} is the name of the see list to be output (like |\seename|).
% Using |\DeclareSeealsoMacro|, two macros will be defined, the one is
% |\|\meta{macro}, the other is |\|\meta{macro}|name|. If there has no
% |\|\meta{macro}|name| predefined, it is defined to be \meta{name}, or the
% definition remains unchanged.
%
% For example, |\seepage| and |\seealsopage| are defined like this:
% \begin{Verbatim}
% \DeclareSeealsoMacro\seepage{see}{see}
% \DeclareSeealsoMacro\seealsopage{also}{see also}
% \end{Verbatim}
% The definitions above also provide the default value of |\seename| and
% |\alsoname| to be |see| and |see also|, respectively.
%
% \subsection{Output Styles}
%
% \DescribeMacro{\seealsosetup}
% The macro |\seealsosetup| is used to configure the output style of see
% lists. The syntax is:
% \begin{quote}
% |\seealsosetup[|\meta{seelists}|]{|\meta{kv-options}|}|
% \end{quote}
% where \meta{seelists} is a comma separated list, each item of which is a see
% list to be setup. \meta{seelists} can also be omitted or set to be empty,
% which means we are setting up the default output style of all kind of see
% lists. \meta{kv-options} is the options in key-value syntax.
%
% All possible output styles are summarized in table~\ref{tab:outstyleen}.
% \begin{table}[htbp]
% \centering
% \begin{tabular}{lp{4cm}ll}
% \hline
% Key &amp; Meaning &amp; Argument &amp; Default Value \\
% \hline
% |name| &amp; The name of see list to be output, e.g. |\seename| &amp; none
%   &amp; (invalid) \\
% |listsep| &amp; The separator before a see list &amp; none
%   &amp; \stylemeaning{listsep} \\
% |itemsep| &amp; The separator between see list items &amp; none
%   &amp; \stylemeaning{itemsep} \\
% |nameformat| &amp; Output format of the see list name &amp; |#1|
%   &amp; \stylemeaning{nameformat} \\
% |itemformat| &amp; Output format of the see list items &amp; |#1|
%   &amp; \stylemeaning{itemformat} \\
% |pageformat| &amp; Output format of the page numbers &amp; |#1|
%   &amp; \stylemeaning{pageformat} \\
% \hline
% \end{tabular}
% \caption{Output styles used by \cs{seealsosetup}}\label{tab:outstyleen}
% \end{table}
%
% For example, if we want to set all page numbers produced by |\seealsopage|
% to be italic, we can use:
% \begin{Verbatim}
% \seealsosetup[also]{pageformat=\textit{#1}}
% \end{Verbatim}
%
% Besides the output styles, |\seealsosetup| accepts |enditem| and |enditem+|
% options, which is a list of token that determines whether to output the see
% list at the end of line, if |activecr| option is true. The default value of
% the list includes some common macros in |theindex| environment:
% |\indexspace|, |\item|, |\subitem|, |\subsubitem|, and |\end|. For example,
% if we have a special index which supports 4th level item |\subsubsubitem|
% and a special space |\myindexspace|, we can use
% \begin{Verbatim}
% \seealsosetup{enditem+={\subsubsubitem,\myindexspace}}
% \end{Verbatim}
% to add the new macros to the list.
%
% \DescribeMacro{\SeealsoGobble}
% |\SeealsoGobble| takes a character \meta{c} as argument. It checks the
% following character, gobble it and ignore spaces if it is \meta{c}, or do
% nothing if it is not \meta{c}. This macro is useful in |pageformat| style
% to prevent outputting the page numbers, like this:
% \begin{Verbatim}
% \seealsosetup[see,also]{pageformat=\SeealsoGobble{,}}
% \end{Verbatim}
%
%
% \section{Known Issues}
%
% Here are some known problems and their solutions:
% \begin{itemize}
% \item
% Since the output format of page numbers of |\seepage|, |\seealsopage| is the
% same as normal page numbers, it may be ambiguous if we use normal |\index|
% and \verb=\index{...|seepage}= simultaneously. Usually we should avoid using
% different style of |\index| with or without |\seepage| and |\seealsopage|.
% If it is impossible, we can set special page number format to identify them,
% or we can use |\SeealsoGobble| to disable page numbers.
% \end{itemize}
%
%
% \clearpage
% \title{\hypertarget{Chinese}{\pkg{seealso} å®åŒ… (\fileversion)}
%   \makebox[0pt][l]{\hspace{3cm}\large
%     \hyperlink{English}{$\Rightarrow$ \textsf{English Version}}}}
% \author{åˆ˜æµ·æ´‹ \\ \nolinkurl{leoliu.pku@gmail.com}}
% \date{\filedate}
%
% \maketitle
%
% \section{ç®€ä»‹}
%
% åœ¨ç´¢å¼•ç”Ÿæˆæ—¶ï¼Œ\LaTeXe{} çš„æ&nbsp;‡å‡†å®åŒ… \pkg{makeidx} å®šä¹‰äº† |\see| ä¸Ž |\seealso|
% ä¸¤ä¸ªå®ï¼Œå®ƒä»¬é€šå¸¸æ˜¯åœ¨ |\index| ä¸­ä½œä¸ºä¸€ç§ç‰¹æ®Šçš„é¡µç&nbsp;æ&nbsp;¼å¼ä½¿ç”¨ï¼Œè¡¨ç¤ºç´¢å¼•é¡¹çš„å¼•
% ç”¨ã€‚ä¾‹å¦‚ä½¿ç”¨
% \begin{Verbatim}
% \index{math|see{mathematics}}
% \end{Verbatim}
% ä¼šä½¿ç´¢å¼•é¡¹ math å¼•ç”¨åˆ° mathematicsã€‚ç”Ÿæˆç±»ä¼¼
% \begin{quote}
% math, \emph{see} mathematics
% \end{quote}
% çš„ç´¢å¼•æ¡ç›®ã€‚
%
% ä¸è¿‡ï¼Œ\LaTeXe{} çš„ |\see| ä¸Ž |\seealso| å‘½ä»¤å¹¶ä¸ä¼šä¸ºäº¤å‰å¼•ç”¨çš„ç´¢å¼•é¡¹è¾“å‡ºé¡µ
% ç&nbsp;ã€‚æ›´ä¸¥é‡çš„é—®é¢˜æ˜¯ï¼Œå¦‚æžœå¯¹ä¸€ä¸ªç´¢å¼•é¡¹ä½¿ç”¨äº†å¤šæ¬¡äº¤å‰å¼•ç”¨ï¼Œåˆ™ä¼šå¤šæ¬¡è¾“å‡ºç›¸åŒçš„ç›®
% æ&nbsp;‡å¼•ç”¨ã€‚å›&nbsp;æ­¤å¯èƒ½å‡ºçŽ°è¿™æ&nbsp;·çš„å°´å°¬æ•ˆæžœï¼š
% \begin{quote}
% math, \emph{see} mathematics, \emph{see} mathematics, \emph{see} mathematics
% \end{quote}
% å…¶ä¸­å¯èƒ½åœ¨ä¸‰ä¸ªä¸åŒçš„åœ°æ–¹ä½¿ç”¨äº† \verb=\index{math|see{mathematics}}=ã€‚
%
% \pkg{seealso} å®åŒ…å³ä¸ºè§£å†³è¿™ç§é—®é¢˜è€Œç¼–å†™ã€‚åªè¦ä½¿ç”¨äº†
% \begin{Verbatim}
% \usepackage{seealso}
% \end{Verbatim}
% åˆ™äº¤å‰å¼•ç”¨çš„ç´¢å¼•é¡¹ä¼šåŒæ—¶æ˜¾ç¤ºé¡µç&nbsp;ï¼ŒåŒæ—¶å¤šä¸ªäº¤å‰å¼•ç”¨çš„ç›®æ&nbsp;‡ï¼ˆæˆ‘ä»¬ç§°ä¸º\emph{å‚è§
% åˆ—è¡¨}ï¼‰ä¼šåˆå¹¶æ˜¾ç¤ºã€‚å‰é¢çš„ä¾‹å­å°±å¯èƒ½ä¼šè¾“å‡ºï¼š
% \begin{quote}
% math, \seepage{mathematics}{2}, \seepage{mathematics}{4}, \seepage{mathematics}{5}
% \end{quote}
% è¿™æ&nbsp;·çš„æ&nbsp;¼å¼ã€‚
%
% \section{å‚è€ƒæ‰‹å†Œ}
%
% \subsection{å®åŒ…è½½å…¥}
%
% åŸºæœ¬çš„ç”¨æ³•å°±æ˜¯ç›´æŽ¥ä½¿ç”¨
% \begin{Verbatim}
% \usepackage{seealso}
% \end{Verbatim}
% è¿™æ&nbsp;· |\see| å’Œ |\seealso| å‘½ä»¤å°±ä¼šè¢«é‡å®šä¹‰ä¸ºæ”¯æŒè¾“å‡ºé¡µç&nbsp;å’Œåˆå¹¶ç›®æ&nbsp;‡çš„æ&nbsp;¼å¼ã€‚
%
% æ³¨æ„ \pkg{seealso} å®åŒ…çš„è½½å…¥åº”è¯¥æ™šäºŽ \pkg{makeidx}ã€\pkg{imakeidx} ç­‰å®šä¹‰
% |\see|ã€|\seealso| çš„å®åŒ…ï¼Œå¦åˆ™å…¶åŠŸèƒ½å°†ä¼šå¤±æ•ˆã€‚
%
% \subsection{å®åŒ…é€‰é¡¹}
%
% \DescribeOption{override}
% |override| æ˜¯å¸ƒå°”åž‹é€‰é¡¹ï¼Œé»˜è®¤ä¸º |true|ã€‚è¡¨ç¤ºè¦†ç›–å·²æœ‰çš„ |\see| ä¸Ž |\seealso|
% å®šä¹‰ã€‚å¦‚æžœè®¾ç½®
% \begin{Verbatim}
% \usepackage[override=false]{seealso}
% \end{Verbatim}
% åˆ™ä¸å¯¹ |\see| ä¸Ž |\seealso| è¦†ç›–ï¼Œè¦ä½¿ç”¨ |\seepage| å’Œ
% |\seealsopage| å‘½ä»¤è°ƒç”¨ç›¸åº”çš„åŠŸèƒ½ã€‚
%
% \DescribeOption{activecr}
% |activecr| æ˜¯å¸ƒå°”åž‹é€‰é¡¹ï¼Œé»˜è®¤ä¸º |true|ã€‚è¡¨ç¤ºæ‰“å¼€åœ¨ï¼ˆ|.ind| æ–‡ä»¶ä¸­ï¼‰ç´¢å¼•é¡¹è¡Œ
% æœ«è‡ªåŠ¨è¾“å‡ºæ‰€æœ‰å‚è§åˆ—è¡¨çš„åŠŸèƒ½ã€‚å¦‚æžœè®¾ç½® |activecr=false|ï¼Œåˆ™å¿…é¡»æ‰‹å·¥ï¼ˆé€šå¸¸é€š
% è¿‡è®¾ç½® Makeindex çš„ |delim_t| æ&nbsp;¼å¼ï¼‰åœ¨ç´¢å¼•é¡¹æœ«åŠ&nbsp;ä¸Š |\SeealsoPrintList| è¾“å‡º
% å‚è§åˆ—è¡¨ã€‚
%
% \subsection{\cs{see} ä¸Ž \cs{seealso} å‘½ä»¤}
%
% \DescribeMacro{\seepage}
% \DescribeMacro{\seealsopage}
% |\seepage| ä¸Ž |\seealsopage| æä¾›äº†å®åŒ…çš„ä¸»è¦åŠŸèƒ½ï¼Œå®ƒä»¬ä¸ŽåŽŸå§‹çš„
% |\see|ã€|\seealso| å‘½ä»¤ç±»ä¼¼æä¾›ç´¢å¼•é¡¹çš„äº¤å‰å¼•ç”¨åŠŸèƒ½ï¼Œä½†åŒæ—¶ä¼šè¾“å‡ºé¡µç&nbsp;ï¼Œå¹¶é¿
% å…é‡å¤è¾“å‡ºäº¤å‰å¼•ç”¨ã€‚ä¾‹å¦‚ï¼Œåœ¨æ–‡æ¡£ä¸­ç¬¬ 1, 2, 3 é¡µåˆ†åˆ«å¤šæ¬¡ä½¿ç”¨
% \begin{Verbatim}
% \index{foo|seepage{bar}}
% \end{Verbatim}
% åˆ™åœ¨ |.ind| æ–‡ä»¶ä¸­ä¼šç”Ÿæˆï¼š
% \begin{Verbatim}
% foo, \seepage{bar}{1}, \seepage{bar}{2}, \seepage{bar}{3}
% \end{Verbatim}
% è€Œè¾“å‡ºçš„ç»“æžœå°†ä¼šæ˜¯ï¼š
% \begin{quote}
% foo, \seepage{bar}{1}, \seepage{bar}{2}, \seepage{bar}{3}
% \end{quote}
%
% åŒä¸€ä¸ªè¯å¯ä»¥æœ‰ä¸åŒçš„å‚è§å¼•ç”¨é¡¹ç›®ï¼Œä¾‹å¦‚åœ¨ä¸åŒçš„ä½ç½®å‡&nbsp;æ¬¡ä½¿ç”¨
% \begin{Verbatim}
% \index{foo|seepage{bar}}
% \end{Verbatim}
% å’Œ
% \begin{Verbatim}
% \index{foo|seepage{foobaz}}
% \end{Verbatim}
% åˆ™ |.ind| æ–‡ä»¶ä¸­å¯èƒ½ç”Ÿæˆï¼š
% \begin{Verbatim}
% foo, \seepage{bar}{1}, \seepage{bar}{2}, \seepage{foobaz}{3}
% \end{Verbatim}
% äºŽæ˜¯å°†å¾—åˆ°è¾“å‡ºç»“æžœ
% \begin{quote}
% foo, \seepage{bar}{1}, \seepage{bar}{2}, \seepage{foobaz}{3}
% \end{quote}
%
% \DescribeMacro{\seenopage}
% \DescribeMacro{\seealsonopage}
% |\seenopage| ä¸Ž |\seealsonopage| è¿™ä¸¤ä¸ªå®åˆ™ä¿å­˜äº†åœ¨è°ƒç”¨ \pkg{seealso} å®åŒ…ä¹‹
% å‰ï¼Œ|\see| ä¸Ž |\seealso| çš„åŽŸå§‹å®šä¹‰ï¼Œå®ƒä»¬ä¸ä¼šè¾“å‡ºé¡µç&nbsp;ã€‚
%
% \DescribeMacro{\see}
% \DescribeMacro{\seealso}
% åœ¨é»˜è®¤çš„ |override| é€‰é¡¹ä¸‹ï¼Œ|\see| ä¸Ž |\seealso| çš„åŠŸèƒ½ä¸Ž
% |\seepage|ã€|\seealsopage| ç›¸åŒã€‚
%
% \DescribeMacro{\SeealsoPrintList}
% |\seepage| å’Œ |\seealsopage| ä¼šæ”¶é›†å‚è§åˆ—è¡¨ï¼Œåœ¨é»˜è®¤çš„ |activecr| é€‰é¡¹ä¸º
% |ture| æ—¶ä¼šåœ¨è¡Œæœ«è‡ªåŠ¨è¾“å‡ºã€‚ä½†å¦‚æžœ |activecr| é€‰é¡¹è®¾ç½®ä¸º |false|ï¼Œåˆ™
% |\seepage| ä¸Ž |\seealsopage| æ‰€åœ¨è¡Œç»“æŸåŽä¸ä¼šè‡ªåŠ¨è¾“å‡ºå‚è§åˆ—è¡¨ã€‚æ­¤æ—¶ï¼Œå¯ä»¥æ‰‹
% å·¥åœ¨æ­¤è¡Œæœ€åŽåŠ&nbsp;ä¸Š |\SeealsoPrintList| å®ï¼Œè¾“å‡ºå‚è§åˆ—è¡¨ã€‚é€šå¸¸å¯ä»¥åœ¨ Makeindex
% çš„æ&nbsp;¼å¼æ–‡ä»¶ä¸­ï¼Œè¾“å‡ºæ&nbsp;¼å¼é€‰é¡¹ |delim_t| é‡Œé¢åŠ&nbsp;ä¸Š |\SeealsoPrintList| å®ï¼Œå¦‚ï¼š
% \begin{Verbatim}
% % example.ist
% delim_t "\\SeealsoPrintList"
% \end{Verbatim}
% è¿™æ&nbsp;·ï¼Œæ¯ä¸ªéžç©ºç´¢å¼•é¡¹è¾“å‡ºçš„æœ€åŽéƒ½ä¼šåŠ&nbsp;ä¸Š |\SeealsoPrintList|ï¼ŒæŒ‰éœ€è¦è¾“å‡ºå‚è§åˆ—
% è¡¨ã€‚
%
% \DescribeMacro{\DeclareSeealsoMacro}
% |\DeclareSeealsoMacro| å‘½ä»¤ç”¨äºŽç”Ÿæˆæ–°çš„ç±»ä¼¼ |\see| ä¸Ž |\seealso| çš„å®ã€‚å…¶è¯­
% æ³•ä¸ºï¼š
% \begin{quote}
% |\DeclareSeealsoMacro\|\meta{macro}|{|\meta{seelist}|}{|\meta{name}|}|
% \end{quote}
% å…¶ä¸­ |\|\meta{macro} æ˜¯æ–°çš„å®åç§°ï¼Œ\meta{seelist} æ˜¯æ–°çš„å‚è§åˆ—è¡¨
% åï¼Œ\meta{name} æ˜¯è¾“å‡ºå‚è§åˆ—è¡¨æ—¶çš„åç§°ã€‚ä½¿ç”¨è¯¥å‘½ä»¤ä¼šç”Ÿæˆä¸¤ä¸ªå®ï¼Œä¸€ä¸ªæ˜¯
% |\|\meta{macro}ï¼Œä¸€ä¸ªæ˜¯å¯¹åº”çš„åç§° |\|\meta{macro}|name|ã€‚
% |\|\meta{macro}|name| å¦‚æžœäº‹å…ˆæ²¡æœ‰å®šä¹‰ï¼Œåˆ™å®šä¹‰å…¶å€¼ä¸º \meta{name}ï¼Œå¦åˆ™ä¿æŒä¸
% å˜ã€‚
%
% ä¾‹å¦‚ï¼Œ|\seepage| å’Œ |\seealsopage| å°±æ˜¯è¿™æ&nbsp;·å®šä¹‰çš„ï¼š
% \begin{Verbatim}
% \DeclareSeealsoMacro\seepage{see}{see}
% \DeclareSeealsoMacro\seealsopage{also}{see also}
% \end{Verbatim}
% ä¸Šè¿°å‘½ä»¤åŒæ—¶å®šä¹‰äº† |\seename| çš„å¤‡é€‰å€¼ä¸º |see|ï¼Œä»¥åŠ |\alsoname| çš„å¤‡é€‰å€¼ä¸º
% |see also|ã€‚
%
% \subsection{æ&nbsp;¼å¼è®¾ç½®}
%
% \DescribeMacro{\seealsosetup}
% |\seealsosetup| å‘½ä»¤ç”¨äºŽè®¾ç½®å‚è§åˆ—è¡¨çš„è¾“å‡ºæ&nbsp;¼å¼ã€‚å…¶è¯­æ³•ä¸ºï¼š
% \begin{quote}
% |\seealsosetup[|\meta{seelists}|]{|\meta{kv-options}|}|
% \end{quote}
% å…¶ä¸­ï¼Œå¯é€‰å‚æ•° \meta{seelists} æ˜¯ä¸€ä¸ªé€—å·åˆ†éš”çš„åˆ—è¡¨ï¼Œæ¯ä¸€é¡¹è¡¨ç¤ºè¦è®¾ç½®å…¶æ&nbsp;¼å¼
% çš„å‚è§åˆ—è¡¨ï¼Œå¦‚æžœä¸è®¾ç½® \meta{seelists} æˆ–è®¾ä¸ºç©ºï¼Œåˆ™è®¾ç½®é»˜è®¤çš„è¾“å‡ºæ&nbsp;¼å¼ã€‚è€Œé€‰
% é¡¹ \meta{kv-options} åˆ™æ˜¯è¾“å‡ºæ&nbsp;¼å¼é¡¹ã€‚
%
% å¯ç”¨çš„è¾“å‡ºæ&nbsp;¼å¼è§è¡¨~\ref{tab:outstylezh}ã€‚
% \begin{table}[htbp]
% \centering
% \begin{tabular}{llll}
% \hline
% é€‰é¡¹ &amp; æ„ä¹‰ &amp; å‚æ•° &amp; é»˜è®¤å€¼ \\
% \hline
% |name| &amp; è¾“å‡ºå‚è§åˆ—è¡¨çš„åç§° &amp; æ—&nbsp; &amp; ï¼ˆä¸å¯ç”¨ï¼‰ \\
% |listsep| &amp; å‚è§åˆ—è¡¨å‰çš„åˆ†éš”ç¬¦ &amp; æ—&nbsp; &amp; \stylemeaning{listsep} \\
% |itemsep| &amp; å‚è§åˆ—è¡¨é¡¹é—´çš„åˆ†éš”ç¬¦ &amp; æ—&nbsp; &amp; \stylemeaning{itemsep} \\
% |nameformat| &amp; è¾“å‡ºå‚è§åâ€œsee alsoâ€çš„æ&nbsp;¼å¼ &amp; |#1| &amp; \stylemeaning{nameformat} \\
% |itemformat| &amp; å‚è§åˆ—è¡¨é¡¹çš„æ&nbsp;¼å¼ &amp; |#1| &amp; \stylemeaning{itemformat} \\
% |pageformat| &amp; é¡µç&nbsp;æ&nbsp;¼å¼ &amp; |#1| &amp; \stylemeaning{pageformat} \\
% \hline
% \end{tabular}
% \def\tablename{è¡¨}
% \caption{\cs{seealsosetup} ä½¿ç”¨çš„è¾“å‡ºæ&nbsp;¼å¼}\label{tab:outstylezh}
% \end{table}
%
% ä¾‹å¦‚ï¼Œå¦‚æžœè¦è®©æ‰€æœ‰ |\seealsopage| å‘½ä»¤ç”Ÿæˆçš„é¡µç&nbsp;ä»¥æ–œä½“æ˜¾ç¤ºï¼Œå°±å¯ä»¥ä½¿ç”¨
% \begin{Verbatim}
% \seealsosetup[also]{pageformat=\textit{#1}}
% \end{Verbatim}
%
% é™¤äº†è¾“å‡ºæ&nbsp;¼å¼ï¼Œ|\seealsosetup| è¿˜æŽ¥å— |enditem| å’Œ |enditem+| é€‰é¡¹ï¼Œç”¨äºŽè®¾ç½®
% \pkg{seealso} å®åŒ…åœ¨ |activecr| é€‰é¡¹è®¾ç½®æ—¶ï¼Œè¿›å…¥è¡Œå°¾ä¹‹åŽé‡åˆ°ä»€ä¹ˆè®°å·æ—¶å†³å®šè¾“
% å‡ºå‚è§åˆ—è¡¨ã€‚é€šå¸¸æƒ…å†µä¸‹å¹¶ä¸éœ€è¦è®¾ç½®è¯¥é€‰é¡¹ï¼Œ|enditem| é€‰é¡¹çš„é»˜è®¤å€¼å·²ç»åŒ…æ‹¬äº†åœ¨
% æ&nbsp;‡å‡†çš„ |theindex| çŽ¯å¢ƒä¸­ä¼šå‡ºçŽ°çš„ä¸€äº›å®ï¼š|\indexspace|ã€|\item|ã€|\subitem|ã€
% |\subsubitem|ã€|\end|ã€‚ä½¿ç”¨ |enditem+| é€‰é¡¹åˆ™å¯ä»¥å‘åˆ—è¡¨ä¸­å¢žåŠ&nbsp;æ–°çš„è®°å·ã€‚ä¾‹
% å¦‚ï¼Œå¦‚æžœæŸç§ç‰¹æ®Šçš„ç´¢å¼•æ”¯æŒ 4 çº§é¡¹ |\subsubsubitem| å’Œç‰¹æ®Šçš„é—´éš”
% |\myindexspace|ï¼Œå°±å¯ä»¥ä½¿ç”¨
% \begin{Verbatim}
% \seealsosetup{enditem+={\subsubsubitem,\myindexspace}}
% \end{Verbatim}
% å‘åˆ—è¡¨ä¸­æ·»åŠ&nbsp;æ–°çš„è®°å·ã€‚
%
% \DescribeMacro{\SeealsoGobble}
% |\SeealsoGobble| å®æŽ¥å—ä¸€ä¸ªå­—ç¬¦ä½œä¸ºå‚æ•°ï¼Œå®ƒæ£€æŸ¥åŽé¢æ˜¯å¦æœ‰æ­¤å­—ç¬¦ï¼Œå¦‚æžœæ˜¯åˆ™åž
% æŽ‰æ­¤å­—ç¬¦åŠåŽé¢çš„ç©ºæ&nbsp;¼ï¼Œå¦åˆ™ä»€ä¹ˆéƒ½ä¸åšã€‚åœ¨ |pageformat| é€‰é¡¹ä¸­ä½¿ç”¨è¿™ä¸ªå®å¯ä»¥ç”¨
% æ¥ç¦æ­¢æ˜¾ç¤ºå‚è§é¡¹çš„é¡µç&nbsp;ï¼Œåƒä¸‹é¢è¿™æ&nbsp;·ï¼š
% \begin{Verbatim}
% \seealsosetup[see,also]{pageformat=\SeealsoGobble{,}}
% \end{Verbatim}
%
% \section{å·²çŸ¥é—®é¢˜}
%
% ä»¥ä¸‹æ˜¯ä¸€äº›å·²çŸ¥çš„é—®é¢˜å’Œè§£å†³æ–¹æ¡ˆï¼š
% \begin{itemize}
% \item
% ç”±äºŽ |\seepage|, |\seealsopage| çš„é¡µç&nbsp;æ˜¾ç¤ºå½¢å¼ä¸Žæ™®é€šé¡µç&nbsp;ç›¸åŒï¼Œæ‰€ä»¥å¯èƒ½ä¼šé€&nbsp;æˆ
% é¡µç&nbsp;é‡å&nbsp;çš„æƒ…å†µã€‚æœ€å¥½å°½é‡é¿å…äº¤å‰å¼•ç”¨çš„é¡¹ç›®æœ‰å¤šç§å½¢å¼çš„ç´¢å¼•ã€‚å¦‚æžœä¸èƒ½é¿å…ï¼Œä¸º
% è§£å†³æ­¤é—®é¢˜ï¼Œå¯ä»¥è®¾ç½®ç‰¹åˆ«çš„é¡µç&nbsp;è¾“å‡ºæ&nbsp;¼å¼ä»¥ç¤ºåŒºåˆ†ï¼Œæˆ–è€…å€Ÿç”¨ |\SeealsoGobble| è®¾
% ç½®ä¸è¾“å‡ºé¡µç&nbsp;ã€‚
% \end{itemize}
%
% \StopEventually{}
%
% \clearpage
% \section{Implementation / ä»£ç&nbsp;å®žçŽ°}
%
% \iffalse
%&lt;*package&gt;
% \fi
%
% \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}
% {&lt;listmacro&gt;}{&lt;string&gt;}{&lt;true&gt;}{&lt;false&gt;}
\long\def\seealso@ifinlist@#1#2#3#4{%
  \def\next{#4}%
  \def\do##1{%
    \ifstrequal{##1}{#2}
      {\def\next{#3}\listbreak}
      {}}%
  \dolistloop{#1}%
  \next}
% {&lt;string&gt;}{&lt;listmacro&gt;}{&lt;true&gt;}{&lt;false&gt;}
\protected\long\def\seealso@ifinlist#1#2{%
  \seealso@ifinlist@{#2}{#1}}
% {&lt;string&gt;}{&lt;listcsname&gt;}{&lt;true&gt;}{&lt;false&gt;}
\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,
  prefix=seealso@,
  setkeys=\kvsetkeys}
%    \end{macrocode}
%
% å£°æ˜Žå®åŒ…é€‰é¡¹ã€‚
%
% \begin{option}{override}
% \changes{v1.0}{2014/04/05}{æ–°å¢žé€‰é¡¹ã€‚}
% é‡å®šä¹‰ |\see| ä¸Ž |\seealso| ä¸ºæœ‰é¡µç&nbsp;çš„å½¢å¼ã€‚é»˜è®¤æ‰“å¼€ã€‚
%    \begin{macrocode}
\DeclareBoolOption[true]{override}
%    \end{macrocode}
% \end{option}
%
% \begin{option}{activecr}
% \changes{v1.0}{2014/04/05}{æ–°å¢žé€‰é¡¹ã€‚}
% ä½¿ç”¨æ¢è¡Œç¬¦ä½œä¸ºè¾“å‡º |\see| ç­‰å‘½ä»¤çš„æŒ‡ä»¤ã€‚é»˜è®¤æ‰“å¼€ã€‚
%    \begin{macrocode}
\DeclareBoolOption[true]{activecr}
%    \end{macrocode}
% \end{option}
%
% æ‰§è¡Œé€‰é¡¹ã€‚
%    \begin{macrocode}
\ProcessKeyvalOptions*
%    \end{macrocode}
%
% \begin{macro}{\seealso@charlet}
% å‚æ•° |#1| æ˜¯ä¸€ä¸ªå­—ç¬¦æˆ– |\| åŠ&nbsp;å­—ç¬¦çš„å½¢å¼ï¼Œ|\seealso@charlet| å°†æ­¤å­—ç¬¦çœ‹åšæ´»åŠ¨
% å­—ç¬¦çš„å®ï¼Œä½¿ç”¨ |\let| ä¸ŽåŽé¢çš„å†…å®¹èµ‹å€¼ï¼Œä½†æœ¬èº«ä¸æ”¹å˜å­—ç¬¦çš„ catcodeã€‚
%    \begin{macrocode}
\def\seealso@charlet#1{%
  \begingroup\lccode`\~=`#1\lowercase{\endgroup\let~}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{å‚è§åˆ—è¡¨åŠå…¶å®žçŽ°}
%
% \begin{macro}{\seealso@macrolist}
% åˆ—è¡¨è®°å½•æ‰€æœ‰ç‹¬ç«‹çš„ç±»ä¼¼ |\seepage| çš„å®ã€‚é»˜è®¤åªæœ‰ |see| å’Œ |also| ä¸¤ç»„ï¼Œå¯¹åº”
% å‘½ä»¤ |\seepage| å’Œ |\seealsopage|ã€‚
%    \begin{macrocode}
\let\seealso@macrolist\empty
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@clearlist}
% æ¸…ç©ºå‚è§åˆ—è¡¨ï¼Œå¦‚ |\seealso@see@list|ã€|\seealso@also@list|ã€‚
%    \begin{macrocode}
\def\seealso@clearlist#1{%
  \global\cslet{seealso@#1@list}\empty}
\AtBeginDocument{\forlistloop\seealso@clearlist\seealso@macrolist}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SeealsoPrintList}
% è¾“å‡ºå‚è§åˆ—è¡¨ï¼Œå¦‚ |\seealso@see@list|ã€|\seealso@also@list|ã€‚
%    \begin{macrocode}
\newcommand\SeealsoPrintList{%
  \forlistloop\seealso@printlist\seealso@macrolist
  \forlistloop\seealso@clearlist\seealso@macrolist}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ifseealso@gobblefirstlistsep}
% æµ‹è¯•æ˜¯å¦å¿½ç•¥ç¬¬ä¸€ä¸ªåˆ—è¡¨åˆ†éš”ç¬¦ï¼ˆå›&nbsp;ä¸ºå‰é¢ä½¿ç”¨äº† |\SeealsoGobble|ï¼‰ã€‚
%    \begin{macrocode}
\newif\ifseealso@gobblefirstlistsep
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ifseealso@firstitem}
% æµ‹è¯•æ˜¯å¦æ˜¯åœ¨è¾“å‡ºå‚è§åˆ—è¡¨çš„ç¬¬ä¸€é¡¹ã€‚
%    \begin{macrocode}
\newif\ifseealso@firstitem
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@printlist}
% è¾“å‡ºå‚è§åˆ—è¡¨ |#1|ã€‚å¦‚æžœåˆ—è¡¨ä¸ºç©ºåˆ™æ—&nbsp;æ“ä½œã€‚
%    \begin{macrocode}
\def\seealso@printlist#1{%
  \ifcsempty{seealso@#1@list}
    {}
    {\ifseealso@gobblefirstlistsep
       \seealso@gobblefirstlistsepfalse
     \else
       \csuse{seealso@#1@listsep}%
     \fi
     \csuse{seealso@#1@nameformat}{\csuse{#1name}}%
     \seealso@firstitemtrue
     \forlistcsloop{\seealso@listitem{#1}}{seealso@#1@list}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@listitem}
% è¾“å‡ºå‚è§åˆ—è¡¨çš„ä¸€é¡¹ã€‚å¦‚æžœä¸æ˜¯ç¬¬ä¸€é¡¹ï¼ŒåŒæ—¶è¾“å‡ºåˆ†éš”ç¬¦ã€‚
%    \begin{macrocode}
\def\seealso@listitem#1#2{%
  \ifseealso@firstitem
    \seealso@firstitemfalse
  \else
    \csuse{seealso@#1@itemsep}%
  \fi
  \csuse{seealso@#1@itemformat}{#2}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DeclareSeealsoMacro}
% \changes{v1.0}{2014/04/05}{æ–°å¢žä»¥å®šä¹‰æ–°çš„å‚è§å‘½ä»¤ã€‚}
% å®šä¹‰ä¸€ä¸ªæ–°çš„å¸¦é¡µç&nbsp;çš„å‚è§å‘½ä»¤ã€‚|#1| æ˜¯å‘½ä»¤åï¼Œ|#2| æ˜¯è¯¥å‘½ä»¤ä½¿ç”¨çš„å‚è§åˆ—
% è¡¨ï¼Œ|#3| æ˜¯åˆ—è¡¨è¾“å‡ºæ—¶ä½¿ç”¨çš„åå­—ã€‚
%    \begin{macrocode}
\newcommand\DeclareSeealsoMacro[3]{%
%    \end{macrocode}
% é¦–å…ˆå®šä¹‰å‚è§å‘½ä»¤ |#1| æœ¬èº«ã€‚
%    \begin{macrocode}
  \newcommand#1[2]{%
    \seealso@setactivecr
    \seealso@ifinlistcs{##1}{seealso@#2@list}
      {}
      {\listcsgadd{seealso@#2@list}{##1}}%
    \csuse{seealso@#2@pageformat}{##2}}%
%    \end{macrocode}
% å°†å‚è§å‘½ä»¤åŠ&nbsp;å…¥åˆ—è¡¨ã€‚
%    \begin{macrocode}
  \listadd\seealso@macrolist{#2}%
%    \end{macrocode}
% å®šä¹‰ |name| é€‰é¡¹ï¼Œç”¨æ¥è®¾ç½® |\|\meta{macro}|name|ã€‚å¦‚ |\seename| å’Œ
% |\alsoname|ã€‚
%    \begin{macrocode}
  \define@key{seealso@#2}{name}{%
    \csdef{#2name}{##1}}%
%    \end{macrocode}
% å¦‚æžœäº‹å…ˆæ²¡æœ‰å®šä¹‰ï¼Œåˆ™å®šä¹‰ |\|\meta{macro}|name| ä¸º |#3|ã€‚
%    \begin{macrocode}
  \ifcsdef{#2name}
    {}
    {\kvsetkeys{seealso@#2}{name=#3}}%
%    \end{macrocode}
% å®šä¹‰æ—&nbsp;å‚é€‰é¡¹ã€‚
%    \begin{macrocode}
  \def\do##1{%
    \define@key{seealso@#2}{##1}{%
      \csdef{seealso@#2@##1}{####1}}%
    \kvsetkeys{seealso@#2}{##1=\csuse{seealso@##1}}}%
  \docsvlist{listsep,itemsep}%
%    \end{macrocode}
% å®šä¹‰æœ‰ä¸€ä¸ªå‚æ•°çš„é€‰é¡¹ã€‚
%    \begin{macrocode}
  \def\do##1{%
    \define@key{seealso@#2}{##1}{%
      \csdef{seealso@#2@##1}########1{####1}}%
      \kvsetkeys{seealso@#2}{##1=\csuse{seealso@##1}{####1}}}%
  \docsvlist{nameformat,itemformat,pageformat}}
\@onlypreamble{\DeclareSeealsoMacro}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ifseealso@iscractive}
% åˆ¤æ–­å½“å‰æ¢è¡Œç¬¦æ˜¯å¦å·²ç»è¢«æ¿€æ´»ã€‚
%    \begin{macrocode}
\newif\ifseealso@iscractive
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@setactivecr}
% |activecr| é€‰é¡¹ä¸ºçœŸæ—¶ï¼Œè®¾ç½®æ¢è¡Œç¬¦ä¸º |\seealso@cr| å¹¶æ¿€æ´»ã€‚
%    \begin{macrocode}
\def\seealso@setactivecr{%
  \ifseealso@activecr
    \unless\ifseealso@iscractive
      \catcode`\^^M=\active
      \seealso@charlet\^^M\seealso@cr
      \seealso@iscractivetrue
    \fi
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@cr}
% \changes{v1.1}{2014/04/07}{å¤„ç†æŠ˜è¡Œé—®é¢˜ã€‚}
% æ˜¯åœ¨ |activecr| é€‰é¡¹ä¸‹ï¼Œæ¢è¡Œç¬¦çš„å®šä¹‰ã€‚å®ƒæ£€æµ‹åŽé¢çš„è®°å·æ˜¯å¦åœ¨
% |\seealso@enditemlist| ä¸­ï¼Œä»¥åˆ¤æ–­æ˜¯å¦å¤„äºŽæŠ˜è¡ŒçŠ¶æ€ï¼Œå†³å®šæ˜¯å¦è¾“å‡ºåˆ—è¡¨ã€‚
%    \begin{macrocode}
\def\seealso@cr{%
  \futurelet\next\seealso@cr@aux}
%    \end{macrocode}
% |\seealso@cr@aux| æ˜¯å®žé™…å®Œæˆåˆ¤æ–­æŠ˜è¡Œä¸Žè¾“å‡ºçš„è¾…åŠ©è¿‡ç¨‹ã€‚å¦‚æžœæŠ˜è¡Œï¼Œåˆ™è¡¥å…¨æŠ˜è¡Œé€&nbsp;
% æˆçš„ç©ºç™½ï¼›å¦åˆ™å–æ¶ˆæ¿€æ´»æ¢è¡Œç¬¦ä¸ºå®ï¼Œå¹¶è¾“å‡ºå‚è§åˆ—è¡¨ã€‚
%    \begin{macrocode}
\def\seealso@cr@aux{%
  \seealso@testwrap
  \ifseealso@wrap
    \space
  \else
    \catcode`\^^M=5
    \seealso@iscractivefalse
    \SeealsoPrintList
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ifseealso@wrap}
% åˆ¤æ–­å½“å‰æ˜¯å¦åœ¨æŠ˜è¡Œçš„è¡Œå°¾ã€‚
%    \begin{macrocode}
\newif\ifseealso@wrap
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@testwrap}
% æ£€æŸ¥ç”± |\seealso@cr| èŽ·å–çš„ä¸‹ä¸€è®°å· |\next| æ˜¯å¦åœ¨åˆ—è¡¨
% |\seealso@enditemlist| ä¸­ï¼Œç¡®å®šå½“å‰æ˜¯å¦åœ¨æŠ˜è¡Œè¡Œå°¾ã€‚
%    \begin{macrocode}
\def\seealso@testwrap{%
  \seealso@wraptrue
  \forlistloop\seealso@testwrap@aux\seealso@enditemlist}
\def\seealso@testwrap@aux#1{%
  \ifx#1\next
    \seealso@wrapfalse
    \expandafter\listbreak
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@enditemlist}
% è¡¨ç¤ºç´¢å¼•é¡¹ç»“æŸçš„è®°å·åˆ—è¡¨ã€‚ç”¨äºŽåˆ¤æ–­æ˜¯å¦å¤„äºŽæŠ˜è¡ŒçŠ¶æ€ã€‚
%    \begin{macrocode}
\let\seealso@enditemlist\empty
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@enditemlistadd}
% å‘ç»“æŸè®°å·åˆ—è¡¨ä¸­å¢žåŠ&nbsp;ä¸€é¡¹ã€‚
%    \begin{macrocode}
\def\seealso@enditemlistadd#1{%
  \seealso@ifinlist{#1}\seealso@enditemlist
    {}
    {\listadd\seealso@enditemlist{#1}}}
%    \end{macrocode}
% \end{macro}
% ä¸‹é¢å®šä¹‰ç»“æŸè®°å·åˆ—è¡¨çš„åœ¨ |seealso| æ—ä¸‹çš„é”® |enditem| ä¸Ž |enditem+|ï¼Œå…è®¸ç”¨
% æˆ·è‡ªå®šä¹‰æ­¤åˆ—è¡¨ã€‚è¿™é‡Œè¦æ±‚åˆ—è¡¨æ€»åŒ…å« |\seealso@cr|ã€‚
%    \begin{macrocode}
\define@key{seealso}{enditem}{%
  \let\seealso@enditemlist\empty
  \listadd\seealso@enditemlist{\seealso@cr}%
  \forcsvlist\seealso@enditemlistadd{#1}}
\define@key{seealso}{enditem+}{%
  \forcsvlist\seealso@enditemlistadd{#1}}
%    \end{macrocode}
% ç»“æŸè®°å·åˆ—è¡¨çš„é»˜è®¤å€¼ï¼Œé™¤äº† |\seealso@cr| å¤–ï¼Œè¿˜åŒ…æ‹¬é€šå¸¸åœ¨ |theindex| ç­‰çŽ¯å¢ƒ
% ä¸­å‡ºçŽ°çš„å…¶ä»–ä¸€äº›å®ã€‚
%    \begin{macrocode}
\kvsetkeys{seealso}{%
  enditem={\indexspace,\item,\subitem,\subsubitem,\end}}
%    \end{macrocode}
%
% ä¸‹é¢å®šä¹‰å‚è§åˆ—è¡¨çš„é»˜è®¤è¾“å‡ºæ&nbsp;¼å¼ã€‚ä»¥ä¸‹å®ç»™å‡ºçš„éƒ½æ˜¯å…¨å±€çš„é»˜è®¤å€¼ï¼Œå¯ä»¥å•ç‹¬ä¿®æ”¹æ¯
% ä¸€é¡¹çš„è¾“å‡ºæ&nbsp;¼å¼ã€‚
% \begin{macro}{\seealso@listsep}
% å‚è§åˆ—è¡¨ä¹‹å‰çš„åˆ†éš”ç¬¦ã€‚
%    \begin{macrocode}
\def\seealso@listsep{,\space}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\seealso@itemsep}
% å‚è§åˆ—è¡¨é¡¹ä¹‹é—´çš„åˆ†éš”ç¬¦ã€‚
%    \begin{macrocode}
\def\seealso@itemsep{,\space}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\seealso@nameformat}
% å‚è§åâ€œsee alsoâ€çš„è¾“å‡ºæ&nbsp;¼å¼ã€‚
%    \begin{macrocode}
\def\seealso@nameformat#1{\emph{#1}\space}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\seealso@itemformat}
% å‚è§åˆ—è¡¨é¡¹çš„è¾“å‡ºæ&nbsp;¼å¼ã€‚
%    \begin{macrocode}
\def\seealso@itemformat#1{#1}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\seealso@pageformat}
% å‚è§é¡µç&nbsp;çš„è¾“å‡ºæ&nbsp;¼å¼ã€‚
%    \begin{macrocode}
\def\seealso@pageformat#1{#1}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seealso@define@key}
% \begin{macro}{\seealso@define@keyarg}
% å®šä¹‰ |seealso| æ—çš„é”®ï¼Œç”¨äºŽè®¾ç½®è¾“å‡ºæ&nbsp;¼å¼ã€‚
%    \begin{macrocode}
\def\seealso@define@key#1{%
  \define@key{seealso}{#1}{%
    \csdef{seealso@#1}{##1}}}
\def\seealso@define@keyarg#1{%
  \define@key{seealso}{#1}{%
    \csdef{seealso@#1}####1{##1}}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% ä¸ºæ¯ä¸ªè¾“å‡ºæ&nbsp;¼å¼å®šä¹‰é”®ã€‚
%    \begin{macrocode}
\forcsvlist\seealso@define@key{listsep,itemsep}
\forcsvlist\seealso@define@keyarg{nameformat,itemformat,pageformat}
%    \end{macrocode}
%
% \begin{macro}{\SeealsoGobble}
% \changes{v1.0}{2014/04/06}{æ”¯æŒåžæŽ‰åˆ†éš”ç¬¦çš„é¡µç&nbsp;æ&nbsp;¼å¼ï¼Œå³ä¸æ˜¾ç¤ºé¡µç&nbsp;ã€‚}
% \changes{v1.1}{2014/04/07}{å¤„ç† \pkg{hyperref} å…¼å®¹æ€§ã€‚}
% \changes{v1.1}{2014/04/09}{ä¸å†è¦æ±‚è®¾ç½® \texttt{listsep} ä¸ºç©ºã€‚}
% æ£€æŸ¥åŽé¢çš„å­—ç¬¦æ˜¯å¦ |#1|ï¼Œå¦‚æžœæ˜¯åˆ™åžæŽ‰åˆ†éš”ç¬¦ |#1| åŠåŽé¢çš„ç©ºæ&nbsp;¼ã€‚è¿™ä¸ªå®å¯ç”¨äºŽ
% è®¾ç½® |pageformat| æ&nbsp;¼å¼ï¼ŒåžæŽ‰ä¸€ä¸ªç±»ä¼¼ |,\space| ç±»åž‹çš„åˆ†éš”ç¬¦ã€‚
%
% è¿™é‡Œæ£€æŸ¥æ˜¯å¦å®šä¹‰äº† \pkg{hyperref} çš„ |\hyperindexformat|ï¼ˆè¡¨ç¤ºæ‰“å¼€äº†ç´¢å¼•çš„è¶…
% é“¾æŽ¥åŠŸèƒ½ï¼‰ï¼Œå¦‚æžœæœ‰ |\hyperindexformat|ï¼Œåˆ™éœ€è¦è°ƒæ•´å‚æ•°æ¬¡åºä»¥è§£å†³
% |\hyperindexformat| ä¸Ž |\see| ç­‰å‘½ä»¤åµŒå¥—çš„é—®é¢˜ã€‚
%    \begin{macrocode}
\AtBeginDocument{%
  \ifundef\hyperindexformat{%
    \let\SeealsoGobble\seealso@gobble
  }{%
    \def\SeealsoGobble#1{\seealso@swap{\seealso@gobble{#1}}}%
    \def\seealso@swap#1#2#3#4{#2#3#4#1}%
  }}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\seealso@gobble}
% å®žé™…çš„ |\SeealsoGobble| å‘½ä»¤ï¼Œæ£€æŸ¥åŽé¢çš„å­—ç¬¦æ˜¯å¦ |#1|ï¼Œå¦‚æžœæ˜¯åˆ™åžæŽ‰åˆ†éš”ç¬¦
% |#1| åŠåŽé¢çš„ç©ºæ&nbsp;¼ã€‚
%    \begin{macrocode}
\def\seealso@gobble#1{%
  \@ifnextchar#1%
    {\seealso@gobbleignorespaces}
%    \end{macrocode}
% å¦‚æžœ |\SeealsoGobble| åŽé¢å³å°†è¾“å‡ºï¼Œå³ä¸ºæ¢è¡Œç¬¦æˆ– |\SeealsoPrintList|ï¼Œåˆ™å†³å®š
% åŽé¢ä¸å†è¾“å‡ºç¬¬ä¸€ä¸ªå‚è§åˆ—è¡¨çš„ |listsep|ã€‚
%    \begin{macrocode}
    {\ifseealso@activecr
       \ifx\@let@token\seealso@cr
         \seealso@gobblefirstlistseptrue
       \fi
     \else
       \ifx\@let@token\SeealsoPrintList
         \seealso@gobblefirstlistseptrue
       \fi
     \fi}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\seealso@gobbleignorespaces}
% \changes{v1.1}{2014/04/08}{æ­£ç¡®å¤„ç† \cs{SeealsoGobble} åœ¨è‡ªåŠ¨æŠ˜è¡Œä¸‹çš„è¡Œä¸ºã€‚}
% åžæŽ‰åˆ†éš”ç¬¦å‚æ•° |#1|ï¼ˆé€šå¸¸æ˜¯ä¸€ä¸ªé€—å·ï¼‰å¹¶å¿½ç•¥åŽé¢çš„ç©ºæ&nbsp;¼ã€‚
%
% ä¸ºäº†å¤„ç†æŠ˜è¡Œæ—¶ä¼šé‡åˆ°çš„æ¢è¡Œç¬¦å® |\seealso@cr|ï¼Œåœ¨å‘çŽ°åŽé¢çš„å‚æ•°æ˜¯
% |\seealso@cr| æ—¶å°±é€’å½’è°ƒç”¨è‡ªèº«æŠŠ |\seealso@cr| ä¹Ÿæ¸…é™¤æŽ‰ã€‚æ­¤æ—¶å°±å¥½åƒç›´æŽ¥æŠŠä¸¤
% è¡Œè¿žæŽ¥èµ·æ¥ï¼Œä¸å†è°ƒç”¨ |\seealso@cr| çš„å¤æ‚åˆ¤æ–­æµç¨‹ã€‚
%    \begin{macrocode}
\def\seealso@gobbleignorespaces#1{%
  \@ifnextchar\seealso@cr{\seealso@gobbleignorespaces}{\ignorespaces}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{å®šä¹‰ç”¨æˆ·æŽ¥å£}
%
% \begin{macro}{\seealsosetup}
% \changes{v1.0}{2014/04/05}{æ–°å¢žæ&nbsp;¼å¼è®¾ç½®ã€‚}
% \changes{v1.1}{2014/04/09}{æ­£ç¡®å¤„ç†æœ‰å‚æ•°çš„æ&nbsp;¼å¼ã€‚}
% è®¾ç½®è¾“å‡ºæ&nbsp;¼å¼ã€‚å¯é€‰å‚æ•°æ˜¯ä¸€ä¸ªé€—å·åˆ—è¡¨ï¼šå¦‚æžœå¯é€‰å‚æ•°ä¸ºç©ºï¼Œç”¨ |#2| è®¾ç½®é»˜è®¤çš„è¾“
% å‡ºæ&nbsp;¼å¼ï¼›å¦åˆ™å¯¹å¯é€‰å‚æ•°çš„æ¯ä¸€é¡¹ï¼Œè®¾ç½®å‚æ•° |#2| çš„æ&nbsp;¼å¼ã€‚ä¸ºäº†é¿å…å›&nbsp;åµŒå¥—å®šä¹‰é€&nbsp;
% æˆä½¿ç”¨æ—¶å‚æ•°ä¸å¾—ä¸ä½¿ç”¨åŒé‡ |##|ï¼Œè¿™é‡Œä½œäº†ç‰¹åˆ«çš„å±•å¼€å¤„ç†ã€‚
%    \begin{macrocode}
\newcommand\seealsosetup[2][]{%
  \ifstrempty{#1}{%
    \kvsetkeys{seealso}{#2}%
  }{%
    \edef\do##1{%
      \noexpand\kvsetkeys{seealso@##1}{\unexpanded{#2}}}%
    \docsvlist{#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seenopage}
% \begin{macro}{\seealsonopage}
% ä¿å­˜æ—§çš„ |\see| ä¸Ž |\seealso| å‘½ä»¤å®šä¹‰ï¼Œä½¿ç”¨ |override| é€‰é¡¹æ—¶å¯ä¸´æ—¶ä½¿ç”¨æ—§çš„
% å®šä¹‰ã€‚
%    \begin{macrocode}
\let\seenopage\see
\let\seealsonopage\seealso
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\seepage}
% \begin{macro}{\seealsopage}
% å¸¦é¡µç&nbsp;è¾“å‡ºçš„ |\seepage| ä¸Ž |\seealsopage|ã€‚ä½¿ç”¨ |override| é€‰é¡¹æ—¶å¯ç›´æŽ¥ä½¿ç”¨
% |\see| ä¸Ž |\seealso| ä»£æ›¿ |\seepage| ä¸Ž |\seealsopage|ã€‚
%
% å¦‚æžœä¹‹å‰æ²¡æœ‰å®šä¹‰ï¼Œè¿™é‡Œä¼šåŒæ—¶å®šä¹‰ |\seename| å’Œ |\alsoname|ï¼Œä¸Ž \pkg{makeidx}
% åˆå§‹å€¼ä¸€è‡´ã€‚
%    \begin{macrocode}
\DeclareSeealsoMacro\seepage{see}{see}
\DeclareSeealsoMacro\seealsopage{also}{see also}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\see}
% \begin{macro}{\seealso}
% ä½¿ç”¨ |override| æ—¶ï¼Œé‡å®šä¹‰ |\see| ä¸Ž |\seealso|ã€‚
%    \begin{macrocode}
\ifseealso@override
  \def\see{\seepage}
  \def\seealso{\seealsopage}
\fi
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \iffalse
%&lt;/package&gt;
% \fi
%
% \Finale
\endinput
</pre></body></html>