This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Please forgive the blind fool
- To: docbook-apps at lists dot oasis-open dot org
- Subject: DOCBOOK-APPS: Please forgive the blind fool
- From: Devin Weaver <ktohg at tritarget dot com>
- Date: Thu, 15 Feb 2001 22:22:12 -0500
I almost certain these questions have been asked time and time again.
But I just couldn't find the post in the archive to address them. Maybe
I'm blind or incredibly impatient. So I ask you to please forgive me.
First I'll address some minor fixes I had to make.
1) The DSSSL for HTML rendering wouldn't print the revhistory block
but the print version did. I worked around this by overriding the
bookinfo definition in my custom.dsl like so:
(define (book-titlepage-recto-elements)
(list (normalize "title")
(normalize "subtitle")
(normalize "graphic")
(normalize "mediaobject")
(normalize "corpauthor")
(normalize "authorgroup")
(normalize "author")
(normalize "editor")
(normalize "copyright")
(normalize "abstract")
(normalize "legalnotice")
(normalize "revhistory")))
I hope I haven't violated any compatibility issues here.
2) TeX rendered callout improperly which I fixed using the
(define %callout-fancy-bug% #f)
Trick.
3) This one was just minor cosmetics. I wanted to divide a chapter of
a book with a small centered solid line. Many fiction based novels
would use this technique to separate a change in point-of-view but
wouldn't merit a new chapter because the subject matter was the same.
With Norman's suggestion I made a custom style for the bridgehead tag.
I was a little tough at first as I didn't want to break current
functionality but since the renderas="other" wasn't implemented I
thought it was safe to use. So now when ever I want a little line
separating paragraphs like this:
=====
I just place a <bridgehead renderas="other"/> into my document. And
the other renderas= tags still work (sect1...sect5). I've attached my
custom.dsl to depict how I did this. Once again I hope I haven't broken
some compatibility issue or something.
Now I'll head into the issues I couldn't work out.
1) <revhistory>. When rendering in html revhistory displays perfectly
as does when I use the rtf backend. However when I use the tex backend
it does fair to well. First is a spacing issue which I know was
address prior on this list. I even double checked the DSSSL code and
found a simple (if) block that handles this:
cell-before-column-margin: (if (equal? (print-backend) 'tex)
6pt
0pt)
Which I can't figure out why this doesn't seem to work. It should use
the 6pt but instead it not. I use the `-t tex' argument with openjade
is print-backend not expanding to 'tex for some reason?
2) <revremark>. In all the other rendering backends this seems to work
fine but in tex mode it doesn't wrap the text. So I once again dove
into the DSSSL spec and found that the paragraph Characteristic
`lines' defaults to wrap. And oddly enough the the revhistory element
prints revremark as a paragraph with no setting for `lines' Unless
there is some other Characteristic that's overriding this I can't see
how it not working. The wrapping works in rtf mode which uses the
print DSSSL's. Maybe a teTeX bug?
3) Page numbering using the print style sheets work fine but the TOC
doesn't seem to keep up. If I use the tex backend I get ?? for all the
TOC's page numbers. With the rtf backend I get i for the first page.
ii for the preface. 1 for the TOC page. 2 for the first chapter. and
then the rest stays at 2. I bet I missed a step. Maybe there is a post
processor there which will sync up the TOC (what's that
collateindex.pl?). Any helpful tips?
To the best of my knowladge I'm useing the following:
DocBook XML V4.1.2
DocBook DSSSL V1.61
OpenJade version "1.3"
OpenSP version "1.3.4"
TeX (Web2C 7.3.1) 3.14159
kpathsea version 3.3.1
pdfTeX (Web2C 7.3.1) 3.14159-0.13d
kpathsea version 3.3.1
$Id: jadetex.dtx,v 1.3 1999/07/07 23:57:15 clasen Exp $
Thanks in advance for bearing through such silliness.
--
Important letters which contain no errors will develop errors in the
mail. Corresponding errors will show up in the duplicate while the
Boss is reading it.
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY html.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
<!ENTITY print.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
]>
<style-sheet>
<!-- == Print Styles ============================================ -->
<style-specification id="commonprint" use="docbookprint">
<style-specification-body>
(element bridgehead
(if (equal? (attribute-string "renderas") (normalize "other"))
(make rule
orientation: 'horizontal
line-thickness: 2pt
length: 20pt
display-alignment: 'center
keep-with-next?: #t)
(let* ((renderas (attribute-string "renderas"))
(hlevel ;; the apparent section level;
(if renderas ;; if not real section level,
(string->number ;; then get the apparent level
(substring renderas 4 5)) ;; from "renderas",
(SECTLEVEL))) ;; else use the real level
(hs (HSIZE (- 4 hlevel))))
(make paragraph
font-family-name: %title-font-family%
font-weight: (if (< hlevel 5) 'bold 'medium)
font-posture: (if (< hlevel 5) 'upright 'italic)
font-size: hs
line-spacing: (* hs %line-spacing-factor%)
space-before: (* hs %head-before-factor%)
space-after: (* hs %head-after-factor%)
start-indent: (if (< hlevel 3)
0pt
%body-start-indent%)
first-line-start-indent: 0pt
quadding: %section-title-quadding%
keep-with-next?: #t
(process-children)))
))
</style-specification-body>
</style-specification>
<!-- ======== -->
<style-specification id="print" use="commonprint">
<style-specification-body>
<!-- Fixes bug in postscript output using callouts
(prints <10122> instead of (1)) -->
(define %callout-fancy-bug% #f)
</style-specification-body>
</style-specification>
<!-- ======== -->
<style-specification id="printrtf" use="commonprint">
<style-specification-body>
</style-specification-body>
</style-specification>
<!-- == HTML Styles ============================================= -->
<style-specification id="commonhtml" use="docbookhtml">
<style-specification-body>
(define %html-ext% ".html")
(define %shade-verbatim% #t)
(define %graphic-default-extension% "gif")
(define %admon-graphics% #t)
(define %gentext-nav-tblwidth% "100%")
(define %use-id-as-filename% #t)
(define (book-titlepage-recto-elements)
(list (normalize "title")
(normalize "subtitle")
(normalize "graphic")
(normalize "mediaobject")
(normalize "corpauthor")
(normalize "authorgroup")
(normalize "author")
(normalize "editor")
(normalize "copyright")
(normalize "abstract")
(normalize "legalnotice")
(normalize "revhistory")))
(element bridgehead
(if (equal? (attribute-string "renderas") (normalize "other"))
(make empty-element gi: "HR"
attributes: '(("WIDTH" "10%")
("SIZE" "3")
("ALIGN" "CENTER")
("NOSHADE" "NOSHADE")))
(let* ((renderas (attribute-string "renderas"))
(hlevel ;; the apparent section level;
(if renderas ;; if not real section level,
(string->number ;; then get the apparent level
(substring renderas 4 5)) ;; from "renderas",
(SECTLEVEL))) ;; else use the real level
(helem
(string-append "H" (number->string (+ hlevel 1)))))
(make element gi: helem
attributes: '(("CLASS" "BRIDGEHEAD"))
(process-children)))
))
</style-specification-body>
</style-specification>
<!-- ======== -->
<style-specification id="lynx" use="commonhtml">
<style-specification-body>
(define nochunks #t)
(define %callout-graphics-path% "images/callouts/")
(define %admon-graphics-path% "images/")
</style-specification-body>
</style-specification>
<!-- ======== -->
<style-specification id="html" use="commonhtml">
<style-specification-body>
(define %callout-graphics-path% "../images/callouts/")
(define %admon-graphics-path% "../images/")
</style-specification-body>
</style-specification>
<!-- ======== -->
<style-specification id="onehtml" use="commonhtml">
<style-specification-body>
(define nochunks #t)
(define %callout-graphics-path% "images/callouts/")
(define %admon-graphics-path% "images/")
</style-specification-body>
</style-specification>
<!-- == HOWTO Styles ============================================ -->
<style-specification id="howto" use="docbookhtml">
<style-specification-body>
(define %generate-article-toc% #t)
</style-specification-body>
</style-specification>
<!-- == DocBook DSSSL =========================================== -->
<external-specification id="docbookhtml" document="html.dsl">
<external-specification id="docbookprint" document="print.dsl">
</style-sheet>