Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cac5f6

Browse files
committed
Added some examples of table markup.
1 parent 9272b14 commit 0cac5f6

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

Doc/doc/doc.tex

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,77 @@ \section{\module{bar.foo} ---
12051205
\macro{modulesynopsis}. This environment is not normally used by
12061206
authors, but is created by the \macro{localmoduletable} macro.
12071207

1208+
Here is a small example of a table given in the documentation for
1209+
the \module{warnings} module; markup inside the table cells is
1210+
minimal so the markup for the table itself is readily discernable.
1211+
Here is the markup for the table:
1212+
1213+
\begin{verbatim}
1214+
\begin{tableii}{l|l}{exception}{Class}{Description}
1215+
\lineii{Warning}
1216+
{This is the base class of all warning category classes. It
1217+
is a subclass of \exception{Exception}.}
1218+
\lineii{UserWarning}
1219+
{The default category for \function{warn()}.}
1220+
\lineii{DeprecationWarning}
1221+
{Base category for warnings about deprecated features.}
1222+
\lineii{SyntaxWarning}
1223+
{Base category for warnings about dubious syntactic
1224+
features.}
1225+
\lineii{RuntimeWarning}
1226+
{Base category for warnings about dubious runtime features.}
1227+
\end{tableii}
1228+
\end{verbatim}
1229+
1230+
Here is the resulting table:
1231+
1232+
\begin{tableii}{l|l}{exception}{Class}{Description}
1233+
\lineii{Warning}
1234+
{This is the base class of all warning category classes. It
1235+
is a subclass of \exception{Exception}.}
1236+
\lineii{UserWarning}
1237+
{The default category for \function{warn()}.}
1238+
\lineii{DeprecationWarning}
1239+
{Base category for warnings about deprecated features.}
1240+
\lineii{SyntaxWarning}
1241+
{Base category for warnings about dubious syntactic
1242+
features.}
1243+
\lineii{RuntimeWarning}
1244+
{Base category for warnings about dubious runtime features.}
1245+
\end{tableii}
1246+
1247+
Note that the class names are implicitly marked using the
1248+
\macro{exception} macro, since that is given as the \var{col1font}
1249+
value for the \env{tableii} environment. To create a table using
1250+
different markup for the first column, use \code{textrm} for the
1251+
\var{col1font} value and mark each entry individually.
1252+
1253+
To add a horizontal line between vertical sections of a table, use
1254+
the standard \macro{hline} macro between the rows which should be
1255+
separated:
1256+
1257+
\begin{verbatim}
1258+
\begin{tableii}{l|l}{constant}{Language}{Audience}
1259+
\lineii{APL}{Masochists.}
1260+
\lineii{BASIC}{First-time programmers on PC hardware.}
1261+
\lineii{C}{\UNIX{} \&\ Linux kernel developers.}
1262+
\hline
1263+
\lineii{Python}{Everyone!}
1264+
\end{tableii}
1265+
\end{verbatim}
1266+
1267+
Note that not all presentation formats are capable of displaying a
1268+
horizontal rule in this position. This is how the table looks in
1269+
the format you're reading now:
1270+
1271+
\begin{tableii}{l|l}{constant}{Language}{Audience}
1272+
\lineii{APL}{Masochists.}
1273+
\lineii{C}{\UNIX{} \&\ Linux kernel developers.}
1274+
\lineii{JavaScript}{Web developers.}
1275+
\hline
1276+
\lineii{Python}{Everyone!}
1277+
\end{tableii}
1278+
12081279

12091280
\subsection{Reference List Markup \label{references}}
12101281

0 commit comments

Comments
 (0)