This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Problems with colour when going to a new page
- To: docbook-apps at lists dot oasis-open dot org
- Subject: DOCBOOK-APPS: Problems with colour when going to a new page
- From: Colin Paul Adams <colin at colina dot demon dot co dot uk>
- Date: Tue, 03 Oct 2000 14:42:22 +0100
I don't know if it's the way I'm defining how emphasis is being
handled, but I have a problem that the colour changes when a block is
displayed across a page boundary.
I'm using pdfjadetex to process DSSSL 1.57 stylesheets. Here is my
stylesheet driver, which sets the colours for the various emphasis roles:
----- cut here ------
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY docbook.dsl SYSTEM "/usr/lib/sgml/docbook/print/docbook.dsl" CDATA dsssl>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
(define %generate-article-toc%
;; Should a Table of Contents be produced for Articles?
;; If true, a Table of Contents will be generated for each 'Article'.
#f)
(define %generate-article-titlepage%
;; Should an article title page be produced?
#f)
(element emphasis
(cond
( (equal? (attribute-string "role") "crebin")
(let* ((colr-space (color-space
"ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
(green (color colr-space 0 1 0)))
(make sequence
font-posture: 'italic
color: green
(process-children))))
( (equal? (attribute-string "role") "borrow")
(let* ((colr-space (color-space
"ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
(red (color colr-space 1 0 0)))
(make sequence
font-weight: 'bold
color: red
(process-children))))
(else
(let* ((colr-space (color-space
"ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
(cyan (color colr-space 0.1 0.7 1)))
(make sequence
font-posture: 'italic
color: cyan
(process-children))))))
(define title-style
(style
font-family-name: %title-font-family%
font-weight: 'bold
quadding: 'start))
(define ($lowtitlewithsosofo$ tlevel sosofo)
(let ((hs (HSIZE (- 3 tlevel))))
(let* ((colr-space (color-space
"ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
(black (color colr-space 0 0 0)))
(make paragraph
font-family-name: %title-font-family%
font-weight: 'bold
font-size: hs
color: black
line-spacing: (* hs %line-spacing-factor%)
space-before: (* hs %head-before-factor%)
space-after: (* hs %head-after-factor%)
start-indent: %body-start-indent%
quadding: 'start
keep-with-next?: #t
heading-level: (if %generate-heading-level% (+ tlevel 2) 0)
sosofo))))
(define ($lowtitle$ tlevel)
($lowtitlewithsosofo$ tlevel (process-children)))
(define ($runinhead$)
(let* ((title (data (current-node)))
(titlelen (string-length title))
(lastchar (string-ref title (- titlelen 1)))
(punct (if (member lastchar %content-title-end-punct%)
""
%default-title-end-punct%)))
(make sequence
font-weight: 'bold
(process-children)
(literal punct " "))))
(element title ($lowtitle$ 2)) ;; the default TITLE format
(element titleabbrev (empty-sosofo))
(element subtitle (empty-sosofo))
(mode title-mode
(element title
(process-children)))
(define %section-autolabel%
;; Are sections enumerated?
#f)
(define %paper-type%
;; Name of paper type
;; "A4"
"A4")
(define %two-side%
;; Is two-sided output being produced?
#f)
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="docbook.dsl">
</style-sheet>
----- cut here ------
and here is the XML source code:
----- cut here ------
<?xml version="1.0" standalone="no"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://docbook.org/xml/4.1.2/docbookx.dtd">
<article>
<title>Baase Illiam Dhone</title>
<subtitle>The death of Willam Christian</subtitle>
<para>The Manx text is in normal type.</para>
<para><emphasis>My literal translation is in italic cyan type.</emphasis></para>
<para><emphasis role="borrow">George Borrow's translation is in bold
red type.</emphasis></para>
<para><emphasis role="crebin">John Crebbin's 1774 translation is in
italic green type.</emphasis></para>
<orderedlist>
<listitem>
<literallayout>
Quoi yinnagh e hreishteil ayns ooashley ny pooar
Ayns aegid ny aalid ny ayns kinney mooar
Son troo farg as goanlys ver mow dooiney erbee
As ta dty vaase Illiam Dhone brishey nyn gree.
</literallayout>
<literallayout><emphasis>
Who wouldst (her) trust in worship of authority
In youth's beauty or in great kinney(?)
For envy, anger and spite will bring waste to any man
And thy death, Illiam Dhone, is breaking our heart.
</emphasis></literallayout>
<literallayout><emphasis role="borrow">
Let no one in greatness too confident be,
Nor trust in his kindred though high their degree;
For envy and rage will lay any man low:
Thy murder, Brown William, fills Mona with woe.
</emphasis></literallayout>
<literallayout><emphasis role="crebin">
In so shifting a scene who would confidence place
In family, youth power, or personal grace?
No character's proof against enmity foul:
And thy fate, Illiam Dhone, sickens my soul.
</emphasis></literallayout>
</listitem>
<listitem>
<literallayout>
V'ou dty Resour Vannin, ard-ghooiney ny cheerey
V'ou gowit son dooiney seyr as dooiney creeney
As she jeh dty gellal vie cha row shin skee
Agh ta dty vaase Illiam Mooar brishey nyn gree.
</literallayout>
<literallayout><emphasis>
Thou wast the Receiver of Mann, a great patriot
Thou wast taken for a gentleman and a wise man
And yes of thy good rule we were not weary
But thy death, Illiam Mooar, is breaking our heart.
</emphasis></literallayout>
<literallayout><emphasis role="borrow">
Thou wast the Receiver of Mona's fair state,
Thy conduct was noble, thy wisdom was great,
And ne'er of thy rule did she weariness show:
Thy murder, Brown William, fills Mona with woe.
</emphasis></literallayout>
<literallayout><emphasis role="crebin">
You were Derbys; Receiver of patriot zeal,
Replete with good sense, and reputed genteel;
Your justice applauded by the young and the old:
And thy fate, Illiam Dhone, sickens my soul.
</emphasis></literallayout>
</listitem>
<listitem>
<literallayout>
V'ou laue yesh yn Eearley sooill yesy y theay
Shen hug da dty noidyn gatt whesh dt'oi ayns feah
She troo farg as goanlys ver mow dooiney erbee
As ta dty vaase Illiam Mooar brishey nyn gree.
</literallayout>
<literallayout><emphasis>
Thou wast the right hand of Earley and the right eye of the people
These gave to him thy enemies swelling so much against thee in feah (?)
Yes envy, anger and spite will bring waste to any man
And thy death, Illiam Mooar, is breaking our heart.
</emphasis>
</literallayout>
<literallayout><emphasis role="borrow">
Thy right hand was Earley, and Theah thy right eye;
Thy state caused thy foemen with rage to swell high;
And envy and rage will lay any man low;
Thy murder, Brown William, fills Mona with woe.
</emphasis></literallayout>
</listitem>
<listitem>
<literallayout>
B'aalin dty state thallooin ec Runnysvie
B'eunyssagh dty gharaghyn, b'ooasle dty hie
She troo farg as goanlys ver mow dooiney erbee
Agh ta dty vaase Illiam Dhone brishey nyn gree.
</literallayout>
<literallayout><emphasis>
How (? - I can't find b') lovely thy (farm?) of land at Ronaldsway
How delightful thy gardens, how noble thy house
Yes envy, anger and spite will bring waste to any man
And thy death, Illiam Dhone, is breaking our heart.
</emphasis></literallayout>
<literallayout><emphasis role="borrow">
How blest thy condition in fair Ronaldsway!
Thy mansion, how stately! thy garden, how gay!
But oh! what disasters from envy do flaw:
Thy murder, Brown William, fills Mona with woe.
</emphasis></literallayout>
</listitem>
<listitem>
<literallayout>
V'ad er gra dy daink screeunyn dy chort oody baase
Lesh feanishyn foalsey va follym dyn graase
Yn ving v'er ny h'agglagh dy beign dty 'aagail mooie
As ta dty vaase Illiam Mooar brishey nyn gree.
</literallayout>
<literallayout><emphasis>
Letters have said to have come to put thee to death
With false witnesses (who) were empty without grace
The jury was fearful to would be thy leave out
And thy death, Illiam Mooar, is breaking our heart.
</emphasis>
</literallayout>
<literallayout><emphasis role="borrow">
'Twas said, at thy tfig by men void of faith,
The king, by a letter, demanded thy death:
The jury was frightened, and dared. not say. " No, !"
Thy murder, Brown William, fills Mona with woe.
</emphasis>
</literallayout>
</listitem>
<listitem>
<literallayout>
As nagh dhere Clein Colead keoi nyn aigney hene
Tra whooar ad dy lhie 'syn floor Chlein Christeen
She troo farg as goanlys ver mow dooiney erbee
As ta dty vaase Illiam Dhone brishey nyn gree.
</literallayout>
<literallayout><emphasis>
And not bulling (? dher) wild Clan Colead their own mind
When haughty (?, begrudging?) they to lie down in the flour (??flooyr) of Clan Christeen.
Yes envy, anger and spite will bring waste to any man
And thy death, Illiam Dhone, is breaking our heart.
</emphasis>
</literallayout>
<literallayout><emphasis role="borrow">
The clan of wild Colead could ne'er be at rest
Whilst the race, of Christeen their own acres possessed;
And envy and spite will bring any man low:
Thy murder, Brown William, fills Mona with woe.
</emphasis>
</literallayout>
<literallayout>
She oo va dty vaaderagh as dty ghooiney foalley
Hug oo saynt da Runnysvie myr roïe da Logh Molley
Er garrey-feeyney Naboth va'n geantagh cloie
As ta dty vaase Illiam Mooar brishey nyn gree.
</literallayout>
<literallayout><emphasis>
Yes you were thy fornicater and thy false man.
You gave covetousness to him Ronaldsway like before now to him Logh Molley (Lake of Sweetness)
On the work of Naboth's vines was the tragedy (?) played
And thy death, Illiam Mooar, is breaking our heart.
</emphasis>
</literallayout>
<literallayout><emphasis role="borrow">
A band of adulterers, curst and unholy,
For Ronaldsway lust, as they did for Logh Molley;
Of Naboth the tagedy's played here anew:
Thy murder, Brown William, fills Mona with woe.
</emphasis>
</literallayout>
<literallayout>
Nagh byrrys enn dooinyn nagh hoill eshyn baase
Son fer dy dug laue ayns d'uill cha ren rieau grayse
Agh feoghey as creenagh myr yn vaskad vuigh
As ta dty vaase Illiam Dhone brishey nyn gree.
</literallayout>
<literallayout><emphasis>
Not ? know/feel to us did not deserve him death
For a man to put a hand in thy blood make not ever grace
But ? and withered like the too yellow basket (?)
And thy death, Illiam Dhone, is breaking our heart.
</emphasis>
</literallayout>
<literallayout><emphasis role="borrow">
Not one of the band but received his just need,
Who acted a part in that damnable deed;
To dwindle away the whole band was not slow:
Thy murder, Brown William, fills Mona with woe.
</emphasis></literallayout>
</listitem>
<listitem>
<literallayout>
Gow uss dys manishter ny callaghyn doo
As eie son Clein Colcad der' vrishys dty ghoo
Ta'n ennym shen caillt venish Manninee chooie
As ta dty vaase Illiam Mooar brishey nyn gree.
</literallayout>
<literallayout><emphasis>
Take thyself to (?? Manishter (master?) of the Black Callaghan??)
And shout for Clan Colcad until broke thy word/fame
The name is so lost their ?Manninee most fit
And thy death, Illiam Mooar, is breaking our heart.
</emphasis>
</literallayout>
<literallayout><emphasis role="borrow">
To Callaghyn-doo, and to Vannyster roam,
And call on the Coleael till hoarse ye become:
Gone, gone is the name so well known long ago;
Thy murder, Brown William, fills Mona with woe.
</emphasis></literallayout>
</listitem>
</orderedlist>
</article>
----- cut here ------
When one of the literallayout blocks has to be split over a page
boundary, then the colour in the resulting PDF file changes.
Is it my DSSSL code, or is it a bug in the 1.57 stylesheets?
If the former, what am I doing wrong?
--
Colin Paul Adams
Preston Lancashire