diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2009-12-05 13:49:26 +1300 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2009-12-05 13:49:26 +1300 |
commit | dc7cc1e8cae388cb67febe7b35808a60ae7578a6 (patch) | |
tree | 5939c8a0245281f411d7606c5072ade1628a7f5a | |
parent | ce456ce50f957ef0c890a3f4d92b539469c04145 (diff) | |
download | asciidoc-dc7cc1e8cae388cb67febe7b35808a60ae7578a6.tar.gz |
Added 'header' table style. See:
http://groups.google.com/group/asciidoc/browse_frm/thread/a23fea28394c8ca9
-rw-r--r-- | asciidoc.conf | 2 | ||||
-rw-r--r-- | doc/asciidoc.txt | 4 | ||||
-rw-r--r-- | docbook.conf | 3 | ||||
-rw-r--r-- | examples/website/newtables.txt | 24 | ||||
-rw-r--r-- | html4.conf | 3 | ||||
-rw-r--r-- | stylesheets/xhtml11.css | 2 | ||||
-rw-r--r-- | xhtml11.conf | 3 |
7 files changed, 40 insertions, 1 deletions
diff --git a/asciidoc.conf b/asciidoc.conf index 1fe01f3..eb43c4a 100644 --- a/asciidoc.conf +++ b/asciidoc.conf @@ -486,6 +486,7 @@ literal-style=tags="literal",subs=["specialcharacters"] emphasis-style=tags="emphasis"
strong-style=tags="strong"
monospaced-style=tags="monospaced"
+header-style=tags="header"
asciidoc-style=tags="asciidoc",subs=[],filter='python "{asciidoc-file}" -b {backend}{icons? -a icons -a "iconsdir={iconsdir}"}{imagesdir? -a "imagesdir={imagesdir}"}{data-uri? -a data-uri} -a "indir={indir}"{trace? -a "trace={trace}"}{verbose? -v} -s -'
[tabledef-nested]
@@ -499,6 +500,7 @@ literal-style=tags="literal",subs=["specialcharacters"] emphasis-style=tags="emphasis"
strong-style=tags="strong"
monospaced-style=tags="monospaced"
+header-style=tags="header"
asciidoc-style=tags="asciidoc",subs=[],filter='python "{asciidoc-file}" -b {backend} -s -'
#----------------------------------------
diff --git a/doc/asciidoc.txt b/doc/asciidoc.txt index fc49360..47b4cb3 100644 --- a/doc/asciidoc.txt +++ b/doc/asciidoc.txt @@ -2946,6 +2946,10 @@ Like default but all text is in a monospaced font. strong:: Like default but all text is bold. +header:: +Apply the same style as the table header. Normally used to create a +vertical header in the first column. + asciidoc:: With this style table cells can contain any of the AsciiDoc elements that are allowed inside document sections. This style runs asciidoc(1) diff --git a/docbook.conf b/docbook.conf index f0e5de9..2233275 100644 --- a/docbook.conf +++ b/docbook.conf @@ -356,6 +356,9 @@ paragraph=<simpara>|</simpara> [tabletags-emphasis]
paragraph=<simpara><emphasis>|</emphasis></simpara>
+[tabletags-header]
+paragraph=<simpara><emphasis role="strong">|</emphasis></simpara>
+
[tabletags-strong]
paragraph=<simpara><emphasis role="strong">|</emphasis></simpara>
diff --git a/examples/website/newtables.txt b/examples/website/newtables.txt index acec0c4..4ce58c0 100644 --- a/examples/website/newtables.txt +++ b/examples/website/newtables.txt @@ -214,6 +214,30 @@ homero verear ea mea, qui. --------------------------------------------------------------------- +.Horizontal and vertial headings +[cols="h,4*",options="header",width="50%"] +|================================== +| |West |Central |East | Total +|Q1 |270 |292 |342 | 904 +|Q2 |322 |276 |383 | 981 +|Q3 |298 |252 |274 | 824 +|Q4 |344 |247 |402 | 993 +|================================== + +.AsciiDoc source +--------------------------------------------------------------------- +.Horizontal and vertial headings +[cols="h,4*",options="header",width="50%"] +|================================== +| |West |Central |East | Total +|Q1 |270 |292 |342 | 904 +|Q2 |322 |276 |383 | 981 +|Q3 |298 |252 |274 | 824 +|Q4 |344 |247 |402 | 993 +|================================== +--------------------------------------------------------------------- + + .AsciiDoc style in first column, Literal in second [cols="asciidoc,literal",options="header",grid="cols"] |================================== @@ -301,6 +301,9 @@ footdata=<td {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }a bodydata=<td {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }align="{halign}"{autowidth-option! width="{colpcwidth}%"} valign="{valign}">|</td>
paragraph=<p>|</p>
+[tabletags-header]
+paragraph=<p><strong>|</strong></p>
+
[tabletags-emphasis]
paragraph=<p><em>|</em></p>
diff --git a/stylesheets/xhtml11.css b/stylesheets/xhtml11.css index 57d0711..113cbbd 100644 --- a/stylesheets/xhtml11.css +++ b/stylesheets/xhtml11.css @@ -249,7 +249,7 @@ div.compact div, div.compact div { div.tableblock > table { border: 3px solid #527bbd; } -thead { +thead, p.table.header { font-family: sans-serif; font-weight: bold; } diff --git a/xhtml11.conf b/xhtml11.conf index 12c3790..5944248 100644 --- a/xhtml11.conf +++ b/xhtml11.conf @@ -337,6 +337,9 @@ headdata=<th {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }a bodydata=<td {colspan@1::colspan="{colspan}" }{rowspan@1::rowspan="{rowspan}" }align="{halign}" valign="{valign}">|</td>
paragraph=<p class="table">|</p>
+[tabletags-header]
+paragraph=<p class="table header">|</p>
+
[tabletags-emphasis]
paragraph=<p class="table"><em>|</em></p>
|