Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jan 2006 14:33:42 +0000
From:      doc@darklogik.org
To:        freebsd-doc@freebsd.org
Subject:   single source publishing?
Message-ID:  <20060116143342.GB65645@logik.internal.network>

next in thread | raw e-mail | index | archive | help

--s2ZSL+KKDSLx8OML
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello.

I realise that this is slightly off topic, but I reasoned that
this would be the most appropriate place to write to as there's
likely to be a large number of documentation writers here and I
am working almost exclusively on FreeBSD.

Is it really possible to do high quality single source publishing
on FreeBSD with only one degree of seperation? By one degree I
mean that the different file formats are generated in one step
=66rom the source file - not, for example, converting to HTML with
one filter and then to PDF from that HTML source.

Ideally I would like to write LaTeX or XML and produce -

- XHTML
- UTF-8 text
- Postscript
- PDF
- DVI

Of all the options that I have seen, Docbook or LaTeX-docbook
seem to make the most sense. The problems I am facing are:

1) The XML toolchain seems to be somewhat lacking on FreeBSD. I
do not want to use a Java-based or commercial tool. Having looked
around at the available options and having tried a few test
documents, it appears that I can generate XHTML from XML Docbook
and little else. I can't even generate UTF-8 text as 'links' (the
browser) doesn't seem to support UTF-8 and this appears to be the
only way convert HTML to text whilst retaining page layout. The
only existing C based tool to produce XML-FO for Postscript
(xmlroff) is extremly unstable and crash-prone (I've not managed
to get a single piece of output from it).  I've heard that
passivetex can do XML->PS/PDF but apparently it's ancient and
unmaintained, these days.

2) I can generate PDF, Postscript and DVI from LaTeX but only
plain (non-XML) HTML. I would then have to run the HTML through a
tool such as 'tidy' and even then, the output would have to be hand
edited in order to allow custom styling via CSS.
Of course, there's still the problem with UTF-8 text and links
unless TeX can do nice typesetting in plaintext too?

I have tried to put together a few shell scripts in order to try
out some long conversions, eg XML->XHTML->PS->PDF but the output
is, frankly, ugly and uncontrollable due to so many degrees of
seperation.

My current options appear to be:

  Docbook XML -> XHTML -> Postscript (html2ps) -> PDF (ugly)

The above creates a sorry excuse for a PDF copy (effectively the
page breaks are wrong as it's done by length of output as opposed
to explicit breaks).

Alternatively:

  LaTeX -> Postscript
        -> DVI
        -> PDF
        -> HTML -> XHTML (via tidy)

The XHTML output in this case is quite poor and not really
properly styleable[1] with CSS.

As far as I can see, there's no way to produce good quality,
predictable output in the current formats. I'm more than a little
surprised by this as XML in particular is always touted as being
a wonderful structural format that permits easy conversion to any
format.

To be honest, I could probably tolerate something like this:

  Docbook XML -> XHTML
              -> LaTex -> PS
                       -> PDF
                       -> DVI

Does anybody have a solution, perhaps that they use regularly?
Or, do I have to get out my toolbox and spend the next ten years
in total isolation?

(please CC as I'm not subscribed)

cheers,
M

--

[1] pretend this is a real word please...

--=20
pgp: http://www.darklogik.org/pub/pgp/pgp.txt
0160 A46A 9A48 D3B0 C92F B690 17FB 4B72 0207 ED43

--s2ZSL+KKDSLx8OML
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iQIVAwUBQ8uuxRf7S3ICB+1DAQoigA/7BNqTdwO5LPsICOjqwAIJ/5nHPqQMY25H
1P9IBQGuz4O7kXcQICXbBFB8kS+T6UupvTKYkJuPOwjsy/jul9Cd8h4sHxYLSy6X
j6Q1FPEj1g03vDTW+iC95gsMFM05JNqmCFGH59/lQeDpMTKRr0Rtqx9+OlJUDT6t
wy4UDBfbkhl47niKDStShfgBSyCXP7+vB3UQGeLZfwMEgLpHENLjYtKJKU+zDvWF
4F1BaTzBQdahf30fc5nWFxhm/R3lD5bBtt3ThT9Ey/aG/+ZefPJryECA5o46vgPI
BOeO3e8FMTiizUY9RQZthbFrj4tcO10fZZpIzaVcGCOYvlrL8uf4uwetYM2QCkDX
fSk0GHyalcWaPcx/OdbzT01nBPSl0EuZNkXcHDIyi9ICjeawHXQw1Zjc6wNgxSzg
PZpZpgCvpb3IA2djT8S9qJJgVbIYAXPfrB6nKT4J+y6OLjWBc0lGShg/P+cJHO4S
3ctPZNDkZ7s5NFlXXR3W6VigjMZ3hF2H3NS//GSmYljdZ6dcTQnn0duWqABA9Sm+
3q4orW8rORM3Cmv4kTzAcrl0qJoTXHxrv09qQKihIhzmHOCjOaNnjhg2FXj2TTas
T9jIbrelIuHbg7Iq99ghz3bSr8CFH326Q3MB2FJ7FUdPAoSOg8ng4ThmR2PANmhr
W/d4QSIwq7w=
=0Ro+
-----END PGP SIGNATURE-----

--s2ZSL+KKDSLx8OML--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060116143342.GB65645>