1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-26 01:15:37 +00:00
elinks/doc/tools/asciidoc/docbook.conf
Kalle Olavi Niemitalo 40715ffbd4 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.
2008-08-02 11:28:24 +03:00

590 lines
14 KiB
Plaintext

#
# 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>
{title%}<informalfigure{id? id="{id}"}>
<mediaobject>
<imageobject>
<imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/>
</imageobject>
<textobject><phrase>{1={target}}</phrase></textobject>
</mediaobject>
{title#}</figure>
{title%}</informalfigure>
[indexterm-inlinemacro]
# Inline index term.
# Generate separate index entries for primary, secondary and tertiary
# descriptions.
# Primary only.
{2%}<indexterm>
{2%} <primary>{1}</primary>
{2%}</indexterm>
# Primary and secondary.
{2#}{3%}<indexterm>
{2#}{3%} <primary>{1}</primary><secondary>{2}</secondary>
{2#}{3%}</indexterm>
{2#}{3%}<indexterm>
{2#}{3%} <primary>{2}</primary>
{2#}{3%}</indexterm>
# Primary, secondary and tertiary.
{3#}<indexterm>
<primary>{1}</primary><secondary>{2}</secondary><tertiary>{3}</tertiary>
{3#}</indexterm>
{3#}<indexterm>
<primary>{2}</primary><secondary>{3}</secondary>
{3#}</indexterm>
{3#}<indexterm>
<primary>{3}</primary>
{3#}</indexterm>
[indexterm2-inlinemacro]
# Inline index term.
# Single entry index term that is visible in the primary text flow.
<indexterm>
<primary>{1}</primary>
</indexterm>
{1}
[footnote-inlinemacro]
# Inline footnote.
<footnote><simpara>{0}</simpara></footnote>
[callout-inlinemacro]
# Inline callout.
<co id="{coid}"/>
[tags]
# Bulleted, numbered and labeled list tags.
ilist=<itemizedlist{id? id="{id}"}>{title?<title>{title}</title>}|</itemizedlist>
ilistitem=<listitem>|</listitem>
ilisttext=<simpara>|</simpara>
olist=<orderedlist{id? id="{id}"}>{title?<title>{title}</title>}|</orderedlist>
olist2=<orderedlist{id? id="{id}"} numeration="loweralpha">|</orderedlist>
olistitem=<listitem>|</listitem>
olisttext=<simpara>|</simpara>
vlist=<variablelist{id? id="{id}"}>{title?<title>{title}</title>}|</variablelist>
vlistentry=<varlistentry>|</varlistentry>
vlistterm=<term>|</term>
vlisttext=<simpara>|</simpara>
vlistitem=<listitem>|</listitem>
# 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}</title>}<tgroup cols="2"><colspec colwidth="{1=3}*"/><colspec colwidth="{2=7}*"/><tbody valign="top">|</tbody></tgroup><{title?/table}{title!/informaltable}>
hlistentry=<row>|</row>
hlisttext=<simpara>|</simpara>
hlistterm=<entry><simpara>|</simpara></entry>
hlistitem=<entry>|</entry>
# Question and Answer list.
qlist=<qandaset{id? id="{id}"}>{title?<title>{title}</title>}|</qandaset>
qlistentry=<qandaentry>|</qandaentry>
qlistterm=<question><simpara>|</simpara></question>
qlistitem=<answer>|</answer>
qlisttext=<simpara>|</simpara>
# Bibliography list.
blist=|
blistitem=<bibliomixed>|</bibliomixed>
blisttext=<bibliomisc>|</bibliomisc>
# Glossary list.
glist=|
glistentry=<glossentry>|</glossentry>
glistterm=<glossterm>|</glossterm>
glistitem=<glossdef>|</glossdef>
glisttext=<simpara>|</simpara>
# Callout list.
colist=<calloutlist{id? id="{id}"}>{title?<title>{title}</title>}|</calloutlist>
colistitem=<callout arearefs="{coids}">|</callout>
colisttext=<simpara>|</simpara>
# Quoted text
emphasis=<emphasis>|</emphasis>
strong=<emphasis role="strong">|</emphasis>
monospaced=<literal>|</literal>
quoted={amp}#8220;|{amp}#8221;
unquoted=|
# $$ inline passthrough.
passthrough=|
# Inline macros
[http-inlinemacro]
<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
[https-inlinemacro]
<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
[ftp-inlinemacro]
<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
[file-inlinemacro]
<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
[mailto-inlinemacro]
<ulink url="{name}:{target}">{0={target}}</ulink>
#<email>{target}</email>
[link-inlinemacro]
<ulink url="{target}">{0={target}}</ulink>
# anchor:id[text]
[anchor-inlinemacro]
<anchor id="{target}" xreflabel="{0=[{target}]}"/>
# [[id,text]]
[anchor2-inlinemacro]
<anchor id="{1}" xreflabel="{2=[{1}]}"/>
# [[[id]]]
[anchor3-inlinemacro]
<anchor id="{1}" xreflabel="[{1}]"/>[{1}]
# xref:id[text]
[xref-inlinemacro]
<link linkend="{target}">{0}</link>
{2%}<xref linkend="{target}"/>
# <<id,text>>
[xref2-inlinemacro]
<link linkend="{1}">{2}</link>
{2%}<xref linkend="{1}"/>
# Special word macros
[emphasizedwords]
<emphasis>{words}</emphasis>
[monospacedwords]
<literal>{words}</literal>
[strongwords]
<emphasis role="strong">{words}</emphasis>
# Paragraph substitution.
[paragraph]
<formalpara{id? id="{id}"}><title>{title}</title><para>
{title%}<simpara{id? id="{id}"}>
|
{title%}</simpara>
{title#}</para></formalpara>
{empty}
[admonitionparagraph]
<{name}{id? id="{id}"}><simpara>|</simpara></{name}>
[literalparagraph]
# The literal block employs the same markup.
template::[literalblock]
[verseparagraph]
template::[verseblock]
# Delimited blocks.
[literalblock]
<example><title>{title}</title>
<literallayout{id? id="{id}"} class="{font=monospaced}">
|
</literallayout>
{title#}</example>
[listingblock]
<example><title>{title}</title>
<screen>
|
</screen>
{title#}</example>
[verseblock]
<formalpara{id? id="{id}"}><title>{title}</title><para>
{title%}<literallayout{id? id="{id}"}>
{title#}<literallayout>
|
</literallayout>
{title#}</para></formalpara>
[sidebarblock]
<sidebar{id? id="{id}"}>
<title>{title}</title>
|
</sidebar>
[passthroughblock]
|
[quoteblock]
# The epigraph element may be more appropriate than blockquote.
<blockquote{id? id="{id}"}>
<title>{title}</title>
<attribution>
{attribution}
<citetitle>{citetitle}</citetitle>
</attribution>
|
</blockquote>
[exampleblock]
<{title?example}{title!informalexample}{id? id="{id}"}>
<title>{title}</title>
|
</{title?example}{title!informalexample}>
[admonitionblock]
<{name}{id? id="{id}"}>
<title>{title}</title>
|
</{name}>
# Tables.
[tabledef-default]
template=table
colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}"/>
bodyrow=<row>|</row>
bodydata=<entry>|</entry>
[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>{title}</title>
<tgroup cols="{cols}">
{colspecs}
{headrows#}<thead>
{headrows}
{headrows#}</thead>
{footrows#}<tfoot>
{footrows}
{footrows#}</tfoot>
<tbody>
{bodyrows}
</tbody>
</tgroup>
</{title?table}{title!informaltable}>
[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<title>.*)$=sect-appendix
# Special sections.
[sect-preface]
<preface{id? id="{id}"}>
<title>{title}</title>
|
</preface>
[sect-index]
<index{id? id="{id}"}>
<title>{title}</title>
|
</index>
[sect-bibliography]
<bibliography{id? id="{id}"}>
<title>{title}</title>
|
</bibliography>
[sect-glossary]
<glossary{id? id="{id}"}>
<title>{title}</title>
|
</glossary>
[sect-appendix]
<appendix{id? id="{id}"}>
<title>{title}</title>
|
</appendix>
[header-declarations]
<?xml version="1.0" encoding="{encoding}"?>
<!DOCTYPE {doctype-article?article}{doctype-book?book}{doctype-manpage?refentry} PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
#-------------------------
# article document type
#-------------------------
ifdef::doctype-article[]
[header]
template::[header-declarations]
<article lang="en">
{doctitle#}<articleinfo>
<title>{doctitle}</title>
<date>{date}</date>
{authored#}<author>
<firstname>{firstname}</firstname>
<othername>{middlename}</othername>
<surname>{lastname}</surname>
<affiliation><address><email>{email}</email></address></affiliation>
{authored#}</author>
<authorinitials>{authorinitials}</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%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{authorinitials?<authorinitials>{authorinitials}</authorinitials>}{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
<corpname>{companyname}</corpname>
{doctitle#}</articleinfo>
[footer]
</article>
[preamble]
# Untitled elements between header and first section title.
|
[sect-abstract]
<abstract{id? id="{id}"}>
|
</abstract>
[sect1]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>
[sect2]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>
[sect3]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>
[sect4]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>
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]
<refentry>
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
</refmeta>
<refnamediv>
<refname>{manname}</refname>
<refpurpose>{manpurpose}</refpurpose>
</refnamediv>
[footer]
</refentry>
# Section macros
[sect-synopsis]
<refsynopsisdiv{id? id="{id}"}>
|
</refsynopsisdiv>
[sect1]
<refsect1{id? id="{id}"}>
<title>{title}</title>
|
</refsect1>
[sect2]
<refsect2{id? id="{id}"}>
<title>{title}</title>
|
</refsect2>
[sect3]
<refsect3{id? id="{id}"}>
<title>{title}</title>
|
</refsect3>
endif::doctype-manpage[]
#-------------------------
# book document type
#-------------------------
ifdef::doctype-book[]
[header]
template::[header-declarations]
<book lang="en">
{doctitle#}<bookinfo>
<title>{doctitle}</title>
<date>{date}</date>
{authored#}<author>
<firstname>{firstname}</firstname>
<othername>{middlename}</othername>
<surname>{lastname}</surname>
<affiliation><address><email>{email}</email></address></affiliation>
{authored#}</author>
<authorinitials>{authorinitials}</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%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{authorinitials?<authorinitials>{authorinitials}</authorinitials>}{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
<corpname>{companyname}</corpname>
{doctitle#}</bookinfo>
[footer]
</book>
[preamble]
# Preamble is not allowed in DocBook book so wrap it in a preface.
<preface{id? id="{id}"}>
<title>Preface</title>
|
</preface>
[sect-dedication]
<dedication{id? id="{id}"}>
|
</dedication>
[sect-colophon]
<colophon{id? id="{id}"}>
|
</colophon>
[sect0]
<part{id? id="{id}"}>
<title>{title}</title>
|
</part>
[sect1]
<chapter{id? id="{id}"}>
<title>{title}</title>
|
</chapter>
[sect2]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>
[sect3]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>
[sect4]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>
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]
<!DOCTYPE {doctype-article?article}{doctype-book?book}{doctype-manpage?refentry} PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
[tabledef-default]
colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}">
[image-inlinemacro]
<inlinemediaobject>
<imageobject>
<imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}>
</imageobject>
<textobject><phrase>{1={target}}</phrase></textobject>
</inlinemediaobject>
[image-blockmacro]
<figure><title>{title}</title>
{title%}<informalfigure>
<mediaobject>
<imageobject>
<imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}>
</imageobject>
<textobject><phrase>{1={target}}</phrase></textobject>
</mediaobject>
{title#}</figure>
{title%}</informalfigure>
# Inline macros
[xref-inlinemacro]
<link linkend="{target}">{0}</link>
{2%}<xref linkend="{target}">
[xref2-inlinemacro]
# <<id,text>>
<link linkend="{1}">{2}</link>
{2%}<xref linkend="{1}">
[anchor-inlinemacro]
<anchor id="{target}" xreflabel="{0=[{target}]}">
[anchor2-inlinemacro]
# [[id,text]]
<anchor id="{1}" xreflabel="{2=[{1}]}">
endif::sgml[]