Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Books Media Software

Tools for Publishing in Multiple Formats? 63

Truist asks: "What are the best tools (windows or *nix) to use to publish a single source document in multiple formats, specifically plain text, multi-page HTML, and PDF? I'm trying to publish a (60-page+) NetBSD installation guide/documentary online, and I want plain text for easy download and 'less'-ability, HTML for easy browsing and search engine indexing, and PDF or Postscript for easy printing. It's currently a Word document (I know, I know - I'm happy to manually convert it to something else) with multiple styles, including regular text, lists, internal links, external (web url) links, code, and notes, and I'd like to preserve as much as possible of each in the final output. Some additional notes: there are no graphics, and I expect to update this document periodically, or to split it into parts and maintain the parts (think master document / subdocuments). It won't be updated too often, but if re-publishing could be scriptable, that would be fantastic."
This discussion has been archived. No new comments can be posted.

Tools for Publishing in Multiple Formats?

Comments Filter:
  • Docbook.org

    Since most of the docs are out of date and talk about stupid and near-impossible to configure tools, I also mention xlmto to do the actual conversion.

    • DocBook SUCKS. However, it's probably the best thing out there for the job.

      The problem with DocBook might also be considered its strength - basically it was designed by a committee, and evolved several humps. Each influential party behind it pushed the features that they wanted to see into it. Each individual feature set is a pretty good coherent package which will let you create documents just like [insert-project-name-here]'s own documentation - pretty neat! However, the different feature sets clash _hor
      • There is a push for a docbook lite (or whatever) version.

        But as for it being a comprimise beteween different output formats... Well, ya. Thats kinda the whole point.

        And its not Docbook that sucks, its all the old documentation for it that points users to stupid, hard to configure, to down right broken and non-functional tool chain. The near volumes of (shitty) instructions on DSSLCrap this, XSLTblargh that, SGMLSuperKalaFragalisticBroken other thing can all be summerized with:

        xmlto.. If you dont have xml

        • """
          But as for it being a comprimise beteween different output formats... Well, ya. Thats kinda the whole point.
          """

          You misunderstand - I mean it's a hotch-potch of different styles, and half of the list types clash with half of the other tags as they were injected into the standard by some big OS project that wanted lists just so. Someone else wanted a family of admonitions, and they have a different look to them. Someone else wanted to have BNF grammers just-so, and that style clashes with the other text.
          A
  • Docbook.. (again) (Score:4, Informative)

    by camilita ( 694206 ) on Friday November 14, 2003 @08:06PM (#7478118)

    I have seen a variation of this question at least two times posted here. The unanymous answer is usually docbook and in this case is more relevennt, since the document is technical in nature.

    good pick is DocBook: The Definitive Guide [amazon.com] written by Norma Walsh (who chairs the Oasis DocBook Technical Committee) and published by O'Reilly that. Of course the book is also available in HTML, PDF and plain text [docbook.org].

    • What about when you want to apply your own styles, layout, or formatting to the output? I've always found that rather tricky in docbook. Do you have any recommendations for where to start? (I've been using the simple docbook2pdf and docbook2html)
      • Re:Docbook.. (again) (Score:3, Informative)

        by T-Ranger ( 10520 )
        Docbook defines a standard for a document markup language.

        The XML style sheets (XSLT) that invarrably happen to come with 'a docbook distribution' are not a component of that standard. Your free to change them at will.

        How you do that, I haven clue 1 beyond 'edit the .xsl' Im sure ORA has a book or 10 on the subject.

      • Re:Docbook.. (again) (Score:3, Informative)

        by __past__ ( 542467 )
        Read DocBook XSL: The Complete Guide [sagehill.net], a pretty good (and free, unless you want dead trees) book on how to use and customize the DocBook XSL stylesheets for web and print. Knowing both DocBook and a little XSLT before you start doesn't harm, though.
  • Latex? (Score:3, Informative)

    by conantoniou ( 144747 ) on Friday November 14, 2003 @08:07PM (#7478122)
    Come on... this has to be a planted question ;)
  • You're in luck! (Score:3, Informative)

    by Dr. Photo ( 640363 ) on Friday November 14, 2003 @08:08PM (#7478128) Journal
    TeXinfo [gnu.org]

    texi2html [cvshome.org]
  • Docbook+FOP (Score:3, Informative)

    by notfancy ( 113542 ) <matias@k-BALDWINbell.com minus author> on Friday November 14, 2003 @08:12PM (#7478160) Homepage

    The subject says it all. Apparently, it's the standards-based, open-source-conforming way to do it. I've heard paeans sung to FOP [apache.org] but I haven't used it, yet.

  • by Anonymous Coward
    One knows how to convert to PDF, another one knows where the Save As document is in Word, the third one can tell him that you can also save in RTF from Word, the fourth one to save to OpenOffice, and fifth one to convert it to HTML. Sorry, no DocBook, Senior Consultants are not familiar yet with this just-announced technology, and MS Word apparently doesn't support it.
  • OpenOffice? (Score:3, Interesting)

    by HolyCoitus ( 658601 ) on Friday November 14, 2003 @08:17PM (#7478188)
    Open Office can save to all of those formats. It isn't scriptable, but all those outputs are done easily enough. Has that been taken into consideration or am I off base on what you are looking for?
    • OO and scripts: (Score:3, Informative)

      It's highly likely that OO is scriptable [openoffice.org].
      • Oh, wow... I was never even aware that stuff existed... OpenOffice keeps on surprising me with all the power that it has along with all the refinement. It feels like OpenOffice has passed Microsoft office in some ways, which is saying a lot. I guess I should check before I speak next time, and that OpenOffice can do exactly what he is looking for.
    • I've been impressed by Openoffice. Even though it's slow and resource-hungry, here are some of OpenOffice's abilities that may apply here:
      1. Ability to save as non-cluttered HTML or XML
      2. Ability to publish to PDF
      3. Scriptability - to automate everything
      4. Ease of document maintenance (see the two caveats below)

      The other solutions presented so far suffer w.r.t # 4 - document maintenance. After all, if someone created their document in a visually rich editor like Word, it was probably because of ease of use an

      • There is a project in Canberra Austrlia that uses a variation of the XML format to do the archiving. The OpenOffice.org file is a zipped file with xml files within it, there is a flat version of the xml file that can be used specifically for archiving. I don't know specifics but this will work with CVS. you might want to ask for more information on users@openoffice.org

        The XML format for MS Word is not very useful because it is highly restricted who is going to be able to use it, it will cost too much m
    • OpenOffice is scriptable and there are web backends being produced using OpenOffice.org that convert documents on the fly. LOok up the mailing lists for more information.
  • But
    Aside from the scriptable part, InDesign seems to be able to do all that you are asking for.

    My portfolio is held in an InDesign document, which i have routinely saved out to HTML, PDF, printed etc.
    It supports basic HTML code, CSS, and all the links you could want. It carries the links into the PDF as well if that is what you chose in your output.

    Just don't expect anything fancy from your HTML, but if it is only text then no problem.

    Also, i am pretty sure it imports word docs, but i am not sure as

    • Oh, also I believe Quark 5 and 6 will do it as well, but from all i have used it, it's PDF output is crap.
    • InDesign will export tagged XML, PDF(very easily), HTML, etc. Additionally, if you are running on a mac, it is very scriptable using AppleScript. It has a large detailed scripting manual available online at adobe developer site. And yes, it imports word docs including styles, tables, etc.
  • by baka_boy ( 171146 ) <<lennon> <at> <day-reynolds.com>> on Friday November 14, 2003 @08:25PM (#7478258) Homepage
    I actually worked on a ~500pg. documentation project with a couple of other developers a couple of years back, and after about six months of debate, they finally agreed to let me recode the thing from TeX to DocBook XML.

    The conversion was a PITA, but once that was finished, we had about 40 source XML files which were independently version-controlled, some minor customizations to the standard DocBook XSLT stylesheets, and slick, easily-updated HTML, plain text, and PDF versions of the document being produced straight out of CVS by a cron job.

    A nice benefit of the conversion was that we were actually able to add another few hundred pages of documentation that was automatically generated from grammar definitions and source code to the batch build, and they could be integrated into the style and distribution methods we worked out for the hand-generated docs.
  • by MBCook ( 132727 )
    Isn't this what XML is for, among other things? Write it in some format then convert it to XML (or use OpenOffice.org, which already IS XML). Then you just use a XSLT or some program you (or someone else) writes to convert the XML into as many different formats as you chooose.

    Might not be easy to set up at first, but it should work fantastically.

    • xml would be a perfect example of a database to display method like how i mentioned. it would take a while to set it up though. i suppose the author wrote themself into a corner anyway by just writing it all out raw in word.
    • XML is to Docbook as SGML is to HTML. You wouldn't write web pages in SGML, so why write documentation in XML?

      If you were to write your documentation in XML, then you would need to define a meaningful DTD/schema and all the tools that go with it to make it useful.

      But why bother when someone's already done the hard work for you? eg. Docbook [docbook.org].

  • Lyx (Score:3, Interesting)

    by jmt9581 ( 554192 ) on Friday November 14, 2003 @09:18PM (#7478632) Homepage
    Lyx [lyx.org] is how I do what you're talking about. It's a WYSIWYM (What You See Is What You Mean) document processor, and it's great. I use it to write term papers, HOWTO documents, and lots of other stuff. You can export your document to many different formats, including HTML, PDF, plain text and Postscript. You should try it out, I really like it.
    • Right. I use LyX a lot. It's very nice. But one thing to remember, LyX currently is really only good at generating LaTeX code.

      You can use LyX without ever knowing anything about latex, but for conversion, you've got to deal with a few issues.

      PDF output is nice. Postscript/PDF format is what latex is all about. But, HTML output via latex2html isn't very great. It's functional (for the most part), but is a pain to customize, and in my opinion, not professional enough.

      LyX does have some nice features, and I
  • I like tex (Score:5, Informative)

    by jrstewart ( 46866 ) on Friday November 14, 2003 @09:24PM (#7478667) Homepage
    Specifically latex, and more specifically pdflatex for pdf output and tex2page [neu.edu] for html. With some hacking you should be able to script tex2page into outputting text as well.

    To some extent the texinfo folks have solved this problem as well. The DocBook stuff mentioned elsewhere might be very nice but I have no experience with that.
  • by FFFish ( 7567 ) on Friday November 14, 2003 @09:34PM (#7478723) Homepage
    I am currently publishing several several-hundred-page technical manuals using the following workflow:

    All documentation is edited using an ordinary plaintext editor.

    The documents are marked-up using ReStructured Text conventions. [sourceforge.net] This has satisfied 99% of my needs. I've decided the convenience of ReST outweighs the need for the remaining 1% of the frills I want.

    I use CVS [cvshome.org] for revision control. There may be an RCS involved in the backend; I don't operate the server that hosts my repository.

    The ReST documents are converted to XML using DocUtils [sourceforge.net]. The project coordinator, by the way, has proven himself a superlative programmer. DocUtils rocks, and will also transform ReST to HTML or Latex.

    The XML is converted using XSL templates that I've created. Saxon [sourceforge.net] then transforms the DocUtils XML to XML:FO, and FOP [apache.org] transforms that into PDF.

    Pretty fucking spiffy, if I do say so myself.

    I also currently use HT2HTML [sf.net] to transform ReST to HTML. I use it in preference to DocUtil's native HTML transformation because it allows me to do a few nice tricks. In the future I plan to migrate entirely to another set of custom XSL tranformations.

    This system has proven extremely productive. At any time I could pop a few bucks for a commercial XSL:FO->PDF engine and stomp the few gripes I've had with FOP (my number one issue is lack of keep-with-next functionality; however, FOP is under a complete refactoring, and will emerge with full functionality). Saxon has been superb, DocUtils has been wonderful (and I've been able to contribute to the overall design), and ReST is quite pleasant to read and write.

    Overall, I highly recommend this workflow.

    Your source material becomes extremely reusable, eminently accessible, and free from commercial encumberances.

    (footnote: if you do go this route, please don't flood the DocUtils developers with suggestions and ideas. Work out your idea in detail, consult the developers' mailing list archives, and make full consideration of side-effects. Only then suggest it. They've been at this so long, and had so many discussions, that they've become a little short of patience with loud-mouthed newbies. I suspect most popular open-source projects get that way...)
    • Are you using images with Fop?

      How's that going for you?

      We've had no luck, and Apache's image examples are currently broken, which is not giving me a good feeling...
      • I am using illustrations. My ReST text defines image classes for both PDF and HTML output, and the XSL selects the appropriate-resolution PNG and sizes it accordingly. For PDF I use 600dpi images; for HTML 72dpi.

        It has been necessary to significantly increase the memory allocations for FOP. The current command is

        (WinXP) java -Xms64m -Xmx256m -Xss64m -cp "%LOCALCLASSPATH%" org.apache.fop.apps.Fop -c "%LOCAL_FOP_HOME%conf\userconfig.xml" %1 %2 %3

        (Bash) "$JAVACMD" -Xms64m -Xmx256m -Xss64m -classpath "$L
  • http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/f dp-primer/index.html
  • Docbook.

    Docbook is a flexible, configurable, way to do just what you're asking. You can change output formats - produce PDF or RTF or HTML or Latex or text. You can parameterize it, and script it pretty easily. There are already Docbook to filters available and you can adapt them to other uses with a bit of poking around.

  • texinfo 0wns docbook (Score:5, Interesting)

    by hubertf ( 124995 ) on Friday November 14, 2003 @10:35PM (#7479091) Homepage Journal
    I've written some extensive docs in texinfo and moved it rather easily to pdf, html and plain text.

    I've tried doing the same for docbook and it plain sucked. While the DocBook format itself is nice, the tools for transforming are too complex (for me?), esp. if you want to customize conversion to HTML or PDF. This definitely goes for DocBook/SGML, and by what I've seen so far DocBook/XML too to some extend.

    Thus I'd rather say "texinfo", at least unless someone comes up with a foolproofed suite of tools for DocBook->PDF+HTML.

    My $0.02.

    - Hubert
    • by neves ( 324086 )
      Red Hat linux comes with a simple set of tools: docbook2pdf, docbook2html, docbook2rtf to help converting from docbook to other formats. It's a lot easier than directly using jade et al.
    • I couldn't agree more. Docbook is pretty slick, but turning your Docbook source into a useable format is ridiculously hard. And what's more, chances are fairly good that when you are done it won't look good. PostgreSQL, to cite an example, actually dumps their Docbook to RTF and then edits it in RTF before creating their Postscipt and PDF files. What's more, despite the fact that they released 7.4 yesterday they don't have 7.4 documentation ready to go because they can't get the docs to build.

      Texinfo,

  • use latex.

    after creating your document in latex, you can use a simple makefile to create all your formats.

  • xml (Score:2, Interesting)

    I've seen some posts here on XML, but most seem misleading. I've found that the most expressive and most flexible format is manual XML -- as in, your own dialect.

    That is, you define your own tags, and define what they mean. Then you create stylesheets to convert them to other things. Because the original XML contains your intention, not the eventual formatting, it makes it easy to convert, or to make broad, sweeping changes to presentation (as presentation is detached from content).

    The simplest examp

    • I think we need a solution that is workable with an editor that's designed for writing formatted text. There are just too many benefits to a proper editor (various tools, shortcuts, but especially simplicity of presentation).

      Say you're writing a bulleted list with 100 items. In pure XML that's a minimum of 2 tags per item, plus tage for the list. Now put the first word of each item in bold and the rest of the line in italics. This is pretty basic formatting... but you'll have to edit that list while wad
      • OpenOffice. Really. (Score:2, Interesting)

        by jonadab ( 583620 )
        If you write your own major mode for Emacs, all these issues just go away.

        However, if you are lacking lisp-fu and absolutely must have a GUI-based
        WYSIWYG editor, OpenOffice may be a possible solution. You'll have to avoid
        workflows that result in creating styles with meaningless names. (For example,
        you can't just highlight some random text and start formatting it in various
        arbitrary ways. Instead, define your styles properly with names using the
        style catalog, and then apply your named styles to blocks of
      • The writer has already offered to manually convert it.

        What we really need are better tools for editing XML. For me, I'm fine already with my 100 wpm + typing speed and pretty XML color scheme for vim, making it very easy to read.

        Have you ever used CuteHTML? It's proprietary, stupid, and yet has one genius feature -- as you start to type an html tag, it provides a drop-down list of all tags it knows of to match yours. What we need is something like that which can match evolving XML code -- learn as yo

        • The writer has already offered to manually convert it.

          Sure, if he has to, he will. Any solution that doesn't require that work has at least one good thing going for it, though.

          And I agree that better XML editing tools would help the pure-XML solution, but there are serious limits to what's possible especially when you're using your own invented tag set. The tool can't check to see if your DDL is well-designed. It can't represent the tag data in any other way (like showing the bolded text instead of th
  • by foniksonik ( 573572 ) on Saturday November 15, 2003 @12:20AM (#7479564) Homepage Journal
    Too bad they are such a large investment just to publish. Applescript allows for doing very complicated workflows using multiple applications. You can even 'compile' it as a droplet for drag and drop functionality.

    If I was doing this on my Mac I would create a script to, in order: Save my Word file as Plaintext, Save it as HTML, Print it as PDF (OS X can print to PDF from any and all applications), use the ColorSync Utility to regenerate the PDFs with your desired compression settings, then use an HTML cleaner such as HTML Tidy to eliminate all the crappy MS HTML markup. With Applescript it's a point and click operation to create the script, just hit record and go through the motions described above, hit stop and save as a droplet. You can drag and drop any number of Word docs onto it when ever you need to 'publish'. You could add an FTP action or save to an iDisk as part of the workflow just as easily.

    The only thing you have to worry about is some of Word's [table] markup as it seriously blows when you try to convert to normal html.

    There are plenty of tools for XML/XSLT transforms that could be scripted as well but it could be overkill... or maybe not.

    If you had a Mac it would be easy.

  • plain roff (Score:2, Informative)

    by mzs ( 595629 )
    I use roff. It is a very simple document formater. The plus is that you automatically get unix style man pages for free. Use it with make to simplify your life as well.

    Here is a concrete example. I create a roff file rwlock.man as the source. Say I want a postscript doc, then I add the following to a Makefile.

    rwlock.ps : rwlock.man
    groff -man rwlock.man > rwlock.ps

    This uses GNU troff, on other systems you might use the troff included with your system and pipe through dpost.

    If I need a pdf fil

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...