Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Books Graphics Media Software

Electronic Publishing Using Free Software? 41

Arkaein asks: "I am planning on electronically self publishing a book that I want to write, typeset, and create diagrams for on my Linux PC. Most of the diagrams for the book will be generated through scripted custom software, and I want the final product to be as compact as possible. I would like some advice from Slashdot on what Free Software tools I should use, with an emphasis on scripting efficiency. I am planning on using hyperlinked PDF for the final book format. To date I have used LateX for writing basic papers and have created vector images using Xfig and raster images edited using The GIMP. I used dvipdfm to convert my results into PDF. What I haven't done is create a hyperlinked PDF document, or generated xfig, postscript or any other vector image format through software, or worked on any document project of this magnitude before. I have thought about using raster images, my current software used for web content similar to what will go into the book creates raster images which I convert to PNG, this works well because the images are fairly simple diagrams with few colors and compress very well. I estimate that the 200 or so images I need for my book would require about 10K each as high-res PNGs for a total of 2 MB. This sounds acceptable, but would probably be smaller with higher image quality in vector format. Are LaTeX, Xfig and dvipdfm the answers, or do I need to look in other directions?"
This discussion has been archived. No new comments can be posted.

Electronic Publishing Using Free Software?

Comments Filter:
  • DocBook (Score:3, Interesting)

    by Doug Dante ( 22218 ) on Tuesday August 19, 2003 @06:58PM (#6738924)

    Docbook generates neat and professional HTML and PDF documents cross referenced as you require. It also does PostScript suitable for most professional printers.

    http://www.docbook.org/

    Like HTML, it supports embedding all media types, including images, videos, sounds, and Java Applets.
    • by Nice2Cats ( 557310 ) on Tuesday August 19, 2003 @07:26PM (#6739154)
      DocBook is seriously neat -- if you can get somebody else to do the job of getting it to the end format. Avoid this job at all costs, as it will drive you completely up the wall.

      The problem is that the people behind DocBook don't seem to want to have anything to do with the tool chain that takes the source file and turns it into something you can actually publish. This means that putting all the programs together to get DocBook XML to, say, PDF and then getting it looking the way you want can be a royal pain in the ass even if your distributor has included and configured the important stuff for you.

      Then, there are two types of DocBook - XML and SGML, so at any given time, you are bound to be looking at the wrong documentation for the wrong tool when trying to get to your target format. DocBook SGML is less of a problem, if you have a choice, use it. Getting from DocBook XML to anything but HTML/XHTML seems to still be rather non-trivial.

      Again, if you don't have to deal with any of that (for example, if you are submitting stuff to the Linux Documentation Project [tldp.org]) it is pretty neat. If the DocBook people had gone whole hog and provided a comprehensive tool set along with the standard, it would rock big time.

      As it is, I'd think twice before recommending it to somebody who just wants to get ink on paper.

      • I'd recommend DocBook/XML. It gives you flexibility -- you can translate to HTML, PDF, etc. Yes, dealing with translating to other formats can be a pain. But it's been done before. There are lots of projects using it, and they all have templates, scripts, and stylesheets: TLDP, KDE, GNOME, FreeBSD.

        For WYSIWYG editing, I recommend Morphon, which is now free (as in beer). You'll need to have a working Java VM.

        For PDF output, there's FOP. Again, you'll need a JVM.

        For structured graphics, I recommend SVG. Ho
        • For PDF output, there's FOP. Again, you'll need a JVM.

          For structured graphics, I recommend SVG. However, I'm not sure what tools are good for generating it. And I'm not sure if FOP can handle it.

          FOP can include SVG, via the Apache Batik [apache.org] renderer. I find FOP a bit lacking however, especially font handling seems to be a problem. Free alternatives include PassiveTeX [tei-c.org] (built upon TeX as the name suggests, so quite good-looking output, but a pig to install and lacking lots of formatting objects) and xmlroff [sourceforge.net] (

    • And DocUtils (http://docutils.sourceforge.net/) makes Docbook even easier.

      I'm developing a DocUtils XML -> XSL:FO -> PDF set of stylesheets.
  • dvipdfm (Score:3, Informative)

    by Satai ( 111172 ) * on Tuesday August 19, 2003 @07:06PM (#6738998)
    dvipdfm is quite capable of generating most everything you could want in PDF; it can do hyperlinks and thumbnails and so on.

    the xfig format has several different vector-based software designers -- as in, there are several programs on CTAN that'll convert specially formatted commands into xfig format.

    my personal opinion is that you have everything you need with those three tools.
  • PDFLaTeX (Score:5, Informative)

    by tfinniga ( 555989 ) on Tuesday August 19, 2003 @07:10PM (#6739043)

    Look mom, I even got the funky capitalization right!

    I know a guy who had a good experience using PDFLaTeX [google.com] with pretty much the same method you are using. I think he did some of his figures as eps and others as png. PDFLaTeX allowed for the hyperlinks that the LaTeX -> ps -> pdf method won't get you. I found a pretty good summary here [math.rug.nl]. Might be good if you're already familiar with LaTeX.

    • I'm not sure if I have ever tried using pdflatex, though the fact that it's on my system makes me think I must have at some point. Is it better than dvipdfm? Can it easily handle both raster images (probably in PNG) and more importantly vector image formats (of which I've currently only used postscript/eps)? Finally, does it use nice fonts (can't remember at the moment which are Type 1 and which are Type 3)?

      I know I've tried using dvipdf and ps2pdf at one point but had problems with them. I can't remember
      • Re:PDFLaTeX (Score:5, Informative)

        by bcrowell ( 177657 ) on Wednesday August 20, 2003 @12:39AM (#6741105) Homepage
        I've used pdflatex for some open-source physics textbooks (1 [lightandmatter.com] 2 [lightandmatter.com] 3 [lightandmatter.com]). I get the impression that the tex->dvi->pdf route is more of a historical artifact, and in most cases it's just simpler and more efficient to do tex->pdf directly using pdflatex. If you use certain features that are specific to the latex implementation as opposed to pdftex, then you can't do pdftex, but that shouldn't be an issue for a new project like yours.

        ...does it use nice fonts (can't remember at the moment which are Type 1 and which are Type 3)?
        Pdftex automatically generates output that looks good in Acrobat Reader, whereas the tex->dvi->pdf method by default generates those horrible-looking bitmaps.

        Can it easily handle both raster images (probably in PNG) and more importantly vector image formats (of which I've currently only used postscript/eps)?
        Yes. It handles PNG just fine, but since you're concerned about size, you might want to convert those to JPG. For vector graphics, you just need to convert your EPS files to PDF, using the epstopdf script that comes with the latex distribution. Those PDFs then get embedded in the big PDF by pdftex.

        I can't remember if the specific problem was using embedded EPS images, which I see from the pdflatex website that pdflatex cannot handle
        Not an issue. Just convert to PDF.

        About your tight space requirements again: you may find by experiment that some pictures give a smaller PDF if you convert your line art to JPG, while others are more compact if you leave them as vector graphics.

        Pdftex doesn't play nicely with old versions of Acrobar Reader, so make sure to warn your readers to use AR 5.0 or later. (It generates PDFs that meet Adobe's spec for earlier versions of AR, but there are bugs in the earlier versions that cause them to garble certain things.) Don't know if this applies to the tex->dvi->pdf method.

  • by BigBadaboom ( 122579 ) on Tuesday August 19, 2003 @07:10PM (#6739048)
    Around here even the experienced latex-ers use Lyx [lyx.org] for editing their tex documents.
    Xfig sounds a scary and rather masochistic way to go... how about Graphviz [att.com] for flow charts and other similar graphics, and Sodipodi [sourceforge.net] for your vector graphics?
  • by zrail ( 50290 ) on Tuesday August 19, 2003 @07:11PM (#6739049)
    I would use pdfLaTeX to produce pdf directly from LaTeX source. It can generate hyperlinks automatically when it creates the table of contents and the index. Also, I would use the Memoir class to provide layout macros. This offers much more flexibility in layout than the generic LaTeX classes, and the first part of the manual is a great reference for typesetting in general.

    They're both in CTAN, which I assume you know about since you already use LaTeX.
    • I heartily second the use of pdfLaTeX!

      I have written a book (well, a 100-page thesis, but it's essentially a book). I wrote it entirely in LaTeX, using EPS figures generated from Adobe Illustrator and my own custom software. Later versions of the doc, however, are all pure PDF, using pdflatex, Illustrator-generated PDFs, and my own PDFs. (If you're really bored, you can download my thesis at: http://www.logn.net/penrose/download/PenroseEmpir e sThesis.pdf [logn.net].)

      Since you're starting from scratch, and you're
      • Since you're starting from scratch, and you're looking to produce a PDF file, I'd suggest using pdfLaTeX (which is often included with newer distributions of latex). Try typing `pdflatex` at the command line to see if you have it.
        Make sure it's a recent version. Many latex distributions include ridiculously old, nonfunctional versions of pdflatex. Check pdflatex --version, and make sure it's at least 1.1-ish.
  • LyX (Score:2, Informative)

    by GigsVT ( 208848 )
    LyX is a nice frontend to LaTeX. There are several packages for LaTeX hyperlinked PDFs, like Prosper and hyperref. You should be able to do pretty well with a combination of those.

    The LaTeX that LyX creates is neat and readable, so it shouldn't be a problem to hand tweak it if you need to.
  • Lout (Score:3, Interesting)

    by killmenow ( 184444 ) on Tuesday August 19, 2003 @07:25PM (#6739143)
    Check out lout [ptc.spbu.ru]. I found it easier to work with than LaTeX. YMMV.

    If you can wait, you may also consider using Jeff's followup to lout, Nonpareil [usyd.edu.au]. The specs are done, but he's still working on a compiler.
  • SGML/XML [jclark.com] was designed to be the mother-of-all information distribution and typesetting formats, so it gives you considerable power and flexibility--particularly with your vector graphics query: SVG [w3c.org]. Output to LaTeX, Docbook, PDF, HTML, PS, etc.

  • by PaulBu ( 473180 ) on Tuesday August 19, 2003 @07:47PM (#6739307) Homepage
    If you intend to generate many diagrams using "custom scripts", you might consider making your scripts either write PostScript directly or even write scripts themselves in PostScript (the language) and have your diagram and its source be one and the same. Actually learning PostScript is not that hard (after one gets past its RPN/stack nature), you code a set of macros you intend to use (or you can draw their images in, say, Xfig, export to PS and copy/paste into your PostScript program as function), then in your code you just instantiate them where you need them, connect with lines, etc.

    Adobe actually provides pretty good documentation on PostScript (this explains the popularity of the format), and GhostScript, of course, does great job in interpreting the language.

    A good way to get a feeling for the language, try looking through PostScript code generated by any of cad/figure drawing tools, Xfig itself, gnuplot, etc. If nothing else, you'd learn how to make quick and dirty mods to .ps file itself, like making all lines thicker or getting rid of color. ;-)

    Just for fun, have a look: http://www.pvv.ntnu.no/~andersr/fractal/PostScript .html
    (actually I tried to find a very cool someone's 4-line .signature which generated a nice fractal tree in PostScript, saw it, like, 10 years ago on Usenet, but could not find right now.)

    Hope this helps.

    Paul B.

    • Generating postscript directly sounds like a great idea. I had thought I could use Xfig as an intermediary because I think I read somewhere that it is fairly scriptable, and since it's open source the file format should be easy to learn.

      However, because I will be generating all of my diagrams through software, going directly to postscript will save time and cut an unnecessary step out of my toolchain.

      From another thread, it sounds like pdflatex may be a better choice than dvipdfm for my needs, and a littl
      • Feels good to have your opinion appreciated! ;-)

        Some points:

        Actually, XFig is not scriptable at all, but its file format is easy to "reverse-engineer" (maybe easier than reading source, despite its availability ;-) ). But while in XFig you'd put "box 1 100 10 10 foo bar blah, blah", it is as easy to make PostScript statement "blah, blah 1 100 10 10 box".

        Generating PS is indeed my tool of choice for quick-and-dirty visualization from within my programs, and it IS easy compared to the rest of the things on
        • Just want to say that I spent part of today learning the basics of Postscript and writing (E)PS. All my images really need are high quality stroked lines/paths, triangles, and ellipses, and I've learned enough to all of this in a few hours.

          The tricky part will be maximizung efficiency, because I will have a couple hundred of these images. Because they will be generated in software I don't need to define any Postscript functions if I choose, though there may be cases where simple functions will reduce the

          • Interesting links, I've never actually found that Adobe book freely available, maybe I'll print it out tomorrow for a reference.

            Great that you have not had any trouble with the language, yes, it does not take much more than a couple of hours to make the simplest diagrams, and then it's just fun to make more complex one (I've enjoyed coding a recursive Batcher-banyan network wiring pattern in PostScript quite alot).

            I'm still a bit worried about your plans to convert eps to pdf, are you planning to just att
            • Hmmm, I was actually planning on inserting the diagrams into the middles of pages, surrounded by text. I'm not sure if I will really need any captions for this project, just to have the images placed sensibly.

              I'm thinking of inserting images in PDF format because quite a few posts in other threads recommend the use of pdflatex for generating PDF output directly from LaTeX source. I've never used pdflatex but it sounds quite good, but cannot handle EPS directly, it must first be converted to PDF. It doesn't
              • I don't really want to go the LaTeX -> DVI -> PS -> PDF because it is somewhat cumbersome and the DVI -> Postscript conversion has the problem of rasterizing the fonts is special care is not taken. It was this problem that made me find dvipdfm for conversion of DVI to PDF while skipping the PS step. Pdflatex sounds like it's one better, doing the conversion directly.

                Since you're using Linux, you might want to try out VTeX [tex.ac.uk] from MicroPress [micropress-inc.com] . Their windows implementation is expensive but they'

  • Some advice... (Score:5, Informative)

    by ianezz ( 31449 ) on Tuesday August 19, 2003 @07:48PM (#6739314) Homepage
    From my (little) experience:
    • Save yourself the burden of typing LaTeX directly, and get a good front-end like LyX [lyx.org]. Btw, it can also import existing (not-too-convoluted) LaTeX, just in case you already started writing. TeXmacs [texmacs.org] could be another option if your book is on a mathematical subject.
    • For vectorial diagrams and images, get Sketch [sourceforge.net] and Dia [lysator.liu.se] and forget everything else (except perhaps Xfig, which comes handy sometimes). Sketch does a decent job at importing simple PostScript by itself (so you can retouch it), and of course it exports PS and EPS. For importing complex PostScript you may also use it together with pstoedit [pstoedit.net], which supports the Sketch format natively.
    • For graphs and trees have a look at Graphviz [att.com], which can generate beautiful outputs (both EPS or bitmapped) from simple textual descriptions of nodes and arcs (and it saves you
    • Save yourself the burden of typing LaTeX directly, and get a good front-end like LyX
      For a big project like a book, the programmability of direct LaTeX coding is actually a big advantage. You can define your own macros, and then change them globally if you feel like it later.

      For vectorial diagrams and images, get Sketch and Dia and forget everything else...
      The last time I tried Sketch, it was extremely lame and buggy. Dunno if it's improved recently. Sodipodi seems to be much higher in quality, but it'

      • For a big project like a book, the programmability of direct LaTeX coding is actually a big advantage. You can define your own macros, and then change them globally if you feel like it later.

        Well, LyX allows you to use inline TeX/LaTeX if you need to.

        The last time I tried Sketch, it was extremely lame and buggy

        You have to use the stable release, 0.6.x (the Tkinter-based one), possibly not the versions pre-packaged by RedHat (which had serious problems, probably due to mistakes in the packaging of the

  • I can't comment on TeX because I don't really use it. The easiest tool I've found to do what you describe is HTMLDOC, if it supports the features you need. www.easysw.com writes it. You have to compile it yourself from the GPL source, or you can buy a copy for $100 from the company with support.

    It takes HTML source files and turns them into a "book" with a table of contents and next/previous links. Just like DocBook or InfoTeX but without having to learn how to use them. You do have to learn some psue
  • ConTeXt tex macros (Score:2, Informative)

    by ehetzner ( 94010 )

    I highly recommend examining the ConTeXt macro package for TeX. It is perhaps more difficult to use than LaTeX, but it is much easier to get it to look like what you want. Also, it is very much pdfTeX aware, and part of the purpose seems to be the creating of screen documents, hyperlinked pdfs, etc. Take a look here [pragma-ade.nl]

  • Some good suggestions in this thread. I'd definitely stick with LaTeX. I sometimes got better results making pdfs with ps2pdf, and sometimes better with pdflatex, so tweak 'em both.

    I never quite understood the machinations of .out, .lof, .toc, and other files, but I suspect that if you have problems with hyperlinks, twiddling with those would solve your problems.

    Also, comp.text.tex is your friend, through Google Groups [google.com] or a newsreader near you.

    good luck,
    cbd.
    • Also, comp.text.tex is your friend, through Google Groups or a newsreader near you.
      Yeah, lots of really nice folks on that group. For questions specific to the pdftex implementation, there's also a very friendly pdftex mailing list.
  • There's a fabulous little tool called Metapost, which is basically TeX's usual Metafont adapted slightly to produce .eps outputs and with a few extra helpful macros, things like drawing arrows rather than just lines.

    It's not for everyone, or every type of graphic, but if you want diagrams in a PostScript format that is easy to insert into LaTeX documents... I'm not aware of any flashy editors, but it's awesomely powerful, and very easy to get good results after a little study up front.

  • I have thought about using raster images, my current software used for web content similar to what will go into the book creates raster images which I convert to PNG, this works well because the images are fairly simple diagrams with few colors and compress very well.

    If your book is for on-screen consumption only, or the images are photographic in nature, raster images may be acceptable.

    Otherwise - if they're diagrams or charts or whatever - they'll look embarassingly pathetic and entirely unprofessio

  • Dump LaTeX, it sucks big time; you might as well use Word. Plain TeX is better in every way, especially in combination with eplain for bibliographies, indexing, contents and such stuff.

    TWW

  • (Forgive a Linux newbie if I've got the wrong end of the stick...) but have you played with Scribus yet?

    http://www.atlantictechsolutions.com/scribusdocs/ [atlanticte...utions.com]

    I must admit that I haven't tried it out with any really huge documents yet...

    The friends that I know who do serious DTP tend to stick with PDF formats and transfer to EPS at a later stage (if at all). (That isn't to say that I don't respect TeX - I just prefer more 'visual' tools :) )

Always draw your curves, then plot your reading.

Working...