PDF version of D manuals

Lars Ivar Igesund larsivar at igesund.net
Thu Nov 30 02:00:38 PST 2006


Jari-Matti Mäkelä wrote:

> Lars Ivar Igesund wrote:
>> Lars Ivar Igesund wrote:
>>> Walter Bright wrote:
>>>> (The html version of the manual is currently created automatically
>>>> using a script from Ddoc text files. Such has really cut the workload
>>>> of maintaining a common look/feel of the site.)
>>> htmldoc should be able to do what you want. If started without any
>>> arguments, it pops up a gui, but it should be no problem to script it.
>>>
>>> http://www.htmldoc.org
>>>
>>> It should be easily available for your Linux distribution, seems to be
>>> more troublesome to find a free Windows download.
>> 
>> A solution that would be more troublesome to implement at first, but that
>> would be more powerful later (and for the D community at large), is to
>> make it possible for DDoc to output DocBook XML (see
>> http://www.docbook.org ), which through some careful transformations can
>> be transformed to any format you like (for X/HTML, just XSL
>> transformations are necessary, using XSL transformations + a XSL-FO
>> processor like FOP (http://xmlgraphics.apache.org/fop), almost any format
>> can be produced, including PDF), and all from the same XML sources.
> 
> I've used DDoc + some xml generation rules found in this ng a year or
> two ago for small projects. Then converted the xml to pdf using FOP. I
> think the weakest link is the DDoc implementation. It does not always
> generate valid and/or well-formed xml so I have made ad hoc filtering
> rules for the "xml"-like output. Also the FOP generates separate pdf
> files for every source file. I've just put them together with pdftk.

Since the DocBook documents can import others, and you can pass only the
main one to FOP, it should be possible to create partial DocBook documents,
for instance chapters, and import those in the main document. For larger
documents, it almost always is smart to divide into several XML files in
any case.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi



More information about the Digitalmars-d-announce mailing list