Commit f50324e5 authored by Clément Stenac's avatar Clément Stenac

Use xlstproc instead of jade for HTML output

Output PDF instead of PS

You will need 
 * xsltproc
 * the docbook XSL package
parent 05c9649a
# Extract from the Debian SGML/XML HOWTO by Stphane Bortzmeyer
# Makefile for VideoLAN Doc
# Clment Stenac
# Anil Daoud
MAX_TEX_RECURSION=4
XSLTPROC=xsltproc
LYNX=lynx
JADE=jade
# For Debian :
#XML_DECL=/usr/lib/sgml/declaration/xml.decl
#HTML_SS=/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl
#PRINT_SS=/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl
# For RedHat :
# XML_DECL=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/dtds/decls/xml.dcl
# HTML_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/html/docbook.dsl
# PRINT_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/print/docbook.dsl
# For Mac OS X :
#XML_DECL=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/dtds/decls/xml.dcl
#HTML_SS=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/html/docbook.dsl
#PRINT_SS=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/print/docbook.dsl
#JADE=openjade
JADE=openjade
LYNX=/usr/bin/lynx
DVIPS=/usr/bin/dvips
JADETEX=/usr/bin/jadetex
XML_DECL=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/dtds/decls/xml.dcl
HTML_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/html/docbook.dsl
PRINT_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/print/docbook.dsl
DOCS=manual.html manual.txt manual.ps
XML_DECL := /usr/lib/sgml/declaration/xml.decl
XSL_CHUNK = videolan-doc-chunk.xsl
XSL = videolan-doc.xsl
all: manual
manual: manual.html all-html manual.pdf manual.txt
manual: manual.txt manual.ps manual.html
manual.tex: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
$(JADE) -t tex -V %section-autolabel% -d $(PRINT_SS) $(XML_DECL) manual.xml
perl -i.bak -pe 's/\000//g' $@ && rm $*.tex.bak
# No it's not a joke
# HTML
all-html: *.xml
xsltproc $(XSL_CHUNK) manual.xml
mv *.html html
manual.html: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
$(JADE) -t sgml -V %section-autolabel% -V nochunks \
-d $(HTML_SS) $(XML_DECL) manual.xml > $@
manual.html: *.xml
xsltproc $(XSL) manual.xml > manual.html
manual.dvi: manual.tex modules.eps ps.eps stream.eps ts.eps
$(JADETEX) manual.tex
$(JADETEX) manual.tex
$(JADETEX) manual.tex
# PDF
manual.pdf: *.xml
jade -t tex -d stylesheet-print-noicones.dsl -o manual.tex $(XML_DECL) manual.xml
pdfjadetex manual.tex
pdfjadetex manual.tex
pdfjadetex manual.tex
rm -f *.tex *.out *.aux *.log
manual.ps: manual.dvi
$(DVIPS) -f $< > $@
manual.txt: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
$(JADE) -t sgml -V nochunks -d $(HTML_SS) $(XML_DECL) manual.xml > dump.html
$(LYNX) -force_html -dump dump.html > $@
-rm -f dump.html
# TXT
manual.txt: *.xml
$(JADE) -t sgml -d stylesheet-txt.dsk $(XML_DECL) manual.xml > text.html
$(LYNX) -force_html -dump text.html > manual.txt
rm -f text.html
clean:
rm -f manual.txt
rm -f *.html *.aux *.log *.dvi *.ps *.tex
rm -f *.bck *~ .\#* \#*
rm -f *.html *.aux *.log *.tex
rm -f html/*.html
<?xml version="1.0" encoding="iso-8859-15" ?>
<appendix> <title> Project history </title>
<sect1> <title> VIA and the Network2000 project </title>
......
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd"
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "/usr/share/sgml/docbook/dtd/xml/4.1/docbookx.dtd"
[
<!ENTITY glossary SYSTEM "glossary.xml">
<!ENTITY overview SYSTEM "overview.xml">
......@@ -15,7 +15,7 @@
<!ENTITY gfdl SYSTEM "gfdl.xml">
]>
<book>
<book id="vlc-dev-doc">
<title> VLC media player API Documentation </title>
......
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY dbstyle SYSTEM
"/usr/share/sgml/docbook/stylesheet/dsssl/modular/print/docbook.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
; Personnalization of James Clark's stylesheet for PS & PDF output
; These parameters overide James Clark's one.
; Written by Alexis de Lattre (alexis@videolan.org)
; Only produce a table of contents (not a table of figure, etc...)
(define ($generate-book-lot-list$)
(list ))
; Depth of the table of contents
(define (toc-depth nd)
2)
; Magins
(define %left-margin%
3pi)
(define %right-margin%
3pi)
(define %top-margin%
5pi)
(define %bottom-margin%
3.5pi)
(define %header-margin%
2pi)
(define %footer-margin%
2pi)
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="dbstyle">
</style-sheet>
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY dbstyle SYSTEM "/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
; Personnalization of James Clark's stylesheet for Text output
; These parameters overide James Clark's one.
; Written by Alexis de Lattre (alexis@videolan.org)
; Only produce a table of contents (not a table of figure, etc...)
(define ($generate-book-lot-list$)
(list ))
; Depth of the table of contents
(define (toc-depth nd)
1)
; No icons
(define %admon-graphics%
#f)
; Are sections enumerated?
(define %section-autolabel%
#t)
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="dbstyle">
</style-sheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0' xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default">
<xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/xhtml/chunk.xsl"/>
<xsl:variable name="toc.section.depth">1</xsl:variable>
<xsl:param name="chunker.output.encoding" select="'iso-8859-15'"/>
<xsl:param name="chunk.section.depth" select="0"/>
<xsl:param name="html.stylesheet" select="'../screen.css'"/>
</xsl:stylesheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0' xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default">
<xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/xhtml/docbook.xsl"/>
<xsl:param name="html.stylesheet" select="'screen.css'"/>
</xsl:stylesheet>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment