This commit is contained in:
gferg 2002-12-04 19:05:41 +00:00
parent 270b3e1907
commit c66907243f
2 changed files with 95 additions and 24 deletions

View File

@ -1,23 +1,46 @@
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!DOCTYPE style-sheet PUBLIC
"-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % html "IGNORE">
<![%html;[
<!ENTITY % print "IGNORE">
<!ENTITY docbook.dsl SYSTEM "docbook.dsl" CDATA dsssl>
<!ENTITY docbook.dsl PUBLIC
"-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN"
CDATA dsssl>
]]>
<!ENTITY % print "INCLUDE">
<![%print;[
<!ENTITY docbook.dsl SYSTEM "docbook.dsl" CDATA dsssl>
<!ENTITY docbook.dsl PUBLIC
"-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN"
CDATA dsssl>
]]>
]>
<style-sheet>
;; ------------------------------------------------------------------------
;; ldp.dsl - LDP Customized DSSSL Stylesheet
;; v1.10, 2002-12-04
;; Copyright (C) 2002-2000
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;; ------------------------------------------------------------------------
<style-specification id="print" use="docbook">
<style-specification-body>
;; ==============================
;; customize the print stylesheet
;; ==============================
(declare-characteristic preserve-sdata?
;; this is necessary because right now jadetex does not understand
@ -76,15 +99,34 @@
;; Use graphics in admonitions?
#f)
(define %default-quadding%
;; Full justification.
'justify)
(define (book-titlepage-verso-elements)
;;added publisher, releaseinfo to the default list
(list (normalize "title")
(normalize "subtitle")
(normalize "corpauthor")
(normalize "authorgroup")
(normalize "author")
(normalize "publisher")
(normalize "releaseinfo")
(normalize "editor")
(normalize "edition")
(normalize "pubdate")
(normalize "copyright")
(normalize "abstract")
(normalize "legalnotice")
(normalize "revhistory")))
</style-specification-body>
</style-specification>
<!--
;; ===================================================
;; customize the html stylesheet; borrowed from Cygnus
;; at http://sourceware.cygnus.com/ (cygnus-both.dsl)
;; ===================================================
;; customize the html stylesheet; parts borrowed from
;; Cygnus at http://sourceware.cygnus.com/ (cygnus-both.dsl)
-->
<style-specification id="html" use="docbook">
@ -183,6 +225,9 @@
(define (book-titlepage-recto-elements)
;; elements on a book's titlepage
;; note: added revhistory to the default list
;; note: added othercredit to the default list
;; note: added releaseinfo to the default list
;; note: added publisher to the default list
(list (normalize "title")
(normalize "subtitle")
(normalize "graphic")
@ -190,6 +235,9 @@
(normalize "corpauthor")
(normalize "authorgroup")
(normalize "author")
(normalize "othercredit")
(normalize "releaseinfo")
(normalize "publisher")
(normalize "editor")
(normalize "copyright")
(normalize "pubdate")
@ -212,26 +260,33 @@
(normalize "abstract")
(normalize "legalnotice")))
(mode article-titlepage-recto-mode
(element contrib
(define (process-contrib #!optional (sosofo (process-children)))
;; print out with othercredit information; for translators, etc.
(make sequence
(make element gi: "SPAN"
attributes: (list (list "CLASS" (gi)))
(process-children))))
(element othercredit
(define (process-othercredit #!optional (sosofo (process-children)))
;; print out othercredit information; for translators, etc.
(let ((author-name (author-string))
(author-contrib (select-elements (children (current-node))
(normalize "contrib"))))
(make element gi: "P"
attributes: (list (list "CLASS" (gi)))
(make element gi: "B"
(make element gi: "B"
(literal author-name)
(literal " - "))
(process-node-list author-contrib))))
(mode article-titlepage-recto-mode
(element contrib (process-contrib))
(element othercredit (process-othercredit))
)
(mode book-titlepage-recto-mode
(element contrib (process-contrib))
(element othercredit (process-othercredit))
)
(define (article-title nd)
@ -251,12 +306,10 @@
""
(node-list-first titles))))
(mode subtitle-mode
;; do not print subtitle on subsequent pages
(element subtitle (empty-sosofo)))
;; Redefinition of $verbatim-display$
;; Origin: dbverb.dsl
;; Different foreground and background colors for verbatim elements

View File

@ -1,11 +1,29 @@
#!/usr/bin/perl
#
# ldp_mk - create all various output forms needed for the LDP from SGML file
# ldp_mk - create all output forms needed for the LDP from SGML/XML file
# Copyright (C) 2002-2000 - Greg Ferguson (gferg@metalab.unc.edu)
#
# gferg@sgi.com / Ferg
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LOG:
# 02Aug2000 - added cmd-line options and index creation (gferg)
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# usage:
#
# ldp_mk -style <stylesheet> -txt <txt_filter> -mk_index <file>.sgml
#
# where:
# <stylesheet> - fullpath to a DSSSL stylesheet
# <txt_filter> - one of the following: lynx, w3m, html2text
#
if($ARGV[0] eq '') {
@ -19,7 +37,7 @@ my($_jade) = 'jade-1.2.1';
my($dtd) = 'SGML';
my($dcl) = '';
my($linuxdoc) = 1;
my($create_index) = 1;
my($create_index) = 0;
my($html_only) = 0;
my($cmd, $fname, $fname_wo_ext, $txt_filter, $style, $s, $db_v, $x) = '';
my(@flines) = ();
@ -34,9 +52,9 @@ while(1) {
shift(@ARGV);
$txt_filter = $ARGV[0];
shift(@ARGV);
} elsif ($ARGV[0] eq "-no_index") {
} elsif ($ARGV[0] eq "-mk_index") {
shift(@ARGV);
$create_index = 0;
$create_index = 1;
} elsif ($ARGV[0] eq "-html_only") {
shift(@ARGV);
$html_only = 1;
@ -389,7 +407,7 @@ sub usage {
print "\n\n",
"usage: ldp_mk ",
"-style <stylesheet> -txt <txt_filter> -no_index <file>.sgml\n\n",
"-style <stylesheet> -txt <txt_filter> -mk_index <file>.sgml\n\n",
" where:\n",
" <stylesheet> - fullpath to a DSSSL stylesheet\n",
" <txt_filter> - one of the following: lynx, w3m, html2text\n";