doc: use xmlto pdf
As reported recently on the list[1], openjade cannot handle the ISO encodings shipped with docbook-xml45. While I need to look into a fix, in this case there is a simple workaround. Since we already use xmlto to build the HTML, we can also use it to build the PDFs. Note that this does require the appropriate backend to be installed. On Linux, xmlto has used PassiveTeX as a DVI/PDF/PS backend since at least 0.0.18; later versions also support dblatex and fop. On Cygwin, I just adopted xmlto[2] and updated it to use dblatex as the DVI/PDF/PS backend, as that is the only backend currently in the distro. (fop is in Ports but requires its GNU Classpath environment plus a bunch of Java libraries, and neither passivetex nor its dependency xmltex are currently available.) Patch attached; please test. Yaakov [1] http://cygwin.com/ml/cygwin/2010-06/msg00448.html [2] http://cygwin.com/ml/cygwin-announce/2010-06/msg00041.html 2010-06-25 Yaakov Selkowitz * Makefile.in: Use "xmlto pdf" instead of docbook2pdf. * README: Remove docbook-utils and update docbook-xml deps. * faq-programming.xml: Ditto. Index: Makefile.in === RCS file: /cvs/src/src/winsup/doc/Makefile.in,v retrieving revision 1.26 diff -u -r1.26 Makefile.in --- Makefile.in 26 Jan 2010 16:16:19 - 1.26 +++ Makefile.in 25 Jun 2010 19:24:52 - @@ -56,7 +56,7 @@ # Some versions of jw hang with the -o option cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.sgml - -cd cygwin-ug-net && docbook2pdf ../$< + -${XMLTO} pdf -o cygwin-ug-net/ $< cygwin-ug-net.sgml : cygwin-ug-net.in.sgml ./doctool Makefile -./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $< @@ -65,7 +65,7 @@ -${XMLTO} html -o cygwin-api/ -m $(srcdir)/cygwin.dsl $< cygwin-api/cygwin-api.pdf : cygwin-api.sgml - -cd cygwin-api && docbook2pdf ../$< + -${XMLTO} pdf -o cygwin-api/ $< cygwin-api.sgml : cygwin-api.in.sgml ./doctool Makefile -./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $< Index: README === RCS file: /cvs/src/src/winsup/doc/README,v retrieving revision 1.2 diff -u -r1.2 README --- README 2 Feb 2010 01:02:49 - 1.2 +++ README 25 Jun 2010 19:24:52 - @@ -7,8 +7,7 @@ bzip2 coreutils cygwin -docbook-utils -docbook-xml42 +docbook-xml45 docbook-xsl gzip make Index: faq-programming.xml === RCS file: /cvs/src/src/winsup/doc/faq-programming.xml,v retrieving revision 1.15 diff -u -r1.15 faq-programming.xml --- faq-programming.xml 2 Feb 2010 01:18:03 - 1.15 +++ faq-programming.xml 25 Jun 2010 19:24:53 - @@ -420,7 +420,7 @@ perl, and cocom. If you want to run the tests, dejagnu is also required. Normally, building ignores any errors in building the documentation, -which requires the docbook-utils, docbook-xml42, docbook-xsl, and +which requires the docbook-xml45, docbook-xsl, and xmlto packages. For more information on building the documentation, see the README included in the cygwin-doc package.
Re: doc: use xmlto pdf
On Jun 25 14:38, Yaakov S wrote: > As reported recently on the list[1], openjade cannot handle the ISO > encodings shipped with docbook-xml45. While I need to look into a fix, > in this case there is a simple workaround. Since we already use xmlto > to build the HTML, we can also use it to build the PDFs. > > Note that this does require the appropriate backend to be installed. On > Linux, xmlto has used PassiveTeX as a DVI/PDF/PS backend since at least > 0.0.18; later versions also support dblatex and fop. On Cygwin, I just > adopted xmlto[2] and updated it to use dblatex as the DVI/PDF/PS > backend, as that is the only backend currently in the distro. (fop is > in Ports but requires its GNU Classpath environment plus a bunch of Java > libraries, and neither passivetex nor its dependency xmltex are > currently available.) > > Patch attached; please test. The reason that I changed that to docbook2pdf at one point was that creating a PDF from the docs never worked for me before. And with your patch it also doesn't work for me on two different Linux systems with different xmlto versions (0.0.18 and 0.0.23). Here's what happens on Fedora 13, the result is practically the same on the older system. Maybe you know a solution? xmlto --skip-validation pdf -o cygwin-ug-net/ cygwin-ug-net.sgml Making portrait pages on a4 paper (210mmx297mm) This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) %&-line parsing enabled. entering extended mode (./tmp.fo LaTeX2e <2005/12/01> Babel and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish, french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, turkish, ukenglish, ukrainian, loaded. xmltex version: 2002/06/25 v1.9 (Exp): (/usr/share/texmf/tex/xmltex/xmltex.cfg) No File: tmp.cfg (/usr/share/texmf/tex/xmltex/passivetex/fotex.xmt) (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2005/09/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size10.clo)) (/usr/share/texmf/tex/xmltex/passivetex/fotex.sty ) No file tmp.aux. (/usr/share/texmf/tex/latex/cyrillic/t2acmr.fd) (/usr/share/texmf/tex/latex/base/ts1cmr.fd) (/usr/share/texmf/tex/latex/psnfss/t1ptm.fd) No file tmp.out. No file tmp.out. INFO: Using normal, i.e. nonfrench-spacing in document (/usr/share/texmf/tex/latex/psnfss/t1phv.fd) [1{/usr/share/texmf/fonts/map/pdft ex/updmap/pdftex.map}] (/usr/share/texmf/tex/latex/psnfss/ts1ptm.fd) [2] (/usr/share/texmf/tex/latex/amsfonts/umsa.fd) (/usr/share/texmf/tex/latex/amsfonts/umsb.fd) (/usr/share/texmf/tex/latex/wasysym/uwasy.fd) (/usr/share/texmf/tex/latex/stmaryrd/Ustmry.fd) Underfull \hbox (badness 1) has occurred while \output is active [][][] [] Underfull \hbox (badness 1) has occurred while \output is active [][] [] [3] (/usr/share/texmf/tex/latex/psnfss/t1pcr.fd) Underfull \hbox (badness 1) has occurred while \output is active []\T1/ptm/m/n/10 Cygwin User's Underfull \hbox (badness 1) has occurred while \output is active []\T1/ptm/m/n/10 Cygwin User's Underfull \hbox (badness 1) has occurred while \output is active [][][] [] Underfull \hbox (badness 1) has occurred while \output is active [][] [] [4] [5] [6] LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <12.44159> not available (Font) size <12> substituted on input line 1082. LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <12.44159> not available (Font) size <12> substituted on input line 1082. LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <12.44159> not available (Font) size <12> substituted on input line 1082. LaTeX Font Warning: Font shape `OMX/cmex/m/n' in size <12.44159> not available (Font) size <12> substituted on input line 1082. LaTeX Font Warning: Font shape `U/msa/m/n' in size <12.44159> not available (Font) size <12> substituted on input line 1082. LaTeX Font Warning: Font shape `U/msb/m/n' in size <12.44159> not available (Font) size <12> substituted on input line 1082. LaTeX Font Warning: Font shape `U/wasy/m/n' in size <12.44159> not available (Font) size <12> substituted on input line 1082. LaTeX Font Warning: Font shape `U/stmry/m/n' in size <12.44159> not available (Font) size <12> substituted on input line 1082. [1] Underfull \hbox (badness 6675) in paragraph at lines 1261--1265 []\T1/ptm/m/n/10 A his-tor-i-cal look into the first years of Cyg-win de-vel-o p-ment is Ge-of-frey J. Noer's
Re: doc: use xmlto pdf
On Fri, 2010-06-25 at 23:14 +0200, Corinna Vinschen wrote: > The reason that I changed that to docbook2pdf at one point was that > creating a PDF from the docs never worked for me before. > > And with your patch it also doesn't work for me on two different Linux > systems with different xmlto versions (0.0.18 and 0.0.23). Here's what > happens on Fedora 13, the result is practically the same on the older > system. Maybe you know a solution? I was able to duplicate this on a linux VM; it appears to be a problem with the passivetex backend. If I force the dblatex backend, then it works, but requires xmlto >= 0.0.21[1]. Could you try the attached patch instead? Yaakov [1] 0.0.21 is shipped in F-10, Debian squeeze, Ubuntu 9.10, and newer. 2010-06-25 Yaakov Selkowitz * Makefile.in: Use "xmlto pdf" instead of docbook2pdf. Force the dblatex backend, as the default passivetex does not work. * README: Remove docbook-utils and update docbook-xml deps. * faq-programming.xml: Ditto. Index: Makefile.in === RCS file: /cvs/src/src/winsup/doc/Makefile.in,v retrieving revision 1.26 diff -u -r1.26 Makefile.in --- Makefile.in 26 Jan 2010 16:16:19 - 1.26 +++ Makefile.in 25 Jun 2010 19:24:52 - @@ -17,7 +17,7 @@ CC_FOR_TARGET:=...@cc@ exeext:=...@build_exeext@ -XMLTO:=xmlto --skip-validation +XMLTO:=xmlto --skip-validation --with-dblatex include $(srcdir)/../Makefile.common @@ -56,7 +56,7 @@ # Some versions of jw hang with the -o option cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.sgml - -cd cygwin-ug-net && docbook2pdf ../$< + -${XMLTO} pdf -o cygwin-ug-net/ $< cygwin-ug-net.sgml : cygwin-ug-net.in.sgml ./doctool Makefile -./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $< @@ -65,7 +65,7 @@ -${XMLTO} html -o cygwin-api/ -m $(srcdir)/cygwin.dsl $< cygwin-api/cygwin-api.pdf : cygwin-api.sgml - -cd cygwin-api && docbook2pdf ../$< + -${XMLTO} pdf -o cygwin-api/ $< cygwin-api.sgml : cygwin-api.in.sgml ./doctool Makefile -./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $< Index: README === RCS file: /cvs/src/src/winsup/doc/README,v retrieving revision 1.2 diff -u -r1.2 README --- README 2 Feb 2010 01:02:49 - 1.2 +++ README 25 Jun 2010 19:24:52 - @@ -7,8 +7,7 @@ bzip2 coreutils cygwin -docbook-utils -docbook-xml42 +docbook-xml45 docbook-xsl gzip make Index: faq-programming.xml === RCS file: /cvs/src/src/winsup/doc/faq-programming.xml,v retrieving revision 1.15 diff -u -r1.15 faq-programming.xml --- faq-programming.xml 2 Feb 2010 01:18:03 - 1.15 +++ faq-programming.xml 25 Jun 2010 19:24:53 - @@ -420,7 +420,7 @@ perl, and cocom. If you want to run the tests, dejagnu is also required. Normally, building ignores any errors in building the documentation, -which requires the docbook-utils, docbook-xml42, docbook-xsl, and +which requires the docbook-xml45, docbook-xsl, and xmlto packages. For more information on building the documentation, see the README included in the cygwin-doc package.