Commits

Shlomi Fish  committed b589a49

Fixed the PDF building

git-svn-id: file:///home/shlomif/Backup/svn-dumps/google-code/svnsync-repos/fc-solve/trunk@1393 e7e8a897-7ba4-4ee7-b36f-f4c66519b19a

  • Participants
  • Parent commits 1871340

Comments (0)

Files changed (2)

File fc-solve/arch_doc/docbook/Makefile

 XML = $(DOC).xml
 XHTML = $(DOC)
 XHTML_INDEX = $(XHTML)/index.html
+PDF = $(DOC).pdf
 
 UPLOAD_PATH = shlomif@shell.berlios.de:/home/groups/fc-solve/htdocs/arch_doc/
 
-all: xhtml
+all: xhtml pdf
 
 xhtml: $(XHTML_INDEX)
 
 $(XHTML_INDEX): $(XML)
-	docmake \
+	docmake -v \
 		--stringparam "docmake.output.format=xhtml" \
 		--stringparam "docmake.output.work_in_progress=" \
 		-x shlomif-essays-xhtml.xsl	\
 		-o $(XHTML) \
 		xhtml $<
 
+pdf: $(PDF)
+
+$(PDF): $(XML)
+	docmake -v \
+		--stringparam "docmake.output.format=fo" \
+		-x shlomif-essays-fo.xsl \
+		-o $@ \
+		pdf $<
+
 upload:
-	rsync -a -v --progress $(XHTML) $(XML) $(UPLOAD_PATH)
+	rsync -a -v --progress $(XHTML) $(XML) $(PDF) $(UPLOAD_PATH)
 
 %.show:
 	@echo "$* = $($*)"

File fc-solve/arch_doc/docbook/shlomif-essays-fo.xsl

+<xsl:stylesheet
+     version='1.0'
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:fo="http://www.w3.org/1999/XSL/Format"> 
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl" />
+    <xsl:import href="shlomif-essays.xsl" />
+
+<!--colored and hyphenated links --> 
+<xsl:template match="ulink"> 
+    <fo:basic-link external-destination="{@url}" 
+         xsl:use-attribute-sets="xref.properties" 
+         text-decoration="underline" 
+         color="blue"> 
+         <xsl:choose> 
+         <xsl:when test="count(child::node())=0"> 
+         <xsl:value-of select="@url"/> 
+         </xsl:when> 
+         <xsl:otherwise> 
+         <xsl:apply-templates/> 
+         </xsl:otherwise> 
+         </xsl:choose> 
+    </fo:basic-link> 
+</xsl:template>
+</xsl:stylesheet>