[kde-doc-english] Question on producing html and pdf versions of app manual

Yuri Chornoivan yurchor at ukr.net
Tue Aug 2 15:55:11 UTC 2011


написане Tue, 02 Aug 2011 18:06:10 +0300, Jack <ostroffjh at sbcglobal.net>:

> I have also tweaked enumerate list to make the PDF compilable by TeXLive  
> 2010 (maybe just my installation problem).
> This is not a high priority, but I would like to know what you have done  
> for this.
>

1. Download buildpdf.sh:

wget http://websvn.kde.org/*checkout*/trunk/www/areas/docs/buildpdf.sh

2. Tweak it like this (path from Mageia 1.0 installation):

#!/bin/bash

# for debug uncomment, go to the folder and run this script with parameter  
index.docbook
export  
SGML_CATALOG_FILES=/usr/share/sgml/docbook/sqml-dtd-4.2/catalog:/usr/share/apps/ksgmltools2/customization/catalog.xml:/usr/share/sgml/docbook/xml-dtd-4.2/docbook

# add -d to command below to keep the /tmp folder, so you can examine the  
generated tex.
./dblatex-cvs-install/bin/dblatex -d -b pdftex --style \
	kdestyle\
	-o $(pwd | awk -F/ '{ print $NF }').pdf \
	-P latex.output.revhistory=0  -P newtbl.use=1 \
	-P imagedata.default.scale=pagebound \
	-P literal.width.ignore=1 \
	-I $KDEDIR/share/doc/HTML/en/ \
	-X \
         $1

3. Download KDE styles:

svn co  
svn://anonsvn.kde.org/home/kde/trunk/www/areas/docs/dblatex-cvs-install/

4. Tweak /bin/dblatex like this

#!/bin/sh

TEXINPUTS=:/path/to/your/dblatex-cvs-install/share/dblatex/latex//:$TEXINPUTS
export TEXINPUTS

/path/to/your/dblatex-cvs-install/share/dblatex/scripts/dblatex  $*

(Change /path/to/your/ as appropriate)

5. Copy KDE styles (/dblatex-cvs-install/share/dblatex/latex/contrib/) to  
some TeX dir where it can be found by LaTeX installation (I have copied  
them to /usr/share/texmf-dist/tex/latex/kde (yes, mama told me always use  
my /home folder for this, but I cannot help myself ;) ).

6. Update paths with mktexlsr from root.

7. Run ./buildpdf.sh index.docbook (epic fail ;) )

8. Copy all files from /tmp/tpb-your_user-digits to the work directory.

9. Open index.docbook_tmp.tex with Kile and iron out the glitches (broken  
with "accwiz8.x.png" bounding box system, broken enumerate list (remove  
[A.] qualifier), overfull hboxes, separate author line from the first  
paragraph for chapters, something that I have not found ;) ).

10. Compile the result to PDF. Enjoy professional looking docs. ;)

That's all. ;)

I am sure that all this can be done with one dblatex command, but because  
some xslt bugs (see above) it does not compile PDF in one turn.


More information about the kde-doc-english mailing list