From 40715ffbd4dfd3f54712d093c82a4151c91831e4 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 2 Aug 2008 11:28:24 +0300 Subject: [PATCH] Import and use AsciiDoc 7.1.2 configuration files In the past, we have hit annoying incompatibilities when people have attempted to rebuild ELinks documentation with new versions of AsciiDoc: http://bugzilla.elinks.cz/show_bug.cgi?id=989 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491820 So now we bundle the configuration files from a known good version to let ELinks documentation be built with them regardless of which version has been installed on the machine. --- doc/Makefile | 4 +- doc/tools/asciidoc/COPYRIGHT | 18 + doc/tools/asciidoc/README | 14 + doc/tools/asciidoc/asciidoc.conf | 335 ++++++++++ doc/tools/asciidoc/docbook.conf | 589 ++++++++++++++++++ .../asciidoc/stylesheets/xhtml11-quirks.css | 28 + doc/tools/asciidoc/stylesheets/xhtml11.css | 229 +++++++ doc/tools/asciidoc/xhtml11-quirks.conf | 43 ++ doc/tools/asciidoc/xhtml11.conf | 426 +++++++++++++ 9 files changed, 1685 insertions(+), 1 deletion(-) create mode 100644 doc/tools/asciidoc/COPYRIGHT create mode 100644 doc/tools/asciidoc/README create mode 100644 doc/tools/asciidoc/asciidoc.conf create mode 100644 doc/tools/asciidoc/docbook.conf create mode 100644 doc/tools/asciidoc/stylesheets/xhtml11-quirks.css create mode 100644 doc/tools/asciidoc/stylesheets/xhtml11.css create mode 100644 doc/tools/asciidoc/xhtml11-quirks.conf create mode 100644 doc/tools/asciidoc/xhtml11.conf diff --git a/doc/Makefile b/doc/Makefile index 792591c9..ab14be19 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,7 +14,9 @@ PDF_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/pdf TXT_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/txt ASCIIDOC_CONF = $(srcdir)asciidoc.conf -ASCIIDOC_FLAGS += -f $(ASCIIDOC_CONF) \ +ASCIIDOC_FLAGS += --no-conf -f $(srcdir)tools/asciidoc/asciidoc.conf \ + -f $(srcdir)tools/asciidoc/$(call backend).conf \ + -f $(ASCIIDOC_CONF) \ -a "builddir=$(CURDIR)/" \ -a asciidoc7compatible \ -a elinks_version=$(VERSION) diff --git a/doc/tools/asciidoc/COPYRIGHT b/doc/tools/asciidoc/COPYRIGHT new file mode 100644 index 00000000..aadb246d --- /dev/null +++ b/doc/tools/asciidoc/COPYRIGHT @@ -0,0 +1,18 @@ +Copyright (C) 2000 Stuart Rackham + +Email: srackham@methods.co.nz + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. diff --git a/doc/tools/asciidoc/README b/doc/tools/asciidoc/README new file mode 100644 index 00000000..8b122473 --- /dev/null +++ b/doc/tools/asciidoc/README @@ -0,0 +1,14 @@ +The files in this directory, except this README itself, +have been copied from the AsciiDoc 7.1.2 source package. + +In the past, we have hit annoying incompatibilities when +people have attempted to rebuild ELinks documentation +with new versions of AsciiDoc: + +http://bugzilla.elinks.cz/show_bug.cgi?id=989 +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491820 + +So now we bundle the configuration files from a known good version +to let ELinks documentation be built with them regardless of which +version has been installed on the machine. This should keep things +working as long as the configuration file format remains compatible. diff --git a/doc/tools/asciidoc/asciidoc.conf b/doc/tools/asciidoc/asciidoc.conf new file mode 100644 index 00000000..7746794c --- /dev/null +++ b/doc/tools/asciidoc/asciidoc.conf @@ -0,0 +1,335 @@ +# +# asciidoc.conf +# +# Asciidoc global configuration file. +# Contains backend independent configuration settings that are applied to all +# AsciiDoc documents. +# + +[miscellaneous] +tabsize=8 +textwidth=70 +newline=\r\n + +[attributes] +iconsdir=./images/icons +encoding=UTF-8 +quirks= +empty= +amp=& +lt=< +gt=> +brvbar=| +nbsp=  +backslash=\ +# Attribute and AttributeList element patterns. +attributeentry-pattern=^:(?P[a-zA-Z].*?):(?P.*)$ +attributelist-pattern=(?u)(^\[\[(?P[\w\-_]+)\]\]$)|(^\[(?P.*)\]$) + +[titles] +subs=specialcharacters,quotes,replacements,macros,attributes +# Double-line title pattern and underlines. +sectiontitle=^(?P.*?)$ +underlines="==","--","~~","^^","++" +# Single-line title patterns. +sect0=^= (?P<title>[\S].*)$ +sect1=^== (?P<title>[\S].*)$ +sect2=^=== (?P<title>[\S].*)$ +sect3=^==== (?P<title>[\S].*)$ +sect4=^===== (?P<title>[\S].*)$ +blocktitle=^\.(?P<title>\S.*)$ + +[specialcharacters] +&=& +<=< +>=> + +[quotes] +# Don't use "double-quote" characters -- they interfere with quoted element +# attribute values (see ``alternative'' below). +*=strong +'=emphasis +`=monospaced +``|''=quoted +\##|##=unquoted + +[specialwords] +emphasizedwords= +strongwords= +monospacedwords= + +[tags] +# $$ inline passthrough. +passthrough=| + +[replacements] +# Replacements performed in order of configuration file entry. The first entry +# of each replacement pair performs the (non-escaped) replacement, the second +# strips the backslash from the esaped replacement. + +# (C) Copyright (entity reference ©) +(?<!\\)\(C\)=© +\\\(C\)=(C) + +# (R) registered trade mark (entity reference ® +(?<!\\)\(R\)=® +\\\(R\)=(R) + +# (TM) Trademark (entity reference ™) +(?<!\\)\(TM\)=™ +\\\(TM\)=(TM) + +# -- Spaced and unspaced em dashes (entity reference —) +# But disallow unspaced in man pages because double-dash option name prefixes +# are pervasive. +ifndef::doctype-manpage[] +(^|[^-\\])--($|[^-])=\1—\2 +endif::doctype-manpage[] +ifdef::doctype-manpage[] +(^|\s*[^\S\\])--($|\s+)=\1—\2 +endif::doctype-manpage[] +\\--(?!-)=-- + +# ... Ellipsis (entity reference …) +(?<!\\)\.\.\.=… +\\\.\.\.=... + +## +# The following require non-standard embedded fonts in PDF files so are not +# enabled. +# -> right arrow +#->=→ +# => right double arrow +#=>=⇒ +# <- left arrow +#<-=← +# <= left double arrow +#<\==⇐ + +# Paragraphs. +[paradef-default] +delimiter=(?s)(?P<text>\S.*) +template=paragraph +posattrs=style +verse-style=template="verseparagraph" +NOTE-style=template="admonitionparagraph",name="note",caption="Note" +TIP-style=template="admonitionparagraph",name="tip",caption="Tip" +IMPORTANT-style=template="admonitionparagraph",name="important",caption="Important" +WARNING-style=template="admonitionparagraph",name="warning",caption="Warning" +CAUTION-style=template="admonitionparagraph",name="caution",caption="Caution" + +[paradef-literal] +delimiter=(?s)(?P<text>\s+.*) +options=listelement +template=literalparagraph +subs=verbatim + +[paradef-admonition] +delimiter=(?s)^\s*(?P<style>NOTE|TIP|IMPORTANT|WARNING|CAUTION):\s+(?P<text>.+) +NOTE-style=template="admonitionparagraph",name="note",caption="Note" +TIP-style=template="admonitionparagraph",name="tip",caption="Tip" +IMPORTANT-style=template="admonitionparagraph",name="important",caption="Important" +WARNING-style=template="admonitionparagraph",name="warning",caption="Warning" +CAUTION-style=template="admonitionparagraph",name="caution",caption="Caution" + +[macros] +# Inline macros. +# Backslash prefix required for escape processing. +# (?s) re flag for line spanning. +(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= +# Anchor: [[[id]]]. Bibliographic anchor. +(?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3 +# Anchor: [[id,xreflabel]] +(?su)[\\]?\[\[(?P<attrlist>[\w"].*?)\]\]=anchor2 +# Link: <<id,text>> +(?su)[\\]?<<(?P<attrlist>[\w"].*?)>>=xref2 +# Index term: ++primary,secondar,tertiary++ +#(?su)(?<!\S)[\\]?\+\+(?P<attrlist>.+?)\+\+(?!\+)=indexterm +(?su)(?<!\S)[\\]?\+\+(?P<attrlist>[^+].*?)\+\+(?!\+)=indexterm +# Index term: +primary+ +# Follows ++...++ macro otherwise it will match them. +#(?<!\S)[\\]?\+(?P<attrlist>[^\s\+].*?)\+(?!\+)=indexterm2 +(?<!\S)[\\]?\+(?P<attrlist>[^\s\+][^+].*?)\+(?!\+)=indexterm2 +# Callout +[\\]?<(?P<index>\d+)>=callout + +# Block macros. +(?u)^(?P<name>\w(\w|-)*?)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=# +^'{4,}$=#ruler +^//([^/].*|)$=#comment + +# System macros. +# The default macro which is hardwired into asciidoc. +#(?u)^(?P<name>\w(\w|-)*?)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=+ + +# Delimited blocks. +[blockdef-comment] +delimiter=^/{4,} +options=skip + +[comment-blockmacro] +# Outputs nothing. + +[blockdef-sidebar] +delimiter=^\*{4,}$ +template=sidebarblock +options=sectionbody + +[blockdef-list] +delimiter=^--$ +template=listblock +options=list + +[listblock] +| + +[blockdef-passthrough] +delimiter=^\+{4,}$ +template=passthroughblock +subs=attributes,macros + +[blockdef-listing] +delimiter=^-{4,}$ +template=listingblock +subs=verbatim + +[blockdef-literal] +delimiter=^\.{4,}$ +template=literalblock +subs=verbatim +posattrs=style +verse-style=template="verseblock",subs="normal" + +[blockdef-quote] +delimiter=^_{4,}$ +template=quoteblock +options=sectionbody +subs=normal +posattrs=attribution,citetitle + +[blockdef-example] +delimiter=^\={4,}$ +template=exampleblock +options=sectionbody +posattrs=style +NOTE-style=template="admonitionblock",name="note",caption="Note" +TIP-style=template="admonitionblock",name="tip",caption="Tip" +IMPORTANT-style=template="admonitionblock",name="important",caption="Important" +WARNING-style=template="admonitionblock",name="warning",caption="Warning" +CAUTION-style=template="admonitionblock",name="caution",caption="Caution" + + +# Lists. +[listdef-bulleted] +type=bulleted +delimiter=^\s*- +(?P<text>.+)$ +listtag=ilist +itemtag=ilistitem +texttag=ilisttext + +[listdef-bulleted2] +type=bulleted +delimiter=^\s*\* +(?P<text>.+)$ +listtag=ilist +itemtag=ilistitem +texttag=ilisttext + +[listdef-numbered] +type=numbered +delimiter=^\s*(?P<index>\d*)\. +(?P<text>.+)$ +listtag=olist +itemtag=olistitem +texttag=olisttext + +[listdef-numbered2] +type=numbered +delimiter=^\s*(?P<index>[.a-z])\. +(?P<text>.+)$ +listtag=olist2 +itemtag=olistitem +texttag=olisttext + +[listdef-vlabeled] +type=labeled +delimiter=^\s*(?P<label>[\S].*)::$ +listtag=vlist +itemtag=vlistitem +texttag=vlisttext +entrytag=vlistentry +labeltag=vlistterm + +[listdef-vlabeled2] +type=labeled +delimiter=^\s*(?P<label>[\S].*);;$ +listtag=vlist +itemtag=vlistitem +texttag=vlisttext +entrytag=vlistentry +labeltag=vlistterm + +[listdef-hlabeled] +type=labeled +delimiter=^\s*(?P<label>[\S].*)::\s+(?P<text>.+)$ +listtag=hlist +itemtag=hlistitem +texttag=hlisttext +entrytag=hlistentry +labeltag=hlistterm + +[listdef-hlabeled2] +type=labeled +delimiter=^\s*(?P<label>[\S].*);;\s+(?P<text>.+)$ +listtag=hlist +itemtag=hlistitem +texttag=hlisttext +entrytag=hlistentry +labeltag=hlistterm + + +# Question and Answer list. +[listdef-qanda] +type=labeled +delimiter=^\s*(?P<label>[\S].*)\?\?$ +listtag=qlist +itemtag=qlistitem +texttag=qlisttext +entrytag=qlistentry +labeltag=qlistterm + +# Bibliography list. +[listdef-bibliography] +type=bulleted +delimiter=^\+ +(?P<text>.+)$ +listtag=blist +itemtag=blistitem +texttag=blisttext + +# Glossary list. +[listdef-glossary] +type=labeled +delimiter=^(?P<label>[\S].*):-$ +listtag=glist +itemtag=glistitem +texttag=glisttext +entrytag=glistentry +labeltag=glistterm + +# Callout list. +[listdef-callout] +type=callout +delimiter=^<?(?P<index>\d*)> +(?P<text>.+)$ +listtag=colist +itemtag=colistitem +texttag=colisttext + +# Tables. +[tabledef-default] +fillchar=- +format=fixed + +[tabledef-csv] +fillchar=~ +format=csv + +[tabledef-dsv] +fillchar=_ +format=dsv diff --git a/doc/tools/asciidoc/docbook.conf b/doc/tools/asciidoc/docbook.conf new file mode 100644 index 00000000..efdc557f --- /dev/null +++ b/doc/tools/asciidoc/docbook.conf @@ -0,0 +1,589 @@ +# +# docbook.conf +# +# Asciidoc configuration file. +# Default docbook backend. +# + +[miscellaneous] +outfilesuffix=.xml +# Printable page width in pts. +pagewidth=380 +pageunits=pt + +[attributes] +basebackend=docbook +basebackend-docbook= + +[replacements] +# Line break markup is dropped (there is no DocBook line break tag). +(?m)^(.*)\s\+$=\1 +# Superscripts. +\^(.+?)\^=<superscript>\1</superscript> +# Subscripts. +~(.+?)~=<subscript>\1</subscript> + +[ruler-blockmacro] +# Only applies to HTML so don't output anything. + +[image-inlinemacro] +<inlinemediaobject> + <imageobject> + <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/> + </imageobject> + <textobject><phrase>{1={target}}</phrase></textobject> +</inlinemediaobject> + +[image-blockmacro] +<figure{id? id="{id}"}><title>{title} +{title%} + + + + + {1={target}} + +{title#} +{title%} + +[indexterm-inlinemacro] +# Inline index term. +# Generate separate index entries for primary, secondary and tertiary +# descriptions. +# Primary only. +{2%} +{2%} {1} +{2%} +# Primary and secondary. +{2#}{3%} +{2#}{3%} {1}{2} +{2#}{3%} +{2#}{3%} +{2#}{3%} {2} +{2#}{3%} +# Primary, secondary and tertiary. +{3#} + {1}{2}{3} +{3#} +{3#} + {2}{3} +{3#} +{3#} + {3} +{3#} + +[indexterm2-inlinemacro] +# Inline index term. +# Single entry index term that is visible in the primary text flow. + + {1} + +{1} + +[footnote-inlinemacro] +# Inline footnote. +{0} + +[callout-inlinemacro] +# Inline callout. + + +[tags] +# Bulleted, numbered and labeled list tags. +ilist={title?{title}}| +ilistitem=| +ilisttext=| +olist={title?{title}}| +olist2=| +olistitem=| +olisttext=| +vlist={title?{title}}| +vlistentry=| +vlistterm=| +vlisttext=| +vlistitem=| +# Horizontal labeled list (implemented with two column table). +# Hardwired column widths to 30%,70% because the current crop of PDF +# generators do not auto calculate column widths. +hlist=<{title?table}{title!informaltable}{id? id="{id}"} tabstyle="{style=hlabeledlist}" pgwide="0" frame="none" colsep="0" rowsep="0">{title?{title}}|<{title?/table}{title!/informaltable}> +hlistentry=| +hlisttext=| +hlistterm=| +hlistitem=| + +# Question and Answer list. +qlist={title?{title}}| +qlistentry=| +qlistterm=| +qlistitem=| +qlisttext=| +# Bibliography list. +blist=| +blistitem=| +blisttext=| +# Glossary list. +glist=| +glistentry=| +glistterm=| +glistitem=| +glisttext=| +# Callout list. +colist={title?{title}}| +colistitem=| +colisttext=| + +# Quoted text +emphasis=| +strong=| +monospaced=| +quoted={amp}#8220;|{amp}#8221; +unquoted=| + +# $$ inline passthrough. +passthrough=| + +# Inline macros +[http-inlinemacro] +{0={name}:{target}} +[https-inlinemacro] +{0={name}:{target}} +[ftp-inlinemacro] +{0={name}:{target}} +[file-inlinemacro] +{0={name}:{target}} +[mailto-inlinemacro] +{0={target}} +#{target} +[link-inlinemacro] +{0={target}} +# anchor:id[text] +[anchor-inlinemacro] + +# [[id,text]] +[anchor2-inlinemacro] + +# [[[id]]] +[anchor3-inlinemacro] +[{1}] +# xref:id[text] +[xref-inlinemacro] +{0} +{2%} +# <> +[xref2-inlinemacro] +{2} +{2%} + + +# Special word macros +[emphasizedwords] +{words} +[monospacedwords] +{words} +[strongwords] +{words} + +# Paragraph substitution. +[paragraph] +{title} +{title%} +| +{title%} +{title#} +{empty} + +[admonitionparagraph] +<{name}{id? id="{id}"}>| + +[literalparagraph] +# The literal block employs the same markup. +template::[literalblock] + +[verseparagraph] +template::[verseblock] + +# Delimited blocks. +[literalblock] +{title} + +| + +{title#} + +[listingblock] +{title} + +| + +{title#} + +[verseblock] +{title} +{title%} +{title#} +| + +{title#} + +[sidebarblock] + +{title} +| + + +[passthroughblock] +| + +[quoteblock] +# The epigraph element may be more appropriate than blockquote. + +{title} + +{attribution} +{citetitle} + +| + + +[exampleblock] +<{title?example}{title!informalexample}{id? id="{id}"}> +{title} +| + + +[admonitionblock] +<{name}{id? id="{id}"}> +{title} +| + + +# Tables. +[tabledef-default] +template=table +colspec= +bodyrow=| +bodydata=| + +[table] +<{title?table}{title!informaltable}{id? id="{id}"} pgwide="0" +frame="{frame=topbot}" +{grid%rowsep="0" colsep="0"} +rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}" +> +{title} + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + + + + +[specialsections] +ifdef::doctype-article[] +^Abstract$=sect-abstract +endif::doctype-article[] + +ifdef::doctype-book[] +^Colophon$=sect-colophon +^Dedication$=sect-dedication +^Preface$=sect-preface +endif::doctype-book[] + +^Index$=sect-index +^(Bibliography|References)$=sect-bibliography +^Glossary$=sect-glossary +^Appendix [A-Z][:.](?P.*)$=sect-appendix + +# Special sections. +[sect-preface] +<preface{id? id="{id}"}> +<title>{title} +| + + +[sect-index] + +{title} +| + + +[sect-bibliography] + +{title} +| + + +[sect-glossary] + +{title} +| + + +[sect-appendix] + +{title} +| + + + +[header-declarations] + + + +#------------------------- +# article document type +#------------------------- +ifdef::doctype-article[] + +[header] +template::[header-declarations] + +
+{doctitle#} + {doctitle} + {date} + {authored#} + {firstname} + {middlename} + {lastname} +
{email}
+ {authored#}
+ {authorinitials} + +# If file named like source document with -revhistory.xml suffix exists +# include it as the document history, otherwise use current revision. +{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} +{revisionhistory%}{revision}{date}{authorinitials?{authorinitials}}{revremark?{revremark}} + + {companyname} +{doctitle#}
+ +[footer] +
+ +[preamble] +# Untitled elements between header and first section title. +| + +[sect-abstract] + +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +[sect4] + +{title} +| + + +endif::doctype-article[] + +#------------------------- +# manpage document type +#------------------------- +ifdef::doctype-manpage[] + +[replacements] +# The roff format does not substitute special characters so just print them as +# text. +\(C\)=(C) +\(TM\)=(TM) + +[header] +template::[header-declarations] + + +{mantitle} +{manvolnum} + + + {manname} + {manpurpose} + + +[footer] + + +# Section macros +[sect-synopsis] + +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +endif::doctype-manpage[] + +#------------------------- +# book document type +#------------------------- +ifdef::doctype-book[] + +[header] +template::[header-declarations] + + +{doctitle#} + {doctitle} + {date} + {authored#} + {firstname} + {middlename} + {lastname} +
{email}
+ {authored#}
+ {authorinitials} + +# If file named like source document with -revhistory.xml suffix exists +# include it as the document history, otherwise use current revision. +{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} +{revisionhistory%}{revision}{date}{authorinitials?{authorinitials}}{revremark?{revremark}} + + {companyname} +{doctitle#}
+ +[footer] +
+ +[preamble] +# Preamble is not allowed in DocBook book so wrap it in a preface. + +Preface +| + + +[sect-dedication] + +| + + +[sect-colophon] + +| + + +[sect0] + +{title} +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +[sect4] + +{title} +| + + +endif::doctype-book[] + +ifdef::sgml[] +# +# Optional DocBook SGML. +# +# Most of the differences between DocBook XML and DocBook SGML boils +# down to the empty element syntax: SGML does not like the XML empty +# element <.../> syntax, use <...> instead. +# +[miscellaneous] +outfilesuffix=.sgml + +[header-declarations] + + +[tabledef-default] +colspec= + +[image-inlinemacro] + + + + + {1={target}} + + +[image-blockmacro] +
{title} +{title%} + + + + + {1={target}} + +{title#}
+{title%} + +# Inline macros +[xref-inlinemacro] +{0} +{2%} +[xref2-inlinemacro] +# <> +{2} +{2%} +[anchor-inlinemacro] + +[anchor2-inlinemacro] +# [[id,text]] + + +endif::sgml[] diff --git a/doc/tools/asciidoc/stylesheets/xhtml11-quirks.css b/doc/tools/asciidoc/stylesheets/xhtml11-quirks.css new file mode 100644 index 00000000..a35e7b61 --- /dev/null +++ b/doc/tools/asciidoc/stylesheets/xhtml11-quirks.css @@ -0,0 +1,28 @@ +/* Workarounds for IE6's broken and incomplete CSS2. */ + +div.sidebar-content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} +div.sidebar-title, div.image-title { + font-family: sans-serif; + font-weight: bold; + margin-top: 0.0em; + margin-bottom: 0.5em; +} + +div.listingblock div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock-content { + padding-left: 2.0em; +} + +div.exampleblock-content { + border-left: 2px solid silver; + padding-left: 0.5em; +} diff --git a/doc/tools/asciidoc/stylesheets/xhtml11.css b/doc/tools/asciidoc/stylesheets/xhtml11.css new file mode 100644 index 00000000..ddecb2d9 --- /dev/null +++ b/doc/tools/asciidoc/stylesheets/xhtml11.css @@ -0,0 +1,229 @@ +/* Debug borders */ +p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { +/* + border: 1px solid red; +*/ +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; +} + +strong { + font-weight: bold; +} + +tt { + color: navy; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + font-family: sans-serif; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1 { + border-bottom: 2px solid silver; +} +h2 { + border-bottom: 2px solid silver; + padding-top: 0.5em; +} + +div.sectionbody { + font-family: serif; + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +pre { + padding: 0; + margin: 0; +} + +span#author { + color: #527bbd; + font-family: sans-serif; + font-weight: bold; + font-size: 1.2em; +} +span#email { +} +span#revision { + font-family: sans-serif; +} + +div#footer { + font-family: sans-serif; + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +div#footer-text { + float: left; + padding-bottom: 0.5em; +} +div#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +div#preamble, +div.tableblock, div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-right: 10%; + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + font-family: sans-serif; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock > div.content { + padding-left: 2.0em; +} + +div.attribution { + text-align: right; +} +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 2px solid silver; +} + +div.exampleblock > div.content { + border-left: 2px solid silver; + padding: 0.5em; +} + +div.verseblock div.content { + white-space: pre; +} + +div.imageblock div.content { padding-left: 0; } +div.imageblock img { border: 1px solid silver; } +span.image img { border-style: none; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: italic; +} +dd > *:first-child { + margin-top: 0; +} + +ul, ol { + list-style-position: outside; +} +ol.olist2 { + list-style-type: lower-alpha; +} + +div.tableblock > table { + border: 3px solid #527bbd; +} +thead { + font-family: sans-serif; + font-weight: bold; +} +tfoot { + font-weight: bold; +} + +div.hlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +td.hlist1 { + vertical-align: top; + font-style: italic; + padding-right: 0.8em; +} +td.hlist2 { + vertical-align: top; +} + +@media print { + div#footer-badges { display: none; } +} diff --git a/doc/tools/asciidoc/xhtml11-quirks.conf b/doc/tools/asciidoc/xhtml11-quirks.conf new file mode 100644 index 00000000..6c827e2a --- /dev/null +++ b/doc/tools/asciidoc/xhtml11-quirks.conf @@ -0,0 +1,43 @@ +# +# xhtml11-quirks.conf +# +# Workarounds for IE6's broken # and incomplete CSS2. +# + +[image-blockmacro] +
+ + +
{caption=Figure: }{title}
+
+ +[sidebarblock] +
+ +
+ +[quoteblock] +
+ +
{title}
+
+| +
+{citetitle}
+— {attribution} +
+ +[exampleblock] +
+ +
{caption=Example: }{title}
+
+| +
diff --git a/doc/tools/asciidoc/xhtml11.conf b/doc/tools/asciidoc/xhtml11.conf new file mode 100644 index 00000000..49e07691 --- /dev/null +++ b/doc/tools/asciidoc/xhtml11.conf @@ -0,0 +1,426 @@ +# +# xhtml11.conf +# +# Asciidoc configuration file. +# xhtml11 backend, generates XHTML 1.1 conformant markup. +# +[miscellaneous] +outfilesuffix=.html +# Screen width in pixels. +pagewidth=800 +pageunits= + +[attributes] +basebackend=html +basebackend-html= + +[replacements] +# Line break. +(?m)^(.*)\s\+$=\1
+# Superscripts. +\^(.+?)\^=\1 +# Subscripts. +~(.+?)~=\1 +# Escape ASCIIMathML delimiters. +ifdef::asciimath[] +\$=\$ +`=\` +endif::asciimath[] + +[ruler-blockmacro] +
+ +[image-inlinemacro] + + +{1={target}} +{link#} + + +[image-blockmacro] +
+ + +
{caption=Figure: }{title}
+
+ +[indexterm-inlinemacro] +# Inline index term. +{empty} + +[indexterm2-inlinemacro] +# Inline index term. +# Single entry index term that is visible in the primary text flow. +{1} + +[footnote-inlinemacro] +# Inline footnote. +
[{0}]
+ +[callout-inlinemacro] +# Inline callout. +({index}) + +[tags] +# Bulleted, numbered and labeled list tags. +ilist={id?}{title?
{title}
}
    |
+ilistitem=
  • |
  • +ilisttext=

    |

    +olist={id?}{title?
    {title}
    }
      |
    +olist2={id?}
      |
    +olistitem=
  • |
  • +olisttext=

    |

    +vlist={id?}{title?
    {title}
    }
    |
    +vlistentry=| +vlistterm=
    |
    +vlistitem=
    |
    +vlisttext=

    |

    +# Horizontal labeled list. +hlist=
    {id?}{title?
    {title}
    }{1?}{2?}|
    +hlistentry=| +hlistterm=| +hlistitem=| +hlisttext=| +# Question and Answer list. +qlist={id?}{title?
    {title}
    }
      |
    +qlistentry=
  • |
  • +qlistterm=

    |

    +qlistitem=| +qlisttext=

    |

    +# Callout list. +colist={id?}{title?
    {title}
    }
      |
    +colistitem=
  • |
  • +colisttext=

    |

    + +# Quoted text. +emphasis=| +strong=| +monospaced=| +quoted={0?}{amp}#8220;|{amp}#8221;{0?} +unquoted={0?}|{0?} + +# $$ inline passthrough. +$$passthrough=| + +# Inline macros +[http-inlinemacro] +{0={name}:{target}} +[https-inlinemacro] +{0={name}:{target}} +[ftp-inlinemacro] +{0={name}:{target}} +[file-inlinemacro] +{0={name}:{target}} +[mailto-inlinemacro] +{0={target}} +[link-inlinemacro] +{0={target}} +# anchor:id[text] +[anchor-inlinemacro] + +# [[id,text]] +[anchor2-inlinemacro] + +# [[[id]]] +[anchor3-inlinemacro] +[{1}] +# xref:id[text] +[xref-inlinemacro] +{0=[{target}]} +# <> +[xref2-inlinemacro] +{2=[{1}]} + +# Special word substitution. +[emphasizedwords] +{words} +[monospacedwords] +{words} +[strongwords] +{words} + +# Paragraph substitution. +[paragraph] +
    {title}
    +

    {id?} +| +

    + +[literalparagraph] +# The literal block employs the same markup. +template::[literalblock] + +[verseparagraph] +# The verse block employs the same markup. +template::[verseblock] + +[admonitionparagraph] +# The admonition block employs the same markup. +template::[admonitionblock] + +# Delimited blocks. +[passthroughblock] +| + +[listingblock] +
    + +
    {caption=Example: }{title}
    +
    +
    
    +|
    +
    +
    + +[literalblock] +
    + +
    {title}
    +
    +{style#}
    
    +{style%}
    
    +|
    +
    +
    + +[verseblock] +
    + +
    {title}
    +
    +| +
    + +[sidebarblock] +
    + +
    +
    {title}
    +| +
    + +[quoteblock] +
    + +
    {title}
    +
    +| +
    +{citetitle}
    +— {attribution} +
    + +[exampleblock] +
    + +
    {caption=Example: }{title}
    +
    +| +
    + +[admonitionblock] +
    + + + + +
    +{icons#}{caption} +{icons%}
    {caption}
    +
    +
    {title}
    +| +
    +
    + +# Bibliography list. +# Same as numbered list. +[listdef-bibliography] +listtag=olist +itemtag=olistitem +texttag=olisttext + +# Glossary list. +# Same as labeled list. +[listdef-glossary] +listtag=vlist +itemtag=vlistitem +texttag=vlisttext +entrytag=vlistentry +labeltag=vlistterm + +# Tables. +[tabledef-default] +template=table +colspec= +bodyrow=| +headdata=| +footdata=| +bodydata=| + +[table] +
    + + + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + +
    {caption=Table: }{title}
    +
    + +[preamble] +# Untitled elements between header and first section title. +
    + +
    +| +
    +
    + +# Document sections. +[sect0] +

    {id?}{title}

    +| + +[sect1] +

    {id?}{numbered?{sectnum} }{title}

    +
    +| +
    + +[sect2] +

    {id?}{numbered?{sectnum} }{title}

    +| + +[sect3] +

    {id?}{numbered?{sectnum} }{title}

    +| + +[sect4] +
    {id?}{title}
    +| + +[header] +# IE6 enters quirks mode if the following XML directive is present. +# + + + + + +ifdef::linkcss[] + +{doctype-manpage} +ifdef::quirks[] + +endif::quirks[] +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +ifdef::asciimath[] +ifdef::linkcss[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::asciimath[] +{doctitle} + + +# Article, book header. +ifndef::doctype-manpage[] + +endif::doctype-manpage[] +# Man page header. +ifdef::doctype-manpage[] + +endif::doctype-manpage[] + +[footer] + + + + +ifdef::doctype-manpage[] +[sect-synopsis] +template::[sect1] +endif::doctype-manpage[] + +ifdef::quirks[] +include::{backend}-quirks.conf[] +endif::quirks[]