Tables

For now I am just going to play around with some examples of tables (so look at the source to see how they are done), after which I will present a few simple ways of doing tables. These tables work well, and they might cover most situations in which you will need tables.

Example 5. A simple informal table (no title)

      <!doctype informaltable PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
       ]>
      <informaltable frame="all">
        <title>A fictitious description of compiler features</title>
        <tgroup cols="4">
          <thead>
            <row>
              <entry>Architecture</entry>
              <entry>Company</entry>
              <entry>Native code support</entry>
              <entry>Max optimization</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry>i386</entry>
              <entry>Intel</entry>
              <entry>yes</entry>
              <entry>-O4</entry>
            </row>
            <row>
              <entry>alpha</entry>
              <entry>DEC</entry>
              <entry>yes</entry>
              <entry>-O3</entry>
            </row>
            <row>
              <entry>Z80</entry>
              <entry>Zilog</entry>
              <entry>no</entry>
              <entry>-O1</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
	

ArchitectureCompanyNative codeMax optimization
i386Intelyes-O4
alphaDECyes-O3
Z80Zilogno-O1

The following table has a title, uses some mathematical symbols (like the &sum; entity. It also uses the align attribute to specify alignment based on the decimal point in the floating point numbers.

Example 6. A more complex table

      <table frame="all">
	<title>Convergence of dynamical equations and constraints for
	  various choices of constrained edges</title>
        <tgroup cols=5 align="char" charoff="50" char=".">
          <thead>
	    <row>
	      <entry>Constrained edges</entry>
	      <entry>Model</entry>
	      <entry># of iter.</entry>
	      <entry>&sum;E
	        <subscript>i</subscript><superscript>2</superscript></entry>
	      <entry>&sum;C
	        <subscript>i</subscript><superscript>2</superscript></entry>
	    </row>
	    </thead>
	    <tbody>
	    <row>
	      <entry>AD, AF, AG, AA'</entry>
	      <entry>Flat space</entry>
	      <entry>5</entry>
	      <entry>1.15×10<superscript>-24</superscript></entry>
	      <entry>1.77×10<superscript>-19</superscript></entry>
	    </row>
	    <row>
	      <entry>AD, AF, AG, AA'</entry>
	      <entry>Kasner universe</entry>
	      <entry>6</entry>
	      <entry>1.43×10<superscript>-19</superscript></entry>
	      <entry>1.77×10<superscript>-8</superscript></entry>
	    </row>
	    <row>
	      <entry>AB, AC, AE, AA'</entry>
	      <entry>Flat space</entry>
	      <entry>4</entry>
	      <entry>1.15×10<superscript>-24</superscript></entry>
	      <entry>4.09×10<superscript>-24</superscript></entry>
	    </row>
	    <row>
	      <entry>AB, AC, AE, AA'</entry>
	      <entry>Kasner universe</entry>
	      <entry>7</entry>
	      <entry>1.33×10<superscript>-19</superscript></entry>
	      <entry>8.07×10<superscript>-7</superscript></entry>
	    </row>
          </tbody>
        </tgroup>
      </table>
	  

This is how that table would be rendered in the output mode you are viewing now:

Table 1. Convergence of dynamical equations and constraints for various choices of constrained edges

Constrained edgesModel# of iter.∑E i2∑C i2
AD, AF, AG, AA'Flat space51.15×10-241.77×10-19
AD, AF, AG, AA'Kasner universe61.43×10-191.77×10-8
AB, AC, AE, AA'Flat space41.15×10-244.09×10-24
AB, AC, AE, AA'Kasner universe71.33×10-198.07×10-7