From a36b0de6c76714fc8826ce978b2fb5d90cfed2f7 Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Fri, 7 Sep 2001 10:21:41 +0000 Subject: [PATCH] Add two new options to our documentation infrastructure. TWO_SIDE - If defined, two sided output will be created. This means that new chapters will only start on odd numbered (aka right side, aka recto) pages and the headers and footers will be aligned appropriately for double sided paper. Blank pages may be added as needed. BOOK_OUTPUT - If defined, this will set all of the other print-output options that can significantly increase the build time, but make for much nicer looking output. To implement the two sided output, we need to override a TeX variable to control the behavior of the JadeTeX macro package. So this also introduces a TEXCMDS variable that can be set with additional TeX commands that should be run before processing the input TeX document. In the TWO_SIDE case, we simply set it to \def\PageTwoSide{1} --- share/mk/doc.docbook.mk | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/share/mk/doc.docbook.mk b/share/mk/doc.docbook.mk index e31aa2a075..1b849d5e09 100644 --- a/share/mk/doc.docbook.mk +++ b/share/mk/doc.docbook.mk @@ -1,5 +1,5 @@ # -# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.44 2001/08/22 22:30:26 nik Exp $ +# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.45 2001/08/23 07:59:06 murray Exp $ # # This include file handles building and installing of # DocBook documentation in the FreeBSD Documentation Project. @@ -65,6 +65,19 @@ # and 5th level section titles. This would change # "N.N.N.N Section title" into "Section Title" while # higher level sections are still printed with numbers. +# +# TWO_SIDE If defined, two sided output will be created. This +# means that new chapters will only start on odd +# numbered (aka right side, aka recto) pages and the +# headers and footers will be aligned appropriately +# for double sided paper. Blank pages may be added as +# needed. +# +# BOOK_OUTPUT A collection of options are set suitable for printing +# a book. This option may be an order of magnitude more +# CPU intensive than the default build. +# + # # Documents should use the += format to access these. # @@ -107,6 +120,17 @@ CSS_SHEET?= ${DOC_PREFIX}/share/misc/docbook.css PRINTOPTS?= -ioutput.print +.if defined(BOOK_OUTPUT) +NICE_HEADERS=1 +MIN_SECT_LABELS=1 +TWO_SIDE=1 +#WITH_FOOTNOTES=1 +#GEN_INDEX=1 +.endif +.if defined(TWO_SIDE) +PRINTOPTS+= -V %two-side% +TEXCMDS+= \def\PageTwoSide{1} +.endif .if defined(NICE_HEADERS) PRINTOPTS+= -ioutput.print.niceheaders .endif @@ -311,11 +335,11 @@ ${DOC}.tex-pdf: ${SRCS} ${IMAGES_PDF} ${INDEX_SGML} ${PRINT_INDEX} ${DOC}.dvi: ${DOC}.tex-ps @echo "==> TeX pass 1/3" - -tex "&jadetex" '\nonstopmode\input{${.ALLSRC}}' + -tex "&jadetex" '${TEXCMDS} \nonstopmode\input{${.ALLSRC}}' @echo "==> TeX pass 2/3" - -tex "&jadetex" '\nonstopmode\input{${.ALLSRC}}' + -tex "&jadetex" '${TEXCMDS} \nonstopmode\input{${.ALLSRC}}' @echo "==> TeX pass 3/3" - -tex "&jadetex" '\nonstopmode\input{${.ALLSRC}}' + -tex "&jadetex" '${TEXCMDS} \nonstopmode\input{${.ALLSRC}}' ${DOC}.pdf: ${DOC}.tex-pdf @echo "==> PDFTeX pass 1/3"