aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/refman/Setoid.tex2
-rw-r--r--doc/refman/headers.tex89
2 files changed, 60 insertions, 31 deletions
diff --git a/doc/refman/Setoid.tex b/doc/refman/Setoid.tex
index 030400e5cd..64aefee1f6 100644
--- a/doc/refman/Setoid.tex
+++ b/doc/refman/Setoid.tex
@@ -51,7 +51,7 @@ reflexive, symmetric and transitive.
A parametric unary function $f$ of type
\texttt{forall ($x_1$:$T_1$) \ldots ($x_n$:$T_n$), $A_1$ -> $A_2$}
covariantly respects two parametric relation instances $R_1$ and $R_2$ if,
-whenever $m, n$ satisfy $R_1~x~y$, their images $(f~x)$ and $(f~y)$
+whenever $x, y$ satisfy $R_1~x~y$, their images $(f~x)$ and $(f~y)$
satisfy $R_2~(f~x)~(f~y)$ . An $f$ that respects its input and output relations
will be called a unary covariant \emph{morphism}. We can also say that $f$ is
a monotone function with respect to $R_1$ and $R_2$. The sequence $x_1,\ldots x_n$ represents the parameters of the morphism.
diff --git a/doc/refman/headers.tex b/doc/refman/headers.tex
index 21b3b6e851..bb84fb4796 100644
--- a/doc/refman/headers.tex
+++ b/doc/refman/headers.tex
@@ -28,6 +28,65 @@
\protect\addcontentsline{toc}{chapter}{Bibliography}Bibliography}
%END LATEX
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Commands for indexes
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{index}
+\makeindex
+\newindex{tactic}{tacidx}{tacind}{%
+\protect\setheaders{Tactics Index}%
+\protect\addcontentsline{toc}{chapter}{Tactics Index}Tactics Index}
+
+\newindex{command}{comidx}{comind}{%
+\protect\setheaders{Vernacular Commands Index}%
+\protect\addcontentsline{toc}{chapter}{Vernacular Commands Index}%
+Vernacular Commands Index}
+
+\newindex{error}{erridx}{errind}{%
+\protect\setheaders{Index of Error Messages}%
+\protect\addcontentsline{toc}{chapter}{Index of Error Messages}Index of Error Messages}
+
+\renewindex{default}{idx}{ind}{%
+\protect\addcontentsline{toc}{chapter}{Global Index}%
+\protect\setheaders{Global Index}Global Index}
+
+\newcommand{\tacindex}[1]{%
+\index{#1@\texttt{#1}}\index[tactic]{#1@\texttt{#1}}}
+\newcommand{\comindex}[1]{%
+\index{#1@\texttt{#1}}\index[command]{#1@\texttt{#1}}}
+\newcommand{\errindex}[1]{\texttt{#1}\index[error]{#1}}
+\newcommand{\errindexbis}[2]{\texttt{#1}\index[error]{#2}}
+\newcommand{\ttindex}[1]{\index{#1@\texttt{#1}}}
+\makeatother
+
+% The following code creates another command \@indexlabel, which,
+% along with Hevea's \@currentlabel serves to store the current values
+% of counters. However, \@currentlabel keeps the value of counters
+% incremented by \refstepcounter (see the definition of
+% \refstepcounter in latexcommon.hva), which includes chapter and
+% section counters, as well as theorems, \items, etc. On the other
+% hand, \@indexlabel keeps only the values of sectioning counters.
+% This is done by redefining the sectioning commands.
+%HEVEA \newcommand{\@indexlabel}{}
+%HEVEA \let\oldchapter=\chapter
+%HEVEA \let\oldsection=\section
+%HEVEA \let\oldsubsection=\subsection
+%HEVEA \let\oldsubsubsection=\subsubsection
+%HEVEA \let\oldparagraph=\paragraph
+%HEVEA \let\oldsubparagraph=\subparagraph
+%HEVEA \renewcommand{\chapter}[1]{\oldchapter{#1}\let\@indexlabel=\@currentlabel}
+%HEVEA \renewcommand{\section}[1]{\oldsection{#1}\let\@indexlabel=\@currentlabel}
+%HEVEA \renewcommand{\subsection}[1]{\oldsubsection{#1}\let\@indexlabel=\@currentlabel}
+%HEVEA \renewcommand{\subsubsection}[1]{\oldsubsubsection{#1}\let\@indexlabel=\@currentlabel}
+%HEVEA \renewcommand{\paragraph}[1]{\oldparagraph{#1}\let\@indexlabel=\@currentlabel}
+%HEVEA \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\let\@indexlabel=\@currentlabel}
+% The only difference of the following command with the original one
+% defined in index.hva is that the latter uses \@currentlabel instead
+% of \@indexlabel
+% Also, for some reason, the following command produces an error if
+% not given on one line. Need to submit to Hevea developers.
+%HEVEA \renewcommand{\index}[2][default]{\if@refs\sbox{\@indexbox}{\@indexwrite[#1]{#2}{\@indexlabel}}\@locname{\usebox{\@indexbox}}{}\fi}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For the Addendum table of contents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -63,36 +122,6 @@
\immediate\closeout\RefManCut@out}
%END LATEX
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Commands for indexes
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage{index}
-\makeindex
-\newindex{tactic}{tacidx}{tacind}{%
-\protect\setheaders{Tactics Index}%
-\protect\addcontentsline{toc}{chapter}{Tactics Index}Tactics Index}
-
-\newindex{command}{comidx}{comind}{%
-\protect\setheaders{Vernacular Commands Index}%
-\protect\addcontentsline{toc}{chapter}{Vernacular Commands Index}%
-Vernacular Commands Index}
-
-\newindex{error}{erridx}{errind}{%
-\protect\setheaders{Index of Error Messages}%
-\protect\addcontentsline{toc}{chapter}{Index of Error Messages}Index of Error Messages}
-
-\renewindex{default}{idx}{ind}{%
-\protect\addcontentsline{toc}{chapter}{Global Index}%
-\protect\setheaders{Global Index}Global Index}
-
-\newcommand{\tacindex}[1]{%
-\index{#1@\texttt{#1}}\index[tactic]{#1@\texttt{#1}}}
-\newcommand{\comindex}[1]{%
-\index{#1@\texttt{#1}}\index[command]{#1@\texttt{#1}}}
-\newcommand{\errindex}[1]{\texttt{#1}\index[error]{#1}}
-\newcommand{\errindexbis}[2]{\texttt{#1}\index[error]{#2}}
-\newcommand{\ttindex}[1]{\index{#1@\texttt{#1}}}
-\makeatother