[Doc] Correct and improve small passages, add example for \newrelation.

This commit is contained in:
Gaetano Geck 2018-04-29 13:36:35 +02:00
parent afb16f8ef4
commit fb9d553134
1 changed files with 36 additions and 4 deletions

View File

@ -94,7 +94,7 @@ then $\interpretation+paren(x_2)=1$ or $\interpretation+paren(x_1) \neq
}
\paragraph*{Remark.}
Using \cverb#\tableofnotation# instead of \verb#\detailedtableofnotation# will result in a table that lists only the symbols with their descriptions.
Using \cverb#\tableofnotation# instead of \verb#\detailedtableofnotation# will result in a table that lists only the symbols with their descriptions.
\newpage
\section{Defining notation}
@ -159,7 +159,7 @@ then $\interpretation+paren(x_2)=1$ or $\interpretation+paren(x_1) \neq
\newcommand{\badpair}[2]{\ensuremath{}\xspace}
Note, however, that this wrapping prevents extra spaces (like those surrounding relation or operator symbols, defined by \verb#\mathrel# or \verb#\mathop#, for example). If you want these extra spaces, you can avoid the additional pair of braces by using the starred version \cverb#\newnotation*#; like for the binary satisfaction relation \verb#\satisfies# above.
Note, however, that this wrapping prevents extra spaces (like those surrounding relation or operator symbols, defined by \verb#\mathrel# or \verb#\mathop#, for example). If you want these extra spaces, you can avoid the additional pair of braces by using the starred version \cverb#\newnotation*#.
\subsection{Default value for first argument}
As for \verb#\newcommand#, you can specify a default value for the first argument, which will be considered as an optional argument then.
@ -190,11 +190,11 @@ then $\interpretation+paren(x_2)=1$ or $\interpretation+paren(x_1) \neq
\end{itemize}
\subsection{Further remarks}
Indeed, there's a sixth argument that can optionally be supplied to both \verb#\newnotation# and \verb#\renewnotation#. This argument, which is explained in detail in Section~\ref{sec:listing}, specifies the replacement for potential arguments of a macro in the table of notation.
Indeed, there's a sixth argument that can optionally be supplied to all versions of \verb#\newnotation# and \verb#\newrelation#. This argument, which is explained in detail in Section~\ref{sec:listing}, specifies the replacement for potential arguments of a macro in the table of notation.
\subsection{Classes}
Often, entitites of a certain type are formatted in a particular way, just to indicate that type. For instance, set names may always be bold, problem names in small caps \dots It is desirable to separate the choice of layout for some type from the choice of type for the entity (or its denotation, more precisely). To this end, the \cverb#\newnotation# command supports classes.
Often, entitites of a certain type are formatted in a particular way, just to indicate that type. For instance, sets may always be bold, problems in small caps and so on. It is desirable to separate the choice of layout for some type from the choice of type for the entity (or its denotation, more precisely). To this end, the \cverb#\newnotation# command supports classes.
They can be used like in the following example.
\begin{Verbatim}[tabsize=4,commandchars=+()]
@ -249,6 +249,38 @@ then $\interpretation+paren(x_2)=1$ or $\interpretation+paren(x_1) \neq
\subsection{Relation symbols}
Relation symbols require some extra space around them. Using \cverb#\newcommand# this can be achieved with \cverb#\mathrel#. This is done implicitly, when \cverb#\newrelation# (or \cverb#\newrelation*#) is used instead of \cverb#\newnotation#.
The difference is shown in the following example:
\begin{Verbatim}[tabsize=4,commandchars=+()]
+decorate(\newrelation){\rel}{\le_p}
+decorate(\newnotation){\nota}{\le_p}
+decorate(\newnotation*){\notaStar}{\le_p}
\end{Verbatim}
\notationsavetable{beforeRelationSymbols}
\notationnewtable
\newrelation{\rel}{\le_p}
\newnotation{\nota}{\le_p}
\newnotation*{\notaStar}{\le_p}
\notationloadtable{beforeRelationSymbols}
The output produced will be:
{\color{teal}
\begin{enumerate}
\setlength{\itemsep}{0em}
\setlength{\parsep}{0em}
\setlength{\parskip}{0em}
\item relation: $a \rel b$; used as subscript: $F_\rel$
\item notation, with extra braces: $a \nota b$; used as subscript: $F_\nota$
\item notation, without extra braces: $a \notaStar b$; used as subscript: $f_\notaStar$
\end{enumerate}
}
In Output~2, there is no space between the relation symbol~\rel and the surrounding letters~$a$ and~$b$; in Output~3, letter~$p$ is not printed as a subscript of a subscript.
\newpage
\section{Grouping notation}
\label{sec:grouping}