Re: Cross-referencing

Subject: Re: Cross-referencing
From: Matthias Clasen <mclasen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat Mar 29 10:26:17 1997 EST
Sorry, I just posted this under a wrong subject:

Thanks a lot, 

Tony Grahams style-sheet does exactly what I wanted - this list might 
become a great place to learn more about DSSSL ! 

Let me try to learn a bit more by making my first question a bit more
complicated. I would like the document (using the sample DTD posted by
Graham earlier in this thread):

<theorem id="theorem1">The earth is flat</theorem>
<theorem id="theorem2">The stork didn't really bring me</theorem>
<proof of="theorem2">If the stork brought me, I wouldn't need this
belly button</proof>
<proof of="theorem1">Someone told me</proof>

To be formatted roughly like this:

Theorem 1: The earth is flat

Theorem 2: The stork didn't really bring me

Proof: If the stork brought me, I wouldn't need this
belly button

Proof of 1: Someone told me

I.e. I want the `of ' part in proof to be omitted, if it is immediately
following the theorem. So the task is to determine if the node
before the `proof' element is the one the `of' attribute is referring
If I understood the semantics of the ipreced function in 10.2.3
the following modification of the proof-related part of Tony Grahams 
style-sheet should do what I want:

(element PROOF
	 (make paragraph
	       (make sequence
		        (if (equal? (attribute-string "OF") 
		                    (attribute-string  "ID" (ipreced))) 
             ; proof directly following theorem, omit number
                          (literal "Proof:" )
                          ; proof not directly following theorem
			  (with-mode theorem
				  (attribute-string "OF"))))

But I can't try this as Jade does not understand `ipreced'. This leads
to some questions: 

1) Is my idea correct ?

2) Is there a way to do it within the current limitations of Jade ?

3) All these questions about cross-referencing made me remember a
Latex-style called varioref which allows `intelligent pagereferences'
which print out
   text like `on this page', `on the next page', `on the previous page'.
   might even be aware if the reference and the referent are on one
   or not. 

   How would one handle things like that in DSSSL ? Is this possible at
   (since the page-breaks depend on the formatting algorithms which are
   part of DSSSL) ?

Looking forward for more enlightenment,


Current Thread