<tabular>
The <tabular>
tag is the workhorse tag for displaying a collection of cells
presented in rows and columns; in most contexts this environment would be
called a table, but in PreTeXt a <table>
is simply one of many possible
wrappers for a <tabular>
. For complex tabulars, there is an online table
builder which can generate PreTeXt output.
Syntax
Attributes
Attribute | Required? | Values |
---|---|---|
bottom = "…" | optional | "none" "minor" "medium" "major" |
component = "…" | optional | string |
halign = "…" | optional | "left" "center" "right" "justify" |
left = "…" | optional | "none" "minor" "medium" "major" |
margins = "…" | optional | string |
right = "…" | optional | "none" "minor" "medium" "major" |
row-headers = "…" | optional | "yes" "no" |
top = "…" | optional | "none" "minor" "medium" "major" |
valign = "…" | optional | "top" "middle" "bottom" |
width = "…" | optional | string |
Children
The following may appear as children:<col>
<row>
Parents
This element may appear as an immediate child of the following elements:<abstract>
<acknowledgement>
<activity>
<algorithm>
<answer>
<appendix>
<article>
<aside>
<assemblage>
<biographical>
<biography>
<case>
<chapter>
<claim>
<colophon>
<computation>
<conclusion>
<convention>
<corollary>
<data>
<description>
<example>
<exercise>
<exploration>
<fact>
<gi>
<headnote>
<hint>
<historical>
<identity>
<insight>
<introduction>
<investigation>
<lemma>
<li>
<note>
<observation>
<paragraphs>
<postlude>
<preface>
<prelude>
<problem>
<project>
<proof>
<proposition>
<question>
<remark>
<section>
<sidebyside>
<solution>
<stack>
<statement>
<subsection>
<subsubsection>
<table>
<task>
<technology>
<theorem>
<warning>
Notes
A note about tabular borders
Placing borders in tabulars exactly where you want them requires that you
understand in which elements the attributes top
, left
, bottom
, and
right
may be applied. Note that while horizontal borders (rules)
are easy, vertical rules have been made intentionally more work “to gently
guide authors towards good choices” in document design.
The section of the PreTeXt Guide on Tables and Tabulars
is the definitive source.
Examples
A simple tabular wrapper in a <table>
.
In this example, all cell entries are right-justified; the table has a header row and some cells have borders.