alphabetical list of refpages, now also for ps/pdf

This commit is contained in:
Andreas Meyer 2006-04-15 21:19:19 +00:00
parent bcdca3ec9f
commit c046987bd0
1 changed files with 85 additions and 40 deletions

View File

@ -8,8 +8,8 @@
% | Zurich, Switzerland | % | Zurich, Switzerland |
% | 15.09.1999 Susan Hert hert@mpi-sb.mpg.de | % | 15.09.1999 Susan Hert hert@mpi-sb.mpg.de |
% | Saarbruecken, Germany | % | Saarbruecken, Germany |
% | $Id$ | % | $Id$ |
% | $Date$ | % | $Date$ |
% |_________________________________________________________________________| % |_________________________________________________________________________|
% |#########################################################################| % |#########################################################################|
% | | % | |
@ -39,6 +39,13 @@
% | | % | |
% |#########################################################################| % |#########################################################################|
% used for writing the refpage entries.
\newwrite\ccListOfRefpagesFile%
% contains all processed "ccCurrentFilename"s
\newwrite\ccListOfProcessedFilenames%
% used to test if a file exists
\newread\mydummyinstream
% Set this definition to \ccTrue to activate the old name definitions % Set this definition to \ccTrue to activate the old name definitions
% which are still there for portability reasons. % which are still there for portability reasons.
@ -49,9 +56,23 @@
%\tracingmacros=1 %\tracingmacros=1
\newcommand{\ccEnableRawListOfRefpages}{} \newcommand{\ccEnableRawListOfRefpages}{\gdef\ccIfPrintRawListOfRefpages{\ccTrue}}
\newcommand{\ccEnableSortedListOfRefpages}{} \newcommand{\ccEnableSortedListOfRefpages}{\gdef\ccIfPrintRawListOfRefpages{\ccFalse}}
\newcommand{\ccPrintSortedListOfRefpages}{} \newcommand{\ccPrintSortedListOfRefpages}{
\section{Alphabetical List of Reference Pages}
\openin\expandafter\mydummyinstream= \ccCurrentFilename/listofrefpages
\ifeof\mydummyinstream
\relax
\else
\closein\mydummyinstream
\begingroup
\catcode`_=12
\expandafter\input{\ccCurrentFilename/listofrefpages}
\endgroup
\fi
}
\ccEnableSortedListOfRefpages
% \ccRevision and \ccDate can be found below of \RCSdef and \RCSdefDate % \ccRevision and \ccDate can be found below of \RCSdef and \RCSdefDate
% There is also the code to print the message during the typesetting. % There is also the code to print the message during the typesetting.
@ -114,8 +135,14 @@
\newcommand{\ccRefChapter}[1]{% \newcommand{\ccRefChapter}[1]{%
\chapter{#1\\ \chapter{#1\\
Reference~Manual}% Reference~Manual}%
\ifnum\ccInsideListOfRefpages=\ccTrue
\gdef\ccInsideListOfRefpages{\ccFalse}%
\immediate\closeout\ccListOfRefpagesFile%
\fi
\ccEnableSortedListOfRefpages
} }
\gdef\ccInsideListOfRefpages{\ccFalse}%
% ___________________________________________________________________________ % ___________________________________________________________________________
% ########################################################################### % ###########################################################################
% | % |
@ -1047,11 +1074,6 @@ Reference~Manual}%
% #2 == item name (actually parsed later by ccRefDeclarationX) % #2 == item name (actually parsed later by ccRefDeclarationX)
\catcode`@=11 \catcode`@=11
\newenvironment{ccRefDeclaration}[1]{% \newenvironment{ccRefDeclaration}[1]{%
\ifnum\ccRefPageBreak=\ccTrue
\ifnum\ccNewRefManualStyle=\ccTrue
\clearpage \thispagestyle{plain}
\fi
\fi
\gdef\ccRefCategory{#1}% \gdef\ccRefCategory{#1}%
\gdef\ccPureRefScope{}% \gdef\ccPureRefScope{}%
\gdef\ccRefScope{}% \gdef\ccRefScope{}%
@ -1079,36 +1101,49 @@ Reference~Manual}%
\catcode`@=12 \catcode`@=12
\gdef\ccRefDeclarationX #1{% \gdef\ccRefDeclarationX #1{%
\endgroup \endgroup
\gdef\ccPureRefName{#1}%
\ifnum\ccCurrentIndexCat=\ccIndexConceptCat% \ifnum\ccInsideListOfRefpages=\ccFalse
\renewcommand{\ccRefName}{{{% \gdef\ccInsideListOfRefpages{\ccTrue}%
\ccPrintTokens #1\ccEnd\ccEndFont}}}% \ifnum\ccIfPrintRawListOfRefpages=\ccFalse
\else\ifnum\ccCurrentIndexCat=\ccIndexFunctionObjectConceptCat% \ccPrintSortedListOfRefpages
\renewcommand{\ccRefName}{{{% \fi
\ccPrintTokens #1\ccEnd\ccEndFont}}}% \begingroup
\else \catcode`_=12
\renewcommand{\ccRefName}{{{\ccFont \openout\expandafter\ccListOfRefpagesFile= \ccCurrentFilename/listofrefpages
\ccPrintTokens #1\ccEnd\ccEndFont}}}% \endgroup
\fi\fi \fi
\ccRefPageBegin
\ccRefSection{\ccRefCategory}{#1}% \ifnum\ccRefPageBreak=\ccTrue
\label{ccRef_\ccRefPureGlobalScope\ccPureRefScope #1}% \ifnum\ccNewRefManualStyle=\ccTrue
% needed for compliance with ccClass \clearpage \thispagestyle{plain}
\gdef\ccPureClassTemplateName{#1}% \fi
\renewcommand{\ccClassTemplateName}{{{\ccFont \fi
\ccPrintTokens #1\ccEnd\ccEndFont}}}%
\ifnum\ccAutoIndex=\ccTrue% \gdef\ccPureRefName{#1}%
\ccIndexRefDeclarationBegin% \ifnum\ccCurrentIndexCat=\ccIndexConceptCat%
\fi% \renewcommand{\ccRefName}{{{%
%\begingroup \ccPrintTokens #1\ccEnd\ccEndFont}}}%
% \tracingall \else\ifnum\ccCurrentIndexCat=\ccIndexFunctionObjectConceptCat%
% \catcode`_=12 \renewcommand{\ccRefName}{{{%
% \expandafter\addcontentslineX{\ccCurrentFilename} \ccPrintTokens #1\ccEnd\ccEndFont}}}%
%\endgroup \else
\addcontentsline{ref}{refpage}{\protect\ccc{\ccPureRefName}} \renewcommand{\ccRefName}{{{\ccFont
} \ccPrintTokens #1\ccEnd\ccEndFont}}}%
%\gdef\addcontentslineX#1{\addcontentsline{#1.ref}{refpage}{\protect\ccc{\ccPureRefName}}} \fi\fi
\ccRefPageBegin
\ccRefSection{\ccRefCategory}{#1}%
\label{ccRef_\ccRefPureGlobalScope\ccPureRefScope #1}%
% needed for compliance with ccClass
\gdef\ccPureClassTemplateName{#1}%
\renewcommand{\ccClassTemplateName}{{{\ccFont
\ccPrintTokens #1\ccEnd\ccEndFont}}}%
\ifnum\ccAutoIndex=\ccTrue%
\ccIndexRefDeclarationBegin%
\fi%
\write\ccListOfRefpagesFile{\protect\ccRefIdfierPageLORF{#1}{\ccRefPureGlobalScope\ccPureRefScope#1}\noexpand\\
}}
%% if there's an optional argument (used to specify the scope of a ceratin %% if there's an optional argument (used to specify the scope of a ceratin
%% item, then assume it's a class name for indexing functions (and others???) %% item, then assume it's a class name for indexing functions (and others???)
@ -1266,6 +1301,16 @@ Reference~Manual}%
\fi \fi
} }
\newcommand{\ccRefIdfierPageLORF}{\begingroup\ccCatcode\ccRefIdfierPageLORFX}
\def\ccRefIdfierPageLORFX #1#2{\endgroup%
\ifnum\ccRefPageNumAtMargin=\ccTrue
\ccc{#1}\ccRefPageFill \ccRefPage{#2}%
\else
\ccc{#1} (pg. \pageref{ccRef_#2})%
\fi
}
\newcommand{\ccRefConceptPage}{\begingroup\ccCatcode\ccRefConceptPageX} \newcommand{\ccRefConceptPage}{\begingroup\ccCatcode\ccRefConceptPageX}
\def\ccRefConceptPageX #1{\endgroup% \def\ccRefConceptPageX #1{\endgroup%
\ifnum\ccRefPageNumAtMargin=\ccTrue \ifnum\ccRefPageNumAtMargin=\ccTrue