/[volute]/trunk/projects/ivoapub/build.xml
ViewVC logotype

Contents of /trunk/projects/ivoapub/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1681 - (show annotations)
Tue Apr 10 21:32:45 2012 UTC (8 years, 7 months ago) by harripa
File MIME type: text/xml
File size: 4339 byte(s)
improved the PDF formatting
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- note it is intended that this file be used in a directory above this distribution directory -->
3 <project name="ivoapub" default="formatdoc">
4 <tstamp></tstamp>
5 <property name="ivoname" value="ivoapub"/><!-- set this to the nickname of the document -->
6 <property name="docversion" value="1.0"/>
7 <property name="pubstatus" value="NOTE"/><!-- set to the status of the document WD, PR, REC, NOTE -->
8 <property name="docdate" value="${DSTAMP}"/><!--set this manually when the final publication date is decided-->
9
10 <!-- the location of latex/bibtex binaries -->
11 <property name="latexlocation" location="/opt/local/bin"/>
12 <!-- the location of a binary FOP distribution -->
13 <property name="fop.home" value="/opt/packages/fop-1.0"/>
14
15 <!-- =================================
16 target: createdoc
17 ================================= -->
18 <target name="formatdoc" description="update TOC, numbering etc">
19
20 <copy file="${ivoname}.html" tofile="${ivoname}-old.html" overwrite="true"/> <!-- for safety in case xslt screws up -->
21 <xslt style="ivoadoc/ivoarestructure.xslt" in="${ivoname}.html" out="${ivoname}-new.html" force="true" >
22 <factory name="net.sf.saxon.TransformerFactoryImpl" />
23 <param name="ivoname" expression="${ivoname}"/>
24 <param name="docversion" expression="${docversion}"/>
25 <param name="pubstatus" expression="${pubstatus}"/>
26 <param name="docdate" expression="${docdate}"/>
27 <xmlcatalog>
28 <catalogpath><filelist><file name="./ivoadoc/xmlcatalog/catalog.xml"/></filelist></catalogpath>
29 </xmlcatalog>
30 </xslt>
31 <copy file="${ivoname}-new.html" tofile="${ivoname}.html" />
32 </target>
33
34 <target name="createPDF">
35 <xslt style="ivoadoc/ivoa-fo.xsl" in="${ivoname}.html" out="out.fo" force="true">
36 <factory name="net.sf.saxon.TransformerFactoryImpl" />
37 <xmlcatalog>
38 <catalogpath><filelist><file name="./ivoadoc/xmlcatalog/catalog.xml"/></filelist></catalogpath>
39 </xmlcatalog>
40 </xslt>
41 <echo>applying fop</echo>
42 <fop format="application/pdf"
43 fofile="out.fo"
44 outfile="${ivoname}.pdf" messagelevel="DEBUG" />
45 </target>
46
47 <target name="biblio">
48 <xslt style="ivoadoc/extractcite.xslt" in="${ivoname}.html" out="${ivoname}.aux" force="true" >
49 <factory name="net.sf.saxon.TransformerFactoryImpl" />
50 <param name="target" expression="aux"/>
51 <xmlcatalog >
52 <catalogpath>
53 <filelist>
54 <file name="./ivoadoc/xmlcatalog/catalog.xml"/>
55 </filelist>
56 </catalogpath>
57 </xmlcatalog>
58 </xslt>
59 <exec executable="/opt/local/bin/bibtex">
60 <env key="PATH" path="${env.PATH}:${latexlocation}"/>
61 <arg value="${ivoname}" />
62 </exec>
63 <!-- get rid of some TeXisms (really need to do the accented characters as well..better to run sed..)-->
64 <replaceregexp file="${ivoname}.bbl"
65 match="([^/])~"
66 replace="\1&amp;nbsp;"
67 flags="g"/>
68
69 <echo>Now edit the references into the document from ${ivoname}.bbl</echo>
70 </target>
71
72 <!-- =================================
73 target: package
74 ================================= -->
75 <target name="package" description="create a zip file of document and associated files for upload to IVOA site">
76 <tstamp></tstamp>
77 <copy file="${ivoname}.html" tofile="${pubstatus}-${ivoname}-${docversion}-${DSTAMP}.html"></copy>
78 <copy file="${ivoname}.pdf" tofile="${pubstatus}-${ivoname}-${docversion}-${DSTAMP}.pdf"></copy>
79
80 <zip destfile="${ivoname}.zip" basedir="${basedir}" includes="${pubstatus}-${ivoname}-${docversion}-${DSTAMP}.html, ${pubstatus}-${ivoname}-${docversion}-${DSTAMP}.pdf, **/*.css,**/*.png,**/*.gif">
81
82 </zip>
83 </target>
84
85
86 <taskdef name="fop"
87 classname="org.apache.fop.tools.anttasks.Fop">
88 <classpath>
89 <fileset dir="${fop.home}/lib">
90 <include name="*.jar"/>
91 </fileset>
92 <fileset dir="${fop.home}/build">
93 <include name="fop.jar"/>
94 <include name="fop-hyph.jar"/>
95 </fileset>
96 </classpath>
97 </taskdef>
98 </project>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26