[Leaplist] free ebooks
Jesse Goerz
jgoerz at cfl.rr.com
Tue May 19 22:04:17 EDT 2009
On Tue, 2009-05-19 at 11:37 -0400, Jesse Rhoads wrote:
> It looks like the bash guide was done in docbook. If the author took
> the time, they could get it into PDF, there are plenty of ways to do so.
> But, not being a fan of docbook myself, I could see where he might not
> want to deal with the conversion process. :)
> So what I'm saying is, while I'm sure he thought that a PDF would be
> useful, he probably just got caught in a nasty docbook toolchain
> quagmire, and gave up.
> Been there, done that. And trust me, no amount of bash-wizardry will
> make docbook play nice when all the xml conversion platforms have gone awry.
> On another note, If anyone has found a way to make docbook "do the right
> thing" despite DTD/XML/Stylesheet differences, by all means, please share.
>
> Best Regards,
> -Jesse
The last time I used docbook xml the PDF output was simple to create.
You might not get the fanciest with all the bells and whistles but it
worked just fine. I did my docs on Debian and Solaris. On both
platforms I was able to produce HTML and PDF. The HTML could be chunked
(in many pages) or all in one page. I had a make file set up and could
easily produce, one, some, or all formats.
I used the following makefile to create a single document from documents
supplied by 3 other people. I was able to integrate all their input
from ms Word into a single properly formatted document. It took me
about 4 hours to dump their stuff to text and "tag" the content using
their Word files as a reference if the straight text lost something. I
can't imagine how long it would have taken in anything other than vim.
It produced about an 80 paged PDF which we had printed and bound at
Kinkos. We turned it in as our senior design project documentation
along with a CD-ROM with self-launching browser (on windows) and the
HTML formatted document was displayed in both single and "chunked"
formats. We got an A. Of course, the formatting had nothing to do with
it ;-) it was the content.
If you're interested, email me and I can provide you with the
stylesheets.
Don't be fooled. Docbook is designed for technical documentation. It's
great for that.
Here's the makefile I used:
STYLESHEET_PATH = /usr/share/xml/docbook/stylesheet/nwalsh
onehtml:
xsltproc \
--xinclude --output i2water.html \
${STYLESHEET_PATH}/html/docbook.xsl \
i2water.xml
html:
xsltproc \
--xinclude --output multi-html/ \
multi-html.xsl \
i2water.xml
pdf:
xsltproc \
--xinclude --output i2water.fo \
--stringparam fop.extensions 1 \
fo.xsl \
i2water.xml
#
# --stringparam passivetex.extensions 1 \
# --stringparam use.extensions 0 \
# --stringparam double.sided 1 \
# ${STYLESHEET_PATH}/fo/docbook.xsl \
#
# pdftex --interaction nonstopmode "&pdfxmltex" i2water.fo
# pdftex --interaction nonstopmode "&pdfxmltex" i2water.fo
#fop -xml i2water.xml -fo i2water.fo -xsl fo.xsl -pdf i2water.pdf
#fop -xml i2water.xml -xsl fo.xsl -pdf i2water.pdf
# The following dumps the configuration and stops
#fop -x -fo i2water.fo -pdf i2water.pdf
# The following works but produces a lot of errors
fop -fo i2water.fo -pdf i2water.pdf
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Leaplist
mailing list