Slashdot Mirror


Electronic Publishing Using Free Software?

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?"

1 of 41 comments (clear)

  1. Learn PostScript for your diagrams! by PaulBu · · Score: 4, Insightful

    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.