[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I hide something?
>>>>> "J" == Jorge Godoy <godoy@conectiva.com.br> writes:
J> Gregory Leblanc <gleblanc@cu-portland.edu> writes:
>> ok, I'm trying to make an example.docbook.sgml to replace the
>> example.sgml for linuxdoc. What I want to do is mark some of
>> the sections that I haven't had a chance to research as not
>> part of what should get rendered, but I can't remember how that
>> was accomplished. Anybody know? Grego
J> <!-- this is a comment that spreads across several lines -->
What I use in my book is a bit of DSL code which lets me generate the
draft version or a review version with a commandline flag. My DSL
file is attached and should have enough comments to let you figure
out what it is doing and where and why. Basically, if you call Jade
with the "-V STATUS=review" flag, you only get chapters which have
been tagged with status="review"; with no STATUS defined, you get
everything.
<!--
Docbook customizations by Gary Lawrence Murphy
with gracious assistance from more people than I can count.
$Id: tci.dsl,v 1.1 2000/05/08 19:57:53 garym Exp $
Copyright 2000 Teledynamics Communications Inc www.teledyn.com
$Log: tci.dsl,v $
Revision 1.1 2000/05/08 19:57:53 garym
I can't believe I forgot this file!
Revision 1.1 2000/04/26 05:57:27 garym
Initial revision
Revision 1.1 2000/04/06 14:10:59 garym
Added customized stylesheet
USE: If you process this stylesheet with ROOTID as #f, the whole
book will be formatted, if you set ROOTID to the ID of some chapter,
just that chapter will be formatted. But the whole book is loaded, so
xrefs and everything work correctly.
You can define ROOTID on the command line using the jade -V
switch. Chapters should have an identifier (id) of the form
chN-shortname, ie:
make JADEFLAGS="-V ROOTID=ch8-contrib" prokernel.rtf
TODO and QUESTIONS
1) How do you do that thing where you have one common section and then
the two different sections for print and html?
2) what sort of images will go into RTF files and how do I spec them
in the DSSSL?
LICENCE
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
-->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY html-ss PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
<!ENTITY print-ss PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
]>
<style-sheet>
<style-specification id="print" use="print-stylesheet">
<style-specification-body>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; customize for print formats
(define ROOTID #f)
(define STATUS #f)
(root
(if ROOTID (process-element-with-id ROOTID)
(process-children))
; filter on STATUS courtesy of Brandon Ibach ...
; (element chapter
; (if STATUS
; (if (equal? STATUS (attribute-string "status"))
; ($component$) (empty-sosofo))
; ($component$)))
(element chapter
(if (or (not STATUS) (equal? STATUS (attribute-string "status")))
($component$) (empty-sosofo)))
(define %generate-part-toc% #t)
(define %graphic-default-extension% "eps")
</style-specification-body>
</style-specification>
<style-specification id="html" use="html-stylesheet">
<style-specification-body>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; customize for html
(define ROOTID #f)
(define STATUS #f)
(root
(if ROOTID (process-element-with-id ROOTID)
(process-children))
; filter on STATUS courtesy of Brandon Ibach ...
; (element chapter
; (if STATUS
; (if (equal? STATUS (attribute-string "status"))
; ($component$) (empty-sosofo))
; ($component$)))
(element chapter
(if (or (not STATUS) (equal? STATUS (attribute-string "status")))
($component$) (empty-sosofo)))
(define %stylesheet% "docbook.css")
(define %link-mailto-url% "info@teledyn.com")
(define %graphic-default-extension% "gif")
(define %admon-graphics% #t)
(define %gentext-nav-tblwidth% "100%")
(define %generate-article-toc% #t)
(define %generate-legalnotice-link% #t)
(define %generate-part-toc% #t)
(define %root-filename% "index")
(define %html-ext% ".html")
(define %html-pubid% "-//IETF//DTD HTML//EN")
(define %html-header-tags%
(list
'(("META" ("NAME" "Description")
("CONTENT" "The Linux Kernel Programming Book a collaborative work by industrial and open source engineers to create a functional specifications guide to the Linux 2.4 Kernel")))
'(("META" ("HTTP-EQUIV" "Content-Type")
("CONTENT" "text/html;charset=IS0-8859-1")))
))
(define %body-attr%
(list
(list "CLASS" "TCI")
(list "CLASS" "ARTICLE")
))
(define %html-index% #t)
(define %html-index-filename% "SGML.index")
(define %use-id-as-filename% #t)
(define %titlepage-in-info-order% #f)
(define %author-othername-in-middle% #t)
(define %shade-verbatim% #t)
(define %use-output-dir% #t)
(define %generate-part-titlepage% #t)
(define %gentext-nav-use-tables% #t)
</style-specification-body>
</style-specification>
<external-specification id="html-stylesheet" document="html-ss">
<external-specification id="print-stylesheet" document="print-ss">
</style-sheet>
--
Gary Lawrence Murphy <garym@linux.ca>: office voice/fax: 01 519 4222723
TCI - Business Innovations through Open Source : http://www.teledyn.com
Canadian Co-ordinators for Bynari International : http://ca.bynari.net/
Free Internet for a Free O/S? - http://www.teledyn.com/products/FreeWWW/