Re: entity representation in RTF

Subject: Re: entity representation in RTF
From: Chris Maden <crism@xxxxxxx>
Date: Tue, 14 Oct 1997 16:38:24 -0400
[Gerald Slot]
> What I actually want is that my alpha and beta entities are
> translated to symbols from the 'symbol font' and not as characters
> with the font 'Arial Greek'. Is there some way I can get this done?

There's not a good way to do this, but there are some hacky ways.  If
you want Greek alphabetics, and not mathematical symbols, than Symbol
isn't the right thing to use, but it's a legible approximation.

The proper way would be to use a query construction rule.  However,
that's not yet enabled in Jade.  The ugly way, then, is to loop over
the content of every text-bearing element:

(element PARA
	 (make paragraph

(define (process-text)
  (let p-t-loop ((this-node (node-list-first (children (current-node))))
		 (other-nodes (node-list-rest (children (current-node)))))
       (if (node-list-empty? this-node)
	   (sosofo-append (case (node-property 'class-name
				((sdata) (case (node-property 'system-data
					       (("[Agr   ]") (make sequence
								   font-family-name: "Symbol"
								   (literal "A")))
					       (("[Bgr   ]") (make sequence
								   font-family-name: "Symbol"
								   (literal "B")))
					       (("etc.") (make...))))
				(else (process-node-list this-node)))
			  (p-t-loop (node-list-first other-nodes)
				    (node-list-rest other-nodes))))))

If the Greek letters aren't SDATA entities, you can use a 'data-char
case instead of 'sdata; compare the characters themselves, and
(process-node-list) on any that aren't Greek in another else clause.

This is gross, and if you're distributing multi-lingual documents,
it's *far* better to ask your recipients to have support for the
appropriate languages.

<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL> <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>

 DSSSList info and archive:

Current Thread