Re: Basic footnotes - my answer (or beauty is in the eye of the beholder? NW)

Subject: Re: Basic footnotes - my answer (or beauty is in the eye of the beholder? NW)
From: Chris Maden <crism@xxxxxxx>
Date: Thu, 7 May 1998 11:18:53 -0400 (EDT)
[David Pawson]
> (element (section)
> 	(sosofo-append (process-children)
> 	(if (not (node-list-empty? (select-elements (descendants (current-node)) "FOOTNOTE")))
> 	          (make rule       
>                   orientation: 'horizontal) ;; but only if there are
notes.
> 	    (literal ""))
> 	  (with-mode footnotes 
> 	   (process-children))))
[...]
> (mode footnotes
>   (default (process-node-list (element-children))) ;; Mmmmm. But it
> works!!

Yes, but it's stupid.  I wrote that before I was clued into
(select-elements).  Do this instead:

(element section
	 (let ((footnotes (select-elements (descendants (current-node))
					   "FOOTNOTE")))
	   (sosofo-append (process-children)
			  (if (not (node-list-empty? footnotes))
			      (make rule
				    orientation: 'horizontal)
			      (empty-sosofo))
			  (with-mode footnotes
				     (process-node-list footnotes)))))

(mode footnotes
      (element footnote
	       (make paragraph)))

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • RE: Basic footnotes - my answer (or beauty is in the eye of the beholder? NW)
    • Pawson, David - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id GAA20496Thu, 7 May 1998 06:27:13 -0400 (EDT)
      • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA23416Thu, 7 May 1998 09:22:08 -0400 (EDT)
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA25870Thu, 7 May 1998 11:26:06 -0400 (EDT) <=
      • Tony Graham - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id OAA28519Thu, 7 May 1998 14:19:27 -0400 (EDT)
      • <Possible follow-ups>
      • Pawson, David - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA26408Thu, 7 May 1998 11:52:01 -0400 (EDT)