Fits to Release 1.6 of cgal_manual.sty

,
This commit is contained in:
Lutz Kettner 1995-08-16 16:12:42 +00:00
parent 9ddb608162
commit 0fe5efcc18
1 changed files with 79 additions and 37 deletions

View File

@ -1,4 +1,15 @@
% ----------------------------------------------------------------------
% Documentation for the CGAL manual LaTeX style:
%
% 16.08.1995 Lutz Kettner
% ----------------------------------------------------------------------
% The style is compatible with LaTeX2e, try:
% \documentclass[12pt]{article}
% \usepackage{latexsym}
% LaTeX:
\documentstyle[12pt]{article} \documentstyle[12pt]{article}
%\pagestyle{empty} %\pagestyle{empty}
\textwidth 15.4cm \textwidth 15.4cm
\textheight 24 cm \textheight 24 cm
@ -76,9 +87,11 @@ runtime statements.
% ---------------------------------------------------------------------- % ----------------------------------------------------------------------
\begin{class}{Demo_Class} \begin{class}{Demo_Class}
\CCsection{A simple class as an example} \CCsection{A Simple Class}
The class with its name is declared by \verb"\begin{class}{Demo_Class}". The class with its name is declared by \verb"\begin{class}{Demo_Class}".
For class templates the \verb"\begin{classtemplate}{Demo_Class<...>}"
environment is designed. See the next section for an example.
The macro \verb"\CCsection{"\ldots\verb"}" produces the section The macro \verb"\CCsection{"\ldots\verb"}" produces the section
title from above and appends the class name. Note that the special title from above and appends the class name. Note that the special
character ``\_'' has not to be quoted as it is usual within \LaTeX. character ``\_'' has not to be quoted as it is usual within \LaTeX.
@ -92,11 +105,13 @@ with operators. See the following example:
To achieve this behaviour with \TeX\, the \verb"\catcode" values of To achieve this behaviour with \TeX\, the \verb"\catcode" values of
some characters has to be changed. So within the \CC\ code some characters has to be changed. So within the \CC\ code
things like comments with ``\%'' sign wont work. The \TeX\ comment in things like comments with ``\%'' sign wont work. Several macros read a
the other parameter works as usual. A sad sideeffect is that these second parameter with a \TeX\ comment to the declaration. The catcodes
changed catcodes wont apply if these macros are invoced within other are restored just before this second parameter. A sad sideeffect is
macros. In that case, the argument text was just once parsed from that these changed catcodes wont apply if these macros are invoced
\TeX\ and the catcodes are all fixed. within other macros. In that case, the argument text was just once
parsed from \TeX\ and the catcodes are all fixed before the catcode
changing macro expands.
\definition \definition
@ -129,27 +144,23 @@ natural looking descriptions.
\constructor{Demo_Class();}{introduces \constructor{Demo_Class();}{introduces
a variable \var\ initialized to the default. \CC\ code: a variable \var\ initialized to the default. \CC\ code:
\protect\verb"Demo\_Class();"} {\tt Demo\_Class();}}
\constructor{Demo_Class(const Demo_Class &);}{copy \constructor{Demo_Class( const Demo_Class &);}{copy
constructor. \CC\ code: \verb"Demo\_Class(const Demo\_Class \&);" constructor. \CC\ code: {\tt Demo\_Class(const Demo\_Class \&);}}
}
\constructor{Demo_Class(RT hx, RT hy, RT hw);}{arbitrary constructor. \constructor{Demo_Class( RT hx, RT hy, RT hw);}{arbitrary constructor.
\CC\ code: \verb"Demo\_Class(RT hx, RT hy, RT hw);"} \CC\ code: {\tt Demo\_Class(RT hx, RT hy, RT hw);}}
The font and style in which the declarations are formatted can be The font and style in which the declarations are formatted can be
changed by overwriting the \verb"\CCfont" and \verb"\CCendfont" changed by overwriting the \verb"\CCfont" and \verb"\CCendfont"
macros. There default settings are macros. Their default settings are
\verb"\def\CCfont{\it}\def\CCendfont{\/}". They are used within a \verb"\gdef\CCfont{\it}\gdef\CCendfont{\/}". They are used within a
group, so font changing commands are local. The following line is group, so font changing commands are local. The rest of this document is
formatted using the definitions formatted using the definitions \verb"\gdef\CCfont{\tt}\gdef\CCendfont{}".
\verb"\def\CCfont{\tt}\def\CCendfont{}".
\begingroup \gdef\CCfont{\tt}\gdef\CCendfont{}
\def\CCfont{\tt}\def\CCendfont{} \constructor{Demo_Class( int a, X<Y> &x);}{arbitrary constructor.}
\constructor{Demo_Class(int a, X<Y> &x);}{arbitrary constructor.}
\endgroup
Also changable are the special characters the formatting has to Also changable are the special characters the formatting has to
deal with. They are named \verb"\CCunderscore", \verb"\CCopenangle", deal with. They are named \verb"\CCunderscore", \verb"\CCopenangle",
@ -163,10 +174,10 @@ deal with. They are named \verb"\CCunderscore", \verb"\CCopenangle",
The layout of this section can be customized to the width of the The layout of this section can be customized to the width of the
return types and the declarations. The return types and the declarations. The
\verb"\threecolumns{"\ldots\verb"}{"\ldots\verb"}" macro sets the \verb"\threecolumns{"\ldots\verb"}{"\ldots\verb"}" macro sets the
width of the two leading columns of the total three columns. The other width of the two leading columns of the total three columns. All other
dimensions will be computed. dimensions will be computed.
Note that declarations after the closing parantheses like {\tt const} Note that declarations after the closing parenthesis like {\tt const}
for the implicit class parameter of a method will not be printed for the implicit class parameter of a method will not be printed
(this might change in the future). (this might change in the future).
The return value is handled like a parameter type. That means that The return value is handled like a parameter type. That means that
@ -193,9 +204,10 @@ to the class, it is {\em not} removed.
one per line.} one per line.}
Reference or pointer parameters can occur on both sides of the Reference or pointer parameters can occur on both sides of the
separating space between the type and the function or method name. The separating space between the return type and the function or method
formatting normalizes them to the the left side. This formatting is name. The formatting normalizes them to the left side. This
not done within the parameters (, but maybe in the future). An example: formatting is not done within the parameters (, but maybe in the
future). An example:
\function{Demo_Class& foo( int& a, int* b);}{} \function{Demo_Class& foo( int& a, int* b);}{}
@ -266,9 +278,39 @@ similar to classes (more ?).
\end{class} \end{class}
% ----------------------------------------------------------------------
\begin{classtemplate}{Demo_Class<FT<RT> >}
\CCsection{Demo Class Template}
This class template is given within a
\verb"\begin{classtemplate}{Demo_Class<FT<RT> >}" environment.
\creation
A current misbehaviour (or feature?) of the structuring macros is that
they have fixed numbers. So the \verb"\definition" macro is here
missing.
\constructor{ Demo_Class();}{ default.}
\constructor{ Demo_Class( Demo_Class<FT<RT> > q);}{ copy.}
\constructor{ Demo_Class( A a, B *b);}{ arbitrary.}
\operations
\threecolumns{4.3cm}{2.3cm}
\method{ Demo_Class foo( Demo_Class q);}{
wrong, without template parameters.}
\function{ Demo_Class<FT<RT> > foo( Demo_Class<FT<RT> > q);}{
right, with template parameters.}
\end{classtemplate}
% ---------------------------------------------------------------------- % ----------------------------------------------------------------------
\begin{class}{Demo_Class} \begin{class}{Demo_Class}
\section{The list of all operators} \section{The List of All Operators}
\function{Ptr_Class \function{Ptr_Class
operator->(Demo_Class p);}{} operator->(Demo_Class p);}{}
@ -324,20 +366,20 @@ similar to classes (more ?).
\function{Demo_Class \function{Demo_Class
operator*(Demo_Class p);}{} operator*(Demo_Class p);}{}
\method{void* \method{ void*
operator new( size_t);}{Hidden parameters are not shown. \CC\ code: operator new( size_t);}{Hidden parameters are not shown. \CC\ code:
{\tt $\backslash$method\{void* operator new( size\_t);\}}.} $\backslash${\tt method\{ void* operator new( size\_t);\}}.}
\method{void \method{ void
operator delete(void*, size_t);}{Hidden parameters are not shown. operator delete( void*, size_t);}{Hidden parameters are not shown.
\CC\ code: {\tt $\backslash$method\{void operator \CC\ code: $\backslash${\tt method\{ void operator
delete(void*, size\_t);\}}} delete( void*, size\_t);\}}}
\method{void \method{ void
operator delete[](void*, size_t);}{Hidden parameters are not operator delete[]( void*, size_t);}{Hidden parameters are not
shown again. shown again.
\CC\ code: {\tt $\backslash$method\{void operator \CC\ code: $\backslash${\tt method\{ void operator
delete[](void*, size\_t);\}}} delete[]( void*, size\_t);\}}}
\function{Member_Ptr \function{Member_Ptr
operator->*(Demo_Class p);}{} operator->*(Demo_Class p);}{}