Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jun 2001 17:53:15 +0100
From:      Nik Clayton <nik@FreeBSD.org>
To:        Nik Clayton <nik@FreeBSD.org>, doc@freebsd.org
Subject:   Re: CSS support
Message-ID:  <0106161753150X.01838@clan.nothing-going-on.org>
In-Reply-To: <0106161720450R.01838@clan.nothing-going-on.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 16 June 2001  5:20 pm, Nik Clayton wrote:
> Attached is a patch to freebsd.dsl and doc.docbook.mk, and a new file,
> docbook.css.

One day I'm going to write an MTA with only one new function -- it'll scan 
every outgoing message for variants of "attachment", and if there's nothing 
attached it'll say "Do you really want to do this?"

This time, they're really attached.

N
- -- 
FreeBSD: The Power to Serve             http://www.freebsd.org/
FreeBSD Documentation Project           http://www.freebsd.org/docproj/

          --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjsrjvsACgkQk6gHZCw343X0BQCeI/jxVFbf2yqKofnsHYy1diuy
KSgAnjFIxupJ4nKWXQyZ3cdj2MWiAx7K
=7KXK
-----END PGP SIGNATURE-----

[-- Attachment #2 --]
/*
 * Copyright (c) 2001 The FreeBSD Documentation Project
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * $FreeBSD$
 */

BODY ADDRESS {
	line-height: 1.3;
	margin: .6em 0;
}

BODY BLOCKQUOTE {
	margin-top: .75em;
	line-height: 1.5;
	margin-bottom: .75em;
}

HTML BODY {
	margin: 1em 8% 1em 10%;
	line-height: 1.5;
}

.LEGALNOTICE {
	font-size: small;
	font-variant: small-caps;
}

BODY DD {
	line-height: 1.2;
	margin: 0 0 0 5%;
}

BODY DIV {
	margin: 0;
}

BODY DL {
	margin: .8em 0;
}

BODY DT {
	margin: .3em 0 0 0;
	line-height: 1.2;
}

BODY FORM {
	margin: .6em 0;
}

H1, H2, H3, H4, H5, H6,
DIV.EXAMPLE P B,
.QUESTION,
DIV.TABLE P B,
DIV.PROCEDURE P B {
	color: #990000;
}

BODY H1 {
	margin: .8em 0 0 -4%;
	line-height: 1.3;
}

BODY H2 {
	margin: .8em 0 0 -4%;
	line-height: 1.3;
}

BODY H3 {
	margin: .8em 0 0 -3%;
	line-height: 1.3;
}

BODY H4 {
	margin: .8em 0 0 -3%;
	line-height: 1.3;
}

BODY H5 {
	margin: .8em 0 0 -2%;
	line-height: 1.3;
}

BODY H6 {
	margin: .8em 0 0 -1%;
	line-height: 1.3;
}

BODY HR {
	margin: .6em
}

BODY IMG.NAVHEADER {
	margin: 0 0 0 -4%;
}

BODY LI {
	margin: .6em 0
}

BODY OL {
	margin: 0 0 0 5%;
	line-height: 1.5;
}

BODY P {
	margin: .6em 0;
	line-height: 1.5;
}

BODY PRE {
	margin: .75em 0;
	line-height: 1.2;
}

BODY TD {
	line-height: 1.3
}

BODY TH {
	line-height: 1.3;
}

BODY UL, BODY DIR, BODY MENU {
	margin: 0 0 0 5%;
	line-height: 1.5;
}

HTML {
	margin: 0; 
	padding: 0;
}

BODY PRE {
	color: #461b7e;
}

.FILENAME {
	color: #007a00;
}

BODY H1, BODY H2, BODY H3, BODY H4, BODY H5, BODY H6 {
	margin-left: 0
} 

.GUIMENU, .GUIMENUITEM, .GUISUBMENU,
.GUILABEL, .INTERFACE, .GUIBUTTON,
.SHORTCUT, .SHORTCUT .KEYCAP {
	background-color: #F0F0F0;
}

.ACCEL {
	background-color: #F0F0F0;
	text-decoration: underline;
} 

[-- Attachment #3 --]
Index: share/sgml/freebsd.dsl
===================================================================
RCS file: /home/ncvs/doc/share/sgml/freebsd.dsl,v
retrieving revision 1.31
diff -u -r1.31 freebsd.dsl
--- share/sgml/freebsd.dsl	2001/06/02 23:02:13	1.31
+++ share/sgml/freebsd.dsl	2001/06/16 14:55:14
@@ -74,6 +74,14 @@
         (define ($email-footer$)
           (empty-sosofo))
 
+	(define %stylesheet%
+	  "docbook.css")
+
         <!-- This code handles displaying $email-footer$ at the bottom
              of each page.
 
@@ -373,28 +375,6 @@
       (element devicename ($mono-seq$))
       (element maketarget ($mono-seq$))
       (element makevar ($mono-seq$))
-
-      <!-- For the HTML version, display the questions in a bigger, bolder
-           font. -->
-
-      <![ %output.html; [
-      (element question
-        (let* ((chlist   (children (current-node)))
-               (firstch  (node-list-first chlist))
-               (restch   (node-list-rest chlist)))
-          (make element gi: "DIV"
-                attributes: (list (list "CLASS" (gi)))
-                (make element gi: "P" 
-                      (make element gi: "BIG"
-                            (make element gi: "A"
-                                  attributes: (list (list "NAME" (element-id)))
-                                 (empty-sosofo))
-                             (make element gi: "B"
-                                   (literal (question-answer-label
-                                            (current-node)) " ")
-                                    (process-node-list (children firstch)))))
-                (process-node-list restch))))
-      ]]>
 
       <!-- Override generate-anchor.  This is used to generate a unique ID for
            each element that can be linked to.  The element-id function calls
Index: share/mk/doc.docbook.mk
===================================================================
RCS file: /home/ncvs/doc/share/mk/doc.docbook.mk,v
retrieving revision 1.32
diff -u -r1.32 doc.docbook.mk
--- share/mk/doc.docbook.mk	2001/06/16 14:11:52	1.32
+++ share/mk/doc.docbook.mk	2001/06/16 14:55:15
@@ -46,6 +46,9 @@
 #                       of dependencies for source files, and collateindex.pl
 #                       will be run to generate index.sgml.
 #
+#	CSS_SHEET	Full path to a CSS stylesheet suitable for DocBook.
+#			Default is ${DOC_PREFIX}/share/misc/docbook.css
+#
 # Documents should use the += format to access these.
 #
 
@@ -82,6 +85,8 @@
 
 KNOWN_FORMATS=	html html.tar html-split html-split.tar txt rtf ps pdf tex dvi tar pdb
 
+CSS_SHEET?=	${DOC_PREFIX}/share/misc/docbook.css
+
 # ------------------------------------------------------------------------
 #
 # Look at ${FORMATS} and work out which documents need to be generated.
@@ -218,13 +223,13 @@
 
 all: ${_docs}
 
-index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDEX_SGML} ${HTML_SPLIT_INDEX}
+index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDEX_SGML} ${HTML_SPLIT_INDEX} docbook.css
 	${JADE} -V html-manifest -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC}
 .if !defined(NO_TIDY)
 	-tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest`
 .endif
 
-${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDEX_SGML} ${HTML_INDEX}
+${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDEX_SGML} ${HTML_INDEX} docbook.css
 	${JADE} -ioutput.html -ioutput.html.images -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > ${.TARGET} || (rm -f ${.TARGET} && false)
 .if !defined(NO_TIDY)
 	-tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET}
@@ -238,11 +243,13 @@
 	tar cf ${.TARGET} `xargs < HTML.manifest`
 	tar uf ${.TARGET} ${IMAGES_LIB}
 	tar uf ${.TARGET} ${IMAGES_PNG}
+	tar uf ${.TARGET} docbook.css
 
 ${DOC}.html.tar: ${DOC}.html
 	tar cf ${.TARGET} ${DOC}.html
 	tar uf ${.TARGET} ${LOCAL_IMAGES_LIB}
 	tar uf ${.TARGET} ${IMAGES_PNG}
+	tar uf ${.TARGET} docbook.css
 
 ${DOC}.txt: ${DOC}.html-text
 	links -dump ${.ALLSRC} > ${.TARGET}
@@ -410,6 +417,7 @@
 install-${_cf}: index.html
 	@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
 	${INSTALL_DOCS} `xargs < HTML.manifest` ${DESTDIR}
+	${INSTALL_DOCS} docbook.css ${DESTDIR}
 	@if [ -f ln*.html ]; then \
 		${INSTALL_DOCS} ln*.html ${DESTDIR}; \
 	fi
@@ -440,6 +448,7 @@
 install-${_cf}: ${DOC}.${_cf}
 	@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
 	${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
+	${INSTALL_DOCS} docbook.css ${DESTDIR}
 .for _curimage in ${IMAGES_LIB}
 	@[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || mkdir -p ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
 	${INSTALL_DOCS} ${LOCAL_IMAGES_LIB_DIR}/${_curimage} ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
@@ -499,11 +508,13 @@
 	@cp HTML.manifest PLIST
 	@for images_png in ${IMAGES_PNG}; do \
 		echo $$images_png >> PLIST; \
+		echo docbook.css >> PLIST; \
 	done
 .elif ${_cf} == "html"
 	@echo ${DOC}.${_curformat} > PLIST
 	@for images_png in ${IMAGES_PNG}; do \
 		echo $$images_png >> PLIST; \
+		echo docbook.css >> PLIST; \
 	done
 .else
 	@echo ${DOC}.${_curformat} > PLIST
@@ -515,3 +526,6 @@
 		-d -"FDP ${.CURDIR:T} ${_curformat} package" -f PLIST \
 		-p ${DESTDIR} ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz
 .endfor
+
+docbook.css:
+	cp ${CSS_SHEET} ${.CURDIR}/docbook.css
\ No newline at end of file
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0106161753150X.01838>