This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pdflatex errors in doc dir


On Jul 18 18:50, Warren Young wrote:
> >Is it possible
> >to override the definition of the filename tag in our own stylesheet?
> 
> Yes, but to do that, you'd still have to switch from xmlto to
> xsltproc, since it would require that you create something like my
> fo.xsl.
> 
> You can't just stuff the customizations into the existing
> cygwin.xsl, since you'd affect HTML output, too.
> 
> It's not easy to do this: http://goo.gl/HKxcK
> 
> >That's really not an option.  It's much too complicated
> 
> Really?
> 
> 1. sudo yum install fop
> 
> 2. Patch Makefile.in as given
> 
> 3. cvs add fo2pdf fo.xsl
> 
> Done.

Well, ok.  Except the Makefile.in patch didn't work OOTB.  Here's the
right one:

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/winsup/doc/Makefile.in,v
retrieving revision 1.33
diff -u -p -r1.33 Makefile.in
--- Makefile.in	4 Jun 2013 11:50:41 -0000	1.33
+++ Makefile.in	19 Jul 2013 09:16:40 -0000
@@ -26,6 +26,8 @@ FAQ_SOURCES:= $(wildcard ${srcdir}/faq*.
 
 .SUFFIXES: .html .body
 
+UG_FO := cygwin-ug-net/cygwin-ug.fo
+
 .html.body:
 	$(srcdir)/bodysnatcher.pl $<
 
@@ -60,7 +62,8 @@ cygwin-ug-net/cygwin-ug-net.html : cygwi
 
 # Some versions of jw hang with the -o option
 cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.xml
-	-${XMLTO} pdf -o cygwin-ug-net/ $<
+	xsltproc --xinclude $(srcdir)/fo.xsl $< > $(UG_FO)
+	$(srcdir)/fo2pdf $(UG_FO) $@
 
 cygwin-api/cygwin-api.html : cygwin-api.xml
 	-${XMLTO} html -o cygwin-api/ -m $(srcdir)/cygwin.xsl $<

Please, always test by building outside the source tree.  This is what
matters, not the build inside the source tree which is *not* supported
anyway.  Also, unified context diffs (diff -u{p}) are easier to handle.

> >I don't
> >want us to rely on non-OSS software just to build the docs.
> 
> Where is this reliance?

I misunderstood your mail.  I just read it again and I see that you
wrote "[FOP] happens to be the only libre one", but I screwed that up
while reading into something along the lines of "FOP is not libre".
Sorry about that.

Ok, thank you.  I'm going to apply your patch, after discussing this
tiny bit:

This stuff in fo2pdf looks not kosher:

  AHCMD=/usr/XSLFormatterV42/run.sh
  FOPCMD=`which /usr/local/fop/fop /usr/bin/fop | head -1 2> /dev/null`
  XEPCMD=/usr/local/xep/xep

The check for this XSLFormatter run script and checking for stuff
installed in /usr/local looks not right.  Also, are these XSLFormatter
and xep thingies non-libre stuff?  If so, I'd rather drop all of this
and just call fop from the Makefile directly.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]