Single canonical document format?
-
I'm looking for a way to publish some data. I would the like the document to be available online as HTML, and as a downloadable PDF (and potentially as a MS word doc/docx too, although that's secondary). The document is of some pretty structured data. Rather than maintaining multiple versions of the data I would like a single master version, and all the presentation formats to be auto generated on request. I don't really mind what the master format is, and I'm happy to do custom transforms/css as necessary for each format. I was thinking about some kind of XML master, with an XSLT to transform it to XHTML, but I can't think of anything to handle the PDF (apart from possibly some custom code with iText). Does LaTeX support this kind of thing? Any ideas on what I should start by looking at?
Simon
modified on Thursday, January 27, 2011 6:09 AM
-
I'm looking for a way to publish some data. I would the like the document to be available online as HTML, and as a downloadable PDF (and potentially as a MS word doc/docx too, although that's secondary). The document is of some pretty structured data. Rather than maintaining multiple versions of the data I would like a single master version, and all the presentation formats to be auto generated on request. I don't really mind what the master format is, and I'm happy to do custom transforms/css as necessary for each format. I was thinking about some kind of XML master, with an XSLT to transform it to XHTML, but I can't think of anything to handle the PDF (apart from possibly some custom code with iText). Does LaTeX support this kind of thing? Any ideas on what I should start by looking at?
Simon
modified on Thursday, January 27, 2011 6:09 AM
Simon P Stevens wrote:
Does LaTex support this kind of thing?
Latex is a pretty flimsy fabric, and shouldn't be used for load-bearing surfaces. It can barely support various vaccu-loc appendages, even when they're spaced at reasonable distances. I know what I'm talking about because my attempt at entering the sexual aid market with the Latex Appendage Suit (tm) required a lot more engineering than you'd expect.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
I'm looking for a way to publish some data. I would the like the document to be available online as HTML, and as a downloadable PDF (and potentially as a MS word doc/docx too, although that's secondary). The document is of some pretty structured data. Rather than maintaining multiple versions of the data I would like a single master version, and all the presentation formats to be auto generated on request. I don't really mind what the master format is, and I'm happy to do custom transforms/css as necessary for each format. I was thinking about some kind of XML master, with an XSLT to transform it to XHTML, but I can't think of anything to handle the PDF (apart from possibly some custom code with iText). Does LaTeX support this kind of thing? Any ideas on what I should start by looking at?
Simon
modified on Thursday, January 27, 2011 6:09 AM
I print out data to a HP 2200 PS driver, and write to file producing a .ps file (postscript) from that I use a Ghostscript DLL to covert from .ps to a .pdf works like a charm. I have my own reporting engine which can produce a variety of outputs (excel, word, html, pdf, fax, matrix printers, laser printers) etc, etc.
-
Simon P Stevens wrote:
Does LaTex support this kind of thing?
Latex is a pretty flimsy fabric, and shouldn't be used for load-bearing surfaces. It can barely support various vaccu-loc appendages, even when they're spaced at reasonable distances. I know what I'm talking about because my attempt at entering the sexual aid market with the Latex Appendage Suit (tm) required a lot more engineering than you'd expect.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997Obviously, I would only be using the latex as a transmission medium, not a load bearing surface.
Simon
-
I'm looking for a way to publish some data. I would the like the document to be available online as HTML, and as a downloadable PDF (and potentially as a MS word doc/docx too, although that's secondary). The document is of some pretty structured data. Rather than maintaining multiple versions of the data I would like a single master version, and all the presentation formats to be auto generated on request. I don't really mind what the master format is, and I'm happy to do custom transforms/css as necessary for each format. I was thinking about some kind of XML master, with an XSLT to transform it to XHTML, but I can't think of anything to handle the PDF (apart from possibly some custom code with iText). Does LaTeX support this kind of thing? Any ideas on what I should start by looking at?
Simon
modified on Thursday, January 27, 2011 6:09 AM
There are tools that does this. One is from the Apache Foundation (can't recall name now, even got a .NET port). It basically uses XSLT throughout. I would side-step Latex here. The aforementioned tool can also generate PostScript files if needed.
-
I print out data to a HP 2200 PS driver, and write to file producing a .ps file (postscript) from that I use a Ghostscript DLL to covert from .ps to a .pdf works like a charm. I have my own reporting engine which can produce a variety of outputs (excel, word, html, pdf, fax, matrix printers, laser printers) etc, etc.
Interesting. I hadn't thought of going via postscript. That could be worth an investigation. Thanks.
Simon
-
There are tools that does this. One is from the Apache Foundation (can't recall name now, even got a .NET port). It basically uses XSLT throughout. I would side-step Latex here. The aforementioned tool can also generate PostScript files if needed.
could you be talking about Cocoon[^]? This looks like exactly what I was after. Thank you very much. [Seems to be based on a library called FOP (Formatting Objects Processor)[^].]
Simon
-
Interesting. I hadn't thought of going via postscript. That could be worth an investigation. Thanks.
Simon
string[] sArgs = { "gs", "-dNOPAUSE", "-dBATCH", "-dSafer", "-r600", "-sPAPERSIZE=A4", "-sDEVICE=pdfwrite", "-sOutputFile=" + trg, "-c", ".setpdfwrite", "-f", src }; Where src is the filename of your .ps file and trg is the filename of your .pdf file.
-
could you be talking about Cocoon[^]? This looks like exactly what I was after. Thank you very much. [Seems to be based on a library called FOP (Formatting Objects Processor)[^].]
Simon
Simon P Stevens wrote:
FOP (Formatting Objects Processor)
That's it :)
-
I'm looking for a way to publish some data. I would the like the document to be available online as HTML, and as a downloadable PDF (and potentially as a MS word doc/docx too, although that's secondary). The document is of some pretty structured data. Rather than maintaining multiple versions of the data I would like a single master version, and all the presentation formats to be auto generated on request. I don't really mind what the master format is, and I'm happy to do custom transforms/css as necessary for each format. I was thinking about some kind of XML master, with an XSLT to transform it to XHTML, but I can't think of anything to handle the PDF (apart from possibly some custom code with iText). Does LaTeX support this kind of thing? Any ideas on what I should start by looking at?
Simon
modified on Thursday, January 27, 2011 6:09 AM
Have a look at DocBook[^]. There are free authoring tools[^] and conversion tools[^] for PDF, HTML, RTF, CHM and other common formats.
-
Have a look at DocBook[^]. There are free authoring tools[^] and conversion tools[^] for PDF, HTML, RTF, CHM and other common formats.
Thanks, I will.
Simon
-
I'm looking for a way to publish some data. I would the like the document to be available online as HTML, and as a downloadable PDF (and potentially as a MS word doc/docx too, although that's secondary). The document is of some pretty structured data. Rather than maintaining multiple versions of the data I would like a single master version, and all the presentation formats to be auto generated on request. I don't really mind what the master format is, and I'm happy to do custom transforms/css as necessary for each format. I was thinking about some kind of XML master, with an XSLT to transform it to XHTML, but I can't think of anything to handle the PDF (apart from possibly some custom code with iText). Does LaTeX support this kind of thing? Any ideas on what I should start by looking at?
Simon
modified on Thursday, January 27, 2011 6:09 AM
I agree with the basic premise of XML and XSLT; that's what I do, but so far my XSLT only produces HTML and CSV. I have seen a Perl script that converts text to PDF, studying such a thing should give hints on how to write XSLT to produce PDF.
-
Have a look at DocBook[^]. There are free authoring tools[^] and conversion tools[^] for PDF, HTML, RTF, CHM and other common formats.
markkuk wrote:
Have a look at DocBook[^].
For cross-publishing a single document? It's a tremendous amount of overhead, most of which will be of absolutely no benefit whatsoever (unless it's a car-repair manual for 30 models of the same car, each with several hundred little differences). You'll spend all your time fiddling with the typical open-source-style pissballing around with the infrastructure of the document, and have no time left to make sure that the content is as good as it can be. I'd strongly recommend against even looking into it, in case you get snagged by all the enthusiastic open-source ballshot about how it's the only way to produce documents.
I wanna be a eunuchs developer! Pass me a bread knife!
-
I'm looking for a way to publish some data. I would the like the document to be available online as HTML, and as a downloadable PDF (and potentially as a MS word doc/docx too, although that's secondary). The document is of some pretty structured data. Rather than maintaining multiple versions of the data I would like a single master version, and all the presentation formats to be auto generated on request. I don't really mind what the master format is, and I'm happy to do custom transforms/css as necessary for each format. I was thinking about some kind of XML master, with an XSLT to transform it to XHTML, but I can't think of anything to handle the PDF (apart from possibly some custom code with iText). Does LaTeX support this kind of thing? Any ideas on what I should start by looking at?
Simon
modified on Thursday, January 27, 2011 6:09 AM
If you didn't want Word docs, I'd say use FrameMaker. Since you do, and assuming that you don't want to use Word itself, just use Libre Office. They have plenty of add-on tools, everything is already in XML, and you'll be able to focus your time almost entirely on the content of the document. Beware of open source documentation tools; they're made for devs to play with (which is pretty much what you'd expect), and are terrible for actually producing documents.
I wanna be a eunuchs developer! Pass me a bread knife!
-
If you didn't want Word docs, I'd say use FrameMaker. Since you do, and assuming that you don't want to use Word itself, just use Libre Office. They have plenty of add-on tools, everything is already in XML, and you'll be able to focus your time almost entirely on the content of the document. Beware of open source documentation tools; they're made for devs to play with (which is pretty much what you'd expect), and are terrible for actually producing documents.
I wanna be a eunuchs developer! Pass me a bread knife!
I can live without word docs.
Mark Wallace wrote:
FrameMaker
While I'm not generally averse to paying for software £952.80 is just a touch over my budget for personal projects. I'll look into the LibreOffice options though. Thanks.
Simon