Add support for building documents in our doc/ tree marked up in

Norman Walsh's DocBook Slides DTD.

This DTD offers the vocabulary of simplified DocBook for
presentations.  Initially, the supported output formats are PDF and
HTML.

XSL stylesheets are used so libxslt is required.

PassiveTeX is used for the PDF generation to convert the XSL-FO
directly to PDF.

This commit moves various TeX definitions out of doc.docbook.mk and
into doc.project.mk, since docbook is no longer the only back-end to
utilize TeX.

An example Makefile would look like :

----
DOCFORMAT=	slides
DOC=		slides

SRCS=	slides.xml

DOC_PREFIX?=	${.CURDIR}/../../..
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
---

And an example slides file (slides.xml) looks like :

---
<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides XML V3.3.1//EN"
  "http://docbook.sourceforge.net/releases/slides/3.3.1/slides.dtd">
<slides>
<slidesinfo>
  <title>What's new in FreeBSD 5.3</title>
  <titleabbrev>FreeBSD 5.3</titleabbrev>
</slidesinfo>

<foil><title>Introduction Slide</title>
  <para>Content</para>
</foil>
</slides>
---

You could then build the HTML and PDF versions of the slides by typing
"make FORMATS='pdf html'".  Enjoy.

Please coordinate with doceng@ before importing any presentations to
doc/.
This commit is contained in:
Murray Stokely 2004-09-02 17:12:14 +00:00
parent 25e6eedd23
commit 54ab45e845
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=22212
3 changed files with 71 additions and 5 deletions

View file

@ -257,11 +257,6 @@ TAR?= /usr/bin/tar
TOUCH?= /usr/bin/touch
XARGS?= /usr/bin/xargs
TEX_CMD?= ${PREFIX}/bin/tex
LATEX_CMD?= ${PREFIX}/bin/latex
PDFTEX_CMD?= ${PREFIX}/bin/pdftex
JADETEX_CMD?= ${TEX_CMD} "&jadetex"
PDFJADETEX_CMD?=${PDFTEX_CMD} "&pdfjadetex"
GROFF?= groff
TIDYOPTS?= -wrap 90 -m -raw -preserve -f /dev/null -asxml ${TIDYFLAGS}
HTML2TXT?= ${PREFIX}/bin/links

View file

@ -93,6 +93,11 @@ REALPATH?= /bin/realpath
SETENV?= /usr/bin/env
XSLTPROC?= ${PREFIX}/bin/xsltproc
TIDY?= ${PREFIX}/bin/tidy
TEX_CMD?= ${PREFIX}/bin/tex
LATEX_CMD?= ${PREFIX}/bin/latex
PDFTEX_CMD?= ${PREFIX}/bin/pdftex
JADETEX_CMD?= ${TEX_CMD} "&jadetex"
PDFJADETEX_CMD?=${PDFTEX_CMD} "&pdfjadetex"
# Image processing (contains code used by the doc.<format>.mk files, so must
# be listed first).
@ -115,6 +120,9 @@ DOC_LOCAL_MK= ${DOC_PREFIX}/${LANGCODE}/share/mk/doc.local.mk
.if ${DOCFORMAT} == "docbook"
.include "doc.docbook.mk"
.endif
.if ${DOCFORMAT} == "slides"
.include "doc.slides.mk"
.endif
.if ${DOCFORMAT} == "html"
.include "doc.html.mk"
.endif

63
share/mk/doc.slides.mk Normal file
View file

@ -0,0 +1,63 @@
#
# $FreeBSD$
#
# This include file <doc.slides.mk> handles building and installing of
# DocBook Slides in the FreeBSD Documentation Project.
#
# Documentation using DOCFORMAT=slides is expected to be marked up
# according to the DocBook slides DTD.
#
# PDF and HTML output formats are currently supported.
#
# ------------------------------------------------------------------------
#
# Document-specific variables
#
# DOC This should be set to the name of the SLIDES
# marked-up file, without the .xml suffix.
#
# It also determins the name of the output files
# for print output : ${DOC}.pdf
#
# DOCBOOKSUFFIX The suffix of your document, defaulting to .xml
#
DOCBOOKSUFFIX?= xml
MASTERDOC?= ${.CURDIR}/${DOC}.${DOCBOOKSUFFIX}
KNOWN_FORMATS= html pdf
CSS_SHEET?=
SLIDES_XSLDIR= /usr/local/share/xsl/slides/xsl/
SLIDES_XSLHTML= ${SLIDES_XSLDIR}xhtml/default.xsl
SLIDES_XSLPRINT= ${SLIDES_XSLDIR}fo/plain.xsl
# Loop through formats we should build.
.for _curformat in ${FORMATS}
_cf=${_curformat}
# Create a 'bogus' doc for any format we support or not. This is so
# that we can fake up a target for it later on, and this target can print
# the warning message about the unsupported format.
_docs+= ${DOC}.${_curformat}
CLEANFILES+= ${DOC}.${_curformat}
.if ${_cf} == "pdf"
CLEANFILES+= ${DOC}.fo ${DOC}.aux ${DOC}.log ${DOC}.out ${DOC}.pdf texput.log
.endif
.endfor
.MAIN: all
all: ${_docs}
${DOC}.html: ${SRCS}
${XSLTPROC} ${XSLTPROCOPTS} ${SLIDES_XSLHTML} ${.ALLSRC}
${DOC}.pdf: ${SRCS}
${XSLTPROC} ${XSLTPROCOPTS} ${SLIDES_XSLPRINT} ${.ALLSRC} > ${.TARGET:S/.pdf$/.fo/}
${PDFTEX_CMD} --interaction nonstopmode "&pdfxmltex" ${.TARGET:S/.pdf$/.fo/}