From: Andrew R. <aro...@ya...> - 2005-01-04 16:10:28
|
At 09:20 AM 4/01/2005 +0100, you wrote: >* Andrew Roach <aro...@ya...> [2005-01-04 12:32]: > > > I wonder if things like the boldface and italics would not be better > handed > > with their own escape ? For example, #u and #d shift into super-script and > > sub-script now. Maybe > > > > #i for italics > > #m for medium or #n for normal > > #b for bold > > > > might not be a better way to do it ? > >Both schemes are fine with me. Just a question: which escape sequence would >we use for upright, since #u is already taken? Good point... #n for normal ? > > That way we avoid an incompatibility bomb with the #fi. Presently #fi > > always maps to a "face" (sans-serif-italic) rather than a styling. If we > > keep #f for face or family changes, backward compatibility can be > > maintained. Then #i would become italic, so: > > > > "#fr This is serif, #b now serif-bold, #m and back to serif #i and > > italicised" > > > > Another possibility, which does not have to be mutually exclusive I might > > point out, could be using a limited set of html-like tags: > > > > "#fr This is serif, <b>now serif-bold</b>, and back to serif <i>and > > italicised</i>" > >I like the XML syntax above because it has explicit closing tags. In SGML, >closing tags are not mandatory, what makes the parser quite complicated. > >At any rate, your idea is clever. We have just to have the manpower to >implement it. Maybe it's because it's 2AM and I'm not really thinking too clearly, but I wonder how difficult it really would be to write a parser ? I am thinking that could be easier than other parts of this API expansion. I don't think we want a full parser, with 100% strict syntax - it would be too painful to loose > and < sigs, and have to replace them with > and <. But a simple parser which "tokenised" things we recognise like <b> <i> etc..., by my way of thinking would be no harder than the current escape sequences. -Andrew |