On 17/02/11 21:30, Shlomi Fish wrote:
Hi all,
I've been enjoying using AsciiDoc for the user-documentation of Freecell
Solver ( http://fc-solve.berlios.de/ ). I've picked up AsciiDoc so I can
convert the fc-sovle documentation with relative ease to DocBook/XML (which is
a relatively rare feature among all lightweight markup languages), and it
worked nicely. Its AsciiDocs are in English, though now a contributor has
begun translating them to Dutch.
In any case, I've written or started to write some stories/novellas/novels and
some screenplays in these dedicated lightweight markup languages which I've
implemented that convert them to a custom XML format and from it to DocBook
and/or XHTML:
* http://freshmeat.net/projects/xml-grammar-fiction
(A known issue with the screenplays is that their output format is a popular
one among some Internet screenplays I've seen an not the one enforced by
Holywood and other film studios.)
I've been thinking of using AsciiDoc at least instead of the -Fiction part,
but I see two possible issues:
1. Some of my stories are in Hebrew and I need good support for bidirectional
scripts. The words "hebrew", "arabic", "direction", "bidi", "rtl", "ltr", etc.
do not appear in the AsciiDoc documentation even once, so I don't know if it's
possible there. If you believe it is, let me know. I suppose AsciiDoc supports
Unicode and I can insert the special unicode bidirectional characters (e.g:
LRM, RLM, POP, etc.). However, all of these should be mentioned somewhere in
the documentation.
There is no explicit bidirectional support in AsciiDoc.
2. I believe DocBook 5.x has better Bidi and Right-to-left languages support
than DocBook 4.x, but AsciiDoc does not appear to support it. Will a patch
that adds support for DocBook 5.x (or replaces the DocBook 4.x support with it
- it's your call) will be accepted?
In theory all that's necessary is to write a docbook50.conf backend
configuration file. Out of interest I made a start last year, I thought it would
be a trivial exercise but it quickly degenerated into a can of worms: you need a
DocBook 5 specific toolchain to process it and the semantically tighter DocBook
5 makes markup generation difficult. DocBook 5 brings nothing new to AsciiDoc so
I put it aside.
Here are my (very rough and unchecked) notes and I've attached my wholly
incomplete docbook50.conf file. If you do create working docbook50.conf file we
could look at including it in the distribution as an ``experimental'' backend.
8<--------
DocBook 5
---------
- See http://www.sagehill.net/docbookxsl/ProcesingDb5.htm
- Ubuntu DocBook 5 specific packages: docbook5-xml, docbook-xsl-ns
- See docbook50.conf, it's nowhere near finished.
To validate use RelaxNG schema e.g.
xmllint --noout --relaxng
/usr/share/xml/docbook/schema/rng/5.0/docbook.rng doc/article.xml
NOTE: Don't use the --valid option as this causes xmllint to look for
an external DTD and you will get a 'Validation failed: no DTD found'
error.
DocBook 5 is not as relaxed as DocBook 4 e.g.
- 'abstract' must occur inside 'info', cannot appear like section.
- Admonitions can't occur in 'article' element.
- Doesn't like preamble to proceed first section.
8<--------
Cheers, Stuart
----------------
That put aside, I've been playing with the idea of adding more "artsy" tags to
DocBook/5.x to allow for writing fiction and stories with ease using it. I've
already written the novella http://www.shlomifish.org/humour/human-hacking/
using DocBook/XML and also made the original DocBook available, but trying to
use DocBook/XML for screenplays failed spectacularly. But it is not directly
related to the point of my suggestions for the improvement of AsciiDoc.
Regards,
Shlomi Fish
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.
#
# docbook50.conf
#
# Asciidoc DocBook 5.0 configuration file.
#
# NOTE: This file is incomplete and broken.
#
include::docbook45.conf[]
# Override DocBook 4.5 markup.
# Inline macros
# ulink renamed to link in DocBook5.
[http-inlinemacro]
<link url="{name}:{target}">{0={name}:{target}}</link>
[https-inlinemacro]
<link url="{name}:{target}">{0={name}:{target}}</link>
[ftp-inlinemacro]
<link url="{name}:{target}">{0={name}:{target}}</link>
[file-inlinemacro]
<link url="{name}:{target}">{0={name}:{target}}</link>
[irc-inlinemacro]
<link url="{name}:{target}">{0={name}:{target}}</link>
[mailto-inlinemacro]
<link url="mailto:{target}">{0={target}}</link>
[callto-inlinemacro]
<link url="{name}:{target}">{0={target}}</link>
[link-inlinemacro]
<link url="{target}">{0={target}}</link>
[header-declarations]
<?xml version="1.0" encoding="{encoding}"?>
{toc#}<?asciidoc-toc?>
{numbered#}<?asciidoc-numbered?>
<{doctype-article?article}{doctype-book?book}{doctype-manpage?refentry}
xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="{lang=en}">
<info>
template::[docinfo]
</info>
[docinfo]
{notitle%} <title>{doctitle}</title>
<date>{revdate}</date>
# To ensure valid articleinfo/bookinfo when there is no AsciiDoc header.
{doctitle%}{revdate%}<date>{docdate}</date>
{authored#}<author>
{firstname,lastname,surname#} <personname>
<firstname>{firstname}</firstname>
<othername>{middlename}</othername>
<surname>{lastname}</surname>
{firstname,lastname,surname#} </personname>
<email>{email}</email>
{authored#}</author>
<authorinitials>{authorinitials}</authorinitials>
<revhistory><revision>{revnumber?<revnumber>{revnumber}</revnumber>}<date>{revdate}</date>{authorinitials?<authorinitials>{authorinitials}</authorinitials>}{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
{docinfo#}{include:{docdir}/docinfo.xml}
{docinfo#}{include:{docdir}/{docname}-docinfo.xml}
<orgname>{orgname}</orgname>
#-------------------------
# article document type
#-------------------------
ifdef::doctype-article[]
[header]
template::[header-declarations]
endif::doctype-article[]
#-------------------------
# book document type
#-------------------------
ifdef::doctype-book[]
[header]
template::[header-declarations]
endif::doctype-book[]
#-------------------------
# manpage document type
#-------------------------
ifdef::doctype-manpage[]
[header]
template::[header-declarations]
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
# Default source and manual to suppress DocBook XSL warnings.
<refmiscinfo class="source">{mansource= }</refmiscinfo>
<refmiscinfo class="manual">{manmanual= }</refmiscinfo>
<refmiscinfo class="version">{manversion={revnumber}}</refmiscinfo>
</refmeta>
<refnamediv>
<refname>{manname1}</refname>
<refname>{manname2}</refname>
<refname>{manname3}</refname>
<refname>{manname4}</refname>
<refname>{manname5}</refname>
<refname>{manname6}</refname>
<refname>{manname7}</refname>
<refname>{manname8}</refname>
<refname>{manname9}</refname>
<refpurpose>{manpurpose}</refpurpose>
</refnamediv>
endif::doctype-manpage[]