summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asciidoc.conf7
-rwxr-xr-xasciidoc.py6
-rw-r--r--doc/asciidoc.txt40
-rw-r--r--doc/book-multi.txt6
-rw-r--r--doc/faq.txt8
-rw-r--r--docbook45.conf9
-rw-r--r--html4.conf8
-rw-r--r--xhtml11.conf9
8 files changed, 59 insertions, 34 deletions
diff --git a/asciidoc.conf b/asciidoc.conf
index 4f07e8c..d6c4ecc 100644
--- a/asciidoc.conf
+++ b/asciidoc.conf
@@ -271,6 +271,7 @@ delimiter=^\*{4,}$
template=sidebarblock
options=sectionbody
posattrs=style
+# DEPRECATED: Use Openblock instead.
abstract-style=template="abstractblock"
[blockdef-open]
@@ -278,9 +279,9 @@ abstract-style=template="abstractblock"
delimiter=^--$
template=openblock
options=sectionbody
-
-[openblock]
-|
+posattrs=style
+abstract-style=template="abstractblock"
+partintro-style=template="partintroblock"
[blockdef-pass]
delimiter=^\+{4,}$
diff --git a/asciidoc.py b/asciidoc.py
index ee38017..99e5ad1 100755
--- a/asciidoc.py
+++ b/asciidoc.py
@@ -4459,6 +4459,7 @@ class Config:
def validate(self):
"""Check the configuration for internal consistancy. Called after all
configuration files have been loaded."""
+ message.linenos = False # Disable document line numbers.
# Heuristic validate that at least one configuration file was loaded.
if not self.specialchars or not self.tags or not lists:
raise EAsciiDoc,'incomplete configuration files'
@@ -4495,6 +4496,7 @@ class Config:
tables_OLD.validate()
tables.validate()
macros.validate()
+ message.linenos = None
def entries_section(self,section_name):
"""
@@ -5357,6 +5359,8 @@ def asciidoc(backend, doctype, confiles, infile, outfile, options):
outfile = os.path.splitext(outfile)[0] + config.outfilesuffix
document.outfile = outfile
document.update_attributes()
+ # Configuration is fully loaded so can expand templates.
+ config.expand_all_templates()
# Check configuration for consistency.
config.validate()
paragraphs.initialize()
@@ -5364,8 +5368,6 @@ def asciidoc(backend, doctype, confiles, infile, outfile, options):
if config.dumping:
config.dump()
else:
- # Configuration is fully loaded so can expand templates.
- config.expand_all_templates()
writer.newline = config.newline
try:
writer.open(outfile, reader.bom)
diff --git a/doc/asciidoc.txt b/doc/asciidoc.txt
index 7c78423..4fadd9c 100644
--- a/doc/asciidoc.txt
+++ b/doc/asciidoc.txt
@@ -1266,15 +1266,6 @@ Any AsciiDoc SectionBody element (apart from
SidebarBlocks) can be placed inside a sidebar.
************************************************
-Apply the 'abstract' style to generate an abstract, for example:
-
----------------------------------------------------------------------
-[abstract]
-************************************************
-In this paper we will ...
-************************************************
----------------------------------------------------------------------
-
[[X26]]
Comment Blocks
~~~~~~~~~~~~~~
@@ -1456,18 +1447,25 @@ See also <<X47,Admonition Icons and Captions>>.
[[X29]]
Open Blocks
~~~~~~~~~~~
-An 'OpenBlock' groups a set of elements -- the enclosed elements are
-rendered normally. Open blocks are used primarily for <<X15,list item
-continuation>>.
-
-- An open block adds no markup to DocBook outputs.
-- An open block adds no markup to HTML outputs unless either 'id' or
- 'role' attributes are specified, in which case the block will be
- enclosed by a 'div' element:
-
- . The 'id' attribute sets the 'id' attribute of the output 'div'.
- . The 'role' attribute sets the 'class' attribute of the output
- 'div'.
+An 'OpenBlock' groups a set of block elements. 'Openblock' usage:
+
+. <<X15,List item continuation>>.
+
+. Apply the 'abstract' style to generate an abstract, for example:
+
+ [abstract]
+ --
+ In this paper we will ...
+ --
+
+. Apply the 'partintro' style to generate a book part introduction for
+ a multi-part book, for example:
+
+ [partintro]
+ .Optional part introduction title
+ --
+ Optional part introduction goes here.
+ --
[[X64]]
diff --git a/doc/book-multi.txt b/doc/book-multi.txt
index d8407f5..7893883 100644
--- a/doc/book-multi.txt
+++ b/doc/book-multi.txt
@@ -38,6 +38,12 @@ documents.
The First Part of the Book
==========================
+[partintro]
+.Optional part introduction title
+--
+Optional part introduction goes here.
+--
+
The First Chapter
-----------------
Chapters can be grouped by preceeding them with a level 0 Book Part
diff --git a/doc/faq.txt b/doc/faq.txt
index 897aef9..3050b0b 100644
--- a/doc/faq.txt
+++ b/doc/faq.txt
@@ -139,20 +139,20 @@ Example:
[listing]
.........................................
:showcomments:
-// A *block comment line*.
+// A block comment line.
Qui in magna commodo, est labitur dolorum an. Est ne magna primis
-// An *inline comment line*.
+// An inline comment line.
adolescens.
.........................................
Is rendered as:
:showcomments:
-// A *block comment line*.
+// A block comment line.
Qui in magna commodo, est labitur dolorum an. Est ne magna primis
-// An *inline comment line*.
+// An inline comment line.
adolescens.
NOTE: link:userguide.html#X26[Comment blocks] are never displayed.
diff --git a/docbook45.conf b/docbook45.conf
index a594a91..bebed49 100644
--- a/docbook45.conf
+++ b/docbook45.conf
@@ -316,6 +316,15 @@ template::[verseblock]
|
</abstract>
+[openblock]
+|
+
+[partintroblock]
+<partintro{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
+<title>{title}</title>
+|
+</partintro>
+
[quoteblock]
<blockquote{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
<title>{title}</title>
diff --git a/html4.conf b/html4.conf
index 4a38441..8d835b2 100644
--- a/html4.conf
+++ b/html4.conf
@@ -252,9 +252,13 @@ template::[admonitionblock]
</td></tr></table>
[openblock]
-{id,role#}<div{id? id="{id}"}{role? class="{role}"}>
+<div{id? id="{id}"}{role? class="{role}"}>
+<p><b>{title}</b></p>
|
-{id,role#}</div>
+</div>
+
+[partintroblock]
+template::[openblock]
[abstractblock]
template::[quoteblock]
diff --git a/xhtml11.conf b/xhtml11.conf
index 77ca66f..51c8174 100644
--- a/xhtml11.conf
+++ b/xhtml11.conf
@@ -318,9 +318,14 @@ template::[admonitionblock]
</div></div>
[openblock]
-{id,role#}<div{id? id="{id}"}{role? class="{role}"}>
+<div class="openblock{role? {role}}"{id? id="{id}"}>
+<div class="title">{title}</div>
+<div class="content">
|
-{id,role#}</div>
+</div></div>
+
+[partintroblock]
+template::[openblock]
[abstractblock]
template::[quoteblock]