[Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.49,1.50
Fred L. Drake
fdrake@users.sourceforge.net
Tue, 14 Aug 2001 14:36:21 -0700
Update of /cvsroot/python/python/dist/src/Doc/doc
In directory usw-pr-cvs1:/tmp/cvs-serv20727/doc
Modified Files:
doc.tex
Log Message:
Added some examples of table markup.
Index: doc.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** doc.tex 2001/08/03 18:36:17 1.49
--- doc.tex 2001/08/14 21:36:19 1.50
***************
*** 1206,1209 ****
--- 1206,1280 ----
authors, but is created by the \macro{localmoduletable} macro.
+ Here is a small example of a table given in the documentation for
+ the \module{warnings} module; markup inside the table cells is
+ minimal so the markup for the table itself is readily discernable.
+ Here is the markup for the table:
+
+ \begin{verbatim}
+ \begin{tableii}{l|l}{exception}{Class}{Description}
+ \lineii{Warning}
+ {This is the base class of all warning category classes. It
+ is a subclass of \exception{Exception}.}
+ \lineii{UserWarning}
+ {The default category for \function{warn()}.}
+ \lineii{DeprecationWarning}
+ {Base category for warnings about deprecated features.}
+ \lineii{SyntaxWarning}
+ {Base category for warnings about dubious syntactic
+ features.}
+ \lineii{RuntimeWarning}
+ {Base category for warnings about dubious runtime features.}
+ \end{tableii}
+ \end{verbatim}
+
+ Here is the resulting table:
+
+ \begin{tableii}{l|l}{exception}{Class}{Description}
+ \lineii{Warning}
+ {This is the base class of all warning category classes. It
+ is a subclass of \exception{Exception}.}
+ \lineii{UserWarning}
+ {The default category for \function{warn()}.}
+ \lineii{DeprecationWarning}
+ {Base category for warnings about deprecated features.}
+ \lineii{SyntaxWarning}
+ {Base category for warnings about dubious syntactic
+ features.}
+ \lineii{RuntimeWarning}
+ {Base category for warnings about dubious runtime features.}
+ \end{tableii}
+
+ Note that the class names are implicitly marked using the
+ \macro{exception} macro, since that is given as the \var{col1font}
+ value for the \env{tableii} environment. To create a table using
+ different markup for the first column, use \code{textrm} for the
+ \var{col1font} value and mark each entry individually.
+
+ To add a horizontal line between vertical sections of a table, use
+ the standard \macro{hline} macro between the rows which should be
+ separated:
+
+ \begin{verbatim}
+ \begin{tableii}{l|l}{constant}{Language}{Audience}
+ \lineii{APL}{Masochists.}
+ \lineii{BASIC}{First-time programmers on PC hardware.}
+ \lineii{C}{\UNIX{} \&\ Linux kernel developers.}
+ \hline
+ \lineii{Python}{Everyone!}
+ \end{tableii}
+ \end{verbatim}
+
+ Note that not all presentation formats are capable of displaying a
+ horizontal rule in this position. This is how the table looks in
+ the format you're reading now:
+
+ \begin{tableii}{l|l}{constant}{Language}{Audience}
+ \lineii{APL}{Masochists.}
+ \lineii{C}{\UNIX{} \&\ Linux kernel developers.}
+ \lineii{JavaScript}{Web developers.}
+ \hline
+ \lineii{Python}{Everyone!}
+ \end{tableii}
+
\subsection{Reference List Markup \label{references}}