|
Packit |
9741aa |
|
|
Packit |
9741aa |
PUBLIC "-//SGML-Tools//DTD SGML-Tools v0.9//EN" >
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
$Id: tables.sgml,v 1.1.1.1 2001/05/24 15:57:40 sano Exp $
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
This is tables.sgml, distributed with SGML-Tools.
|
|
Packit |
9741aa |
It tests and describes the use of table and
|
|
Packit |
9741aa |
tabular element, to arrange data in rows and
|
|
Packit |
9741aa |
columns.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
$Log: tables.sgml,v $
|
|
Packit |
9741aa |
Revision 1.1.1.1 2001/05/24 15:57:40 sano
|
|
Packit |
9741aa |
linuxdoc-tools 0.96
|
|
Packit |
9741aa |
This is re-imported because of cvs repository is lost
|
|
Packit |
9741aa |
due to HDD trouble
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Revision 0.1.0.1 2000/05/13 14:59:57 sano
|
|
Packit |
9741aa |
Initial release of Linuxdoc-Tools
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Revision 1.1 1997/07/09 13:19:07 cg
|
|
Packit |
9741aa |
* Added contrib/bk, with a lot of work-in-progress from Bernd. (CdG)
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Comments: none.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
-->
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<article>
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<title>TEST: Tables
|
|
Packit |
9741aa |
<author>b. kreimeier
|
|
Packit |
9741aa |
<date>May 1997
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<abstract>
|
|
Packit |
9741aa |
This document demonstrates the SGML Tools support for
|
|
Packit |
9741aa |
table and tabular elements, essentially for means to
|
|
Packit |
9741aa |
arrange data in columns and rows.
|
|
Packit |
9741aa |
</abstract>
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<sect>Simple Tables
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Basically, tables are means to arrange data items
|
|
Packit |
9741aa |
in columns and rows. In SGML Tools, there is no
|
|
Packit |
9741aa |
support for nested tables, or multicolumns, or
|
|
Packit |
9741aa |
other sophisticated arrangements of data items.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Moreover, tables are handled as separate paragraphs,
|
|
Packit |
9741aa |
comparable to figures. They float, that is will appear
|
|
Packit |
9741aa |
at the position at which they are introduced, or below,
|
|
Packit |
9741aa |
depending. Tables are placed centered, and have a
|
|
Packit |
9741aa |
caption placed below. Unlike multiple image support
|
|
Packit |
9741aa |
with figures, there is no support for multiple tables
|
|
Packit |
9741aa |
within one - each table has its one caption. Subsequent
|
|
Packit |
9741aa |
tables will be placed in a column.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Here is a minimal example:
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<tabform> <tdat><tdat>
|
|
Packit |
9741aa |
<tabhead> Left Heading | Right Heading
|
|
Packit |
9741aa |
<tabular>
|
|
Packit |
9741aa |
Item 1/1 | Item 1/2
|
|
Packit |
9741aa |
Item 2/1 | Item 2/2
|
|
Packit |
9741aa |
</tabular>
|
|
Packit |
9741aa |
<caption>
|
|
Packit |
9741aa |
Minimal Table.
|
|
Packit |
9741aa |
</caption>
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
You will notive that a table is always surrounded by
|
|
Packit |
9741aa |
a border. The headling lines, which are highlighted,
|
|
Packit |
9741aa |
could be omitted.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<tabform> <tdat><tdat>
|
|
Packit |
9741aa |
<tabular>
|
|
Packit |
9741aa |
Item 1/1 | Item 1/2
|
|
Packit |
9741aa |
Item 2/1 | Item 2/2
|
|
Packit |
9741aa |
</tabular>
|
|
Packit |
9741aa |
<caption>
|
|
Packit |
9741aa |
Table w/o Heading.
|
|
Packit |
9741aa |
</caption>
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Each table contains several elements: form, heading,
|
|
Packit |
9741aa |
body, and caption.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<sect1>Table Form and Heading
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Headings are treated differently even in the otherwise
|
|
Packit |
9741aa |
sloppy HTML. This is relevant e.g. with respect to tools
|
|
Packit |
9741aa |
like SGML-sensitive filters. We allow for multiple
|
|
Packit |
9741aa |
heading lines. In LaTeX, this are distinctly rendered
|
|
Packit |
9741aa |
by default, and separated from the table by double
|
|
Packit |
9741aa |
rules.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
The preceeding tabform element is a bit
|
|
Packit |
9741aa |
awkward, as it is a good example of both descriptive markup
|
|
Packit |
9741aa |
creeping into the SGML source, and ASP based backend
|
|
Packit |
9741aa |
implementation shining through. It is needed
|
|
Packit |
9741aa |
only because the current backend does not determine the
|
|
Packit |
9741aa |
number of columns e.g. from the heading.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
However, it might be useful for future extension, e.g.
|
|
Packit |
9741aa |
for tables that contain a different class of information
|
|
Packit |
9741aa |
in the leftmost column.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<sect1>Table Body and Caption
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
The Table Body is just a list of elements,
|
|
Packit |
9741aa |
ie. data items, cell/column separators, and table row
|
|
Packit |
9741aa |
separators.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Unfortunately, the validating parser does not check
|
|
Packit |
9741aa |
the table for consistency. Thus, missing or
|
|
Packit |
9741aa |
additional elements will proliferate into the backends,
|
|
Packit |
9741aa |
and will only yield unpredictable results in HTML, but
|
|
Packit |
9741aa |
errors in LaTeX.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
The caption is identical to the one used with figures.
|
|
Packit |
9741aa |
It will be placed centered, below the actual table
|
|
Packit |
9741aa |
itself.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<sect>Tables with Images
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Inlined elements like images could be placed in tables. Here
|
|
Packit |
9741aa |
is a full sized example with all structure details.
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
<tabform> <tdat><tdat><tdat><tdat><tdat>
|
|
Packit |
9741aa |
<tabhead> Column A1 | Column A2 | Column B1 | Column B2 | Column B2a
|
|
Packit |
9741aa |
<tabular>
|
|
Packit |
9741aa |
|
|
|
Packit |
9741aa |
Text | Text | Text | Text
|
|
Packit |
9741aa |
Text | | | Text | Text
|
|
Packit |
9741aa |
Text | Text | Text | Text | Text
|
|
Packit |
9741aa |
|
|
|
Packit |
9741aa |
Text | Text | Text | Text
|
|
Packit |
9741aa |
Text | Text | Text |
|
|
Packit |
9741aa |
| Text
|
|
Packit |
9741aa |
Text | Text |
|
|
Packit |
9741aa |
| Text | Text
|
|
Packit |
9741aa |
| Text | Text | Text | Text
|
|
Packit |
9741aa |
Text | Text | Text | | Text
|
|
Packit |
9741aa |
Text | Text | | Text |
|
|
Packit |
9741aa |
| Text | Text | | Text
|
|
Packit |
9741aa |
</tabular>
|
|
Packit |
9741aa |
<caption>
|
|
Packit |
9741aa |
Table Example
|
|
Packit |
9741aa |
</caption>
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
</article>
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
|
|
Packit |
9741aa |
Local Variables:
|
|
Packit |
9741aa |
mode: sgml
|
|
Packit |
9741aa |
End: -->
|
|
Packit |
9741aa |
|