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?"
DocBook (Score:3, Interesting)
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.
DocBook is great, but the toolchain is piss-poor (Score:5, Informative)
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.
DocBook and SVG (Score:2)
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
Re:DocBook and SVG (Score:2)
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] (
Re:DocBook (Score:2)
I'm developing a DocUtils XML -> XSL:FO -> PDF set of stylesheets.
dvipdfm (Score:3, Informative)
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)
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.
Re:PDFLaTeX (Score:1)
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)
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.
lyx, graphviz, sodipodi? (Score:4, Informative)
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?
pdfLaTeX and the Memoir class (Score:4, Informative)
They're both in CTAN, which I assume you know about since you already use LaTeX.
Re:pdfLaTeX and the Memoir class (Score:3, Informative)
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
Re:pdfLaTeX and the Memoir class (Score:2, Informative)
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)
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)
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/SVG (Score:2)
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.
Re:SGML/XML/SVG (Score:2)
SGML/XML are not typesetting formats: they are semantic markup languages.
Read the original design and development documents for SGML. It was developed as (as I said) to be the mother-of-all typesetting formats. The purpose of developing the markup standards in the first place was in order to generate (i.e. mother) a variety of typesetting formats. The idea was that you could write one document, and be able to generate PS, or TeX/LaTeX or (later) HTML or (even later) DocBook from it.
SGML was s
Learn PostScript for your diagrams! (Score:5, Insightful)
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
Just for fun, have a look: http://www.pvv.ntnu.no/~andersr/fractal/PostScrip
(actually I tried to find a very cool someone's 4-line
Hope this helps.
Paul B.
Re:Learn PostScript for your diagrams! (Score:1)
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
Re:Learn PostScript for your diagrams! (Score:2)
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
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
Re:Learn PostScript for your diagrams! (Score:1)
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
Re:Learn PostScript for your diagrams! (Score:2)
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
Re:Learn PostScript for your diagrams! (Score:1)
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
Re:Learn PostScript for your diagrams! (Score:1)
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)
Re:Some advice... (Score:1)
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'
Re:Some advice... (Score:2)
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
HTMLDOC (Score:2)
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)
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]
Stick with LaTeX. (Score:1)
I never quite understood the machinations of
Also, comp.text.tex is your friend, through Google Groups [google.com] or a newsreader near you.
good luck,
cbd.
Re:Stick with LaTeX. (Score:1)
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.
For diagrams, you might like Metapost (Score:2)
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.
Raster images look like ass on paper (Score:1)
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
TeX, dvips, metapost (Score:2)
TWW
Re:TeX, dvips, metapost (Score:2)
TWW
Scribus (Score:1)
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