groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Troff to XML


From: brian m. carlson
Subject: Re: [Groff] Troff to XML
Date: Thu, 21 Feb 2008 20:39:39 +0000
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Wed, Feb 20, 2008 at 10:07:16PM +0100, Pieter Verberne wrote:
Could it be an option (or; is it possible) to make a Troff macro wich
-is- convertable to XML. Or in other words: Is it possible to create a
Troff macro wich is 'syntactic sugar'/'alternative syntax' for XML?

Before I got swamped with this semester's workload, I was working on a project called thwack: http://crustytoothpaste.ath.cx/~bmc/code/thwack . It reads and processes troff input and is built on top of a SAX 2 framework, so that everything can be autoconverted to XML.

Included is a basic set of the -me macros that produces DocBook output, and you can create arbitrary XML with the "namespace", "start", and "end" requests. However, note that thwack is not complete; it may work for you, but it isn't yet bug-for-bug compatible with any version of troff. In fact, many of the presentational requests are not yet implemented (although I have plans) because at the moment, there is no framework for laying out text.

It requires Qt 4 for Unicode and XML support, and patches are gratefully accepted. Some things may not work, so you should expect to send patches or at least file bug reports.

I don't know if this is exactly what you are looking for, but it can probably be manipulated into doing what you want.

HTH.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]