Adam and Ingo, hello.

On 2014 Aug 16, at 22:20, Ingo Schwarze <schwa...@usta.de> wrote:

> Adam Thompson wrote on Sat, Aug 16, 2014 at 03:27:46PM -0500:
>> On 14-08-16 01:01 PM, Norman Gray wrote:
> 
>>> To do this, I took the HTML versions of the FAQ sections, and
>>> normalised them into regular XHTML (which makes them processable
>>> into other forms).  With that done, it was straightforward to
>>> transform the result into both HTML for presentation, and into LaTeX
>>> for further transformation into PDF.  This depends on the xsltproc
>>> package, and obviously on LaTeX.
>> [...]
>>> It would be pretty straightforward to generate a .txt FAQ from these
>>> same sources (via *roff).
> 
> Regarding the OP's mail, TL;DR (and too complicated).

OK:

  * I tidied up/normalised the existing HTML
  * ... so it was easy to transform it to consistent HTML for presentation, 
with generated ToC
  * ...and easy to generate a version intended for print

This was originally in the service of the suggestion that a printable version 
would be a thing that the project could potentially sell alongside CDs, to 
raise money.

>> I believe work on doclifter(1) and docbook2mdoc(1) is already in
>> consideration,
> 
> That would be me.

Docbook is a reasonable suggestion, and intended for this sort of thing, but 
it's a _big_ DTD, so rather a heavyweight solution, and would create a 
dependency on the external Docbook stylesheets.  The FAQ isn't structurally 
complicated enough to really warrant Docbook -- an HTML subset is the right 
tool for this job, and a couple of simple stylesheets do all the transformation 
that's required.

And it would require an upconversion step, as you point out.  Whereas the text 
already exists as HTML., and now as XHTML.

>> If not, I certainly don't think it's worth the time to
>> change it by hand.
> 
> Well no, some scripting support is certainly required unless
> you are *very* bored.  But that shouldn't be too hard to write.


Indeed, and I've just written that.

(This particular conversion was done by using TagSoup to convert the text to 
XML, and then some emacs regexp-replace to do the remaining tidyups.  Slightly 
tedious, but a one-time task.).

All the best,

Norman


-- 
Norman Gray  :  http://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK

Reply via email to