[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: RFC: verse tag markup and IE
From: |
Vadim Nasardinov |
Subject: |
Re: [emacs-wiki-discuss] Re: RFC: verse tag markup and IE |
Date: |
Tue, 4 Jan 2005 10:29:22 -0500 |
User-agent: |
KMail/1.5.4 |
On Tuesday 04 January 2005 00:44, Sacha Chua wrote:
> >> 2. Include a configurable option to put the "br" tag at the end
> >> of each line within verse tags, disabled by default.
> >
> > That sounds like a totally useless knob, but that may be just me.
>
> We have a fair number of non-CSS-capable browser users out here,
> myself included. I rarely use the <verse> tag, but occasionally post
> quoted snippets from mail. Does that count as a valid use for such a
> knob? <grin>
First of all, let me prefix my comments by saying that you guys have
done and are doing a terrific job with emacs-wiki and planner --
way better than anything I could have written myself.
On to your question.
Yes, it's a valid use case. Is the proposed knob the best way to
address this use case?
If the intention is to provide two distinct output markups -- one for
CSS-enabled and another one for disabled browsers -- then a better
abstraction would be to give users a single switch that does just
that. Toggle it to "css-on" or "css-off" depending on your target
audience.
Now, I may have misread Michael's original post, but here's what it
sounded like to me: You want to publish for a CSS-challenged browser,
go ahead and toggle these fifty switches over here. (Because
special-casing the <br> tag is just the first step down a slippery
slope.)
So, if you anticipate having to support many corner cases like <br>,
then providing a single CSS on/off switch might be a good idea.
As long as we're only dealing with this pesky <br> thingy though, an
arguably better idea is to try and output markup that degrades
gracefully. I'm not convinced yet that this is impossible. As far as
I can tell, the purpose of the <verse> tag is to produce output markup
that maintains line breaks but doesn't use a fixed-width font.
The following works regardless of CSS:
| <p>
| `Twas brillig, and the slithy toves<br/>
| Did gyre and gimble in the wabe:<br/>
| All mimsy were the borogoves,<br/>
| And the mome raths outgrabe<br/>
| </p>
Michael says this is not valid XHTML though. Ok.
The following works, but doesn't meet the requirement of displaying in
a non-fixed-width font on non-CSS browsers. As far as I'm concerned,
not a big deal.
| <pre class="verse">
| `Twas brillig, and the slithy toves
| Did gyre and gimble in the wabe:
| All mimsy were the borogoves,
| And the mome raths outgrabe
| </pre>
If the non-fixed-width font requirement is crucial for some reason,
then this should work:
| <blockquote class="verse">
| <p>`Twas brillig, and the slithy toves</p>
| <p> Did gyre and gimble in the wabe:</p>
| <p>All mimsy were the borogoves,</p>
| <p>And the mome raths outgrabe</p>
| </blockquote>
Again, the linespacing would be less than ideal on non-CSS browsers,
but so what.
Speaking more generally, if you are going to support two distinct
outputs, then a more systematic approach is in order, IMHO. Something
like a two-phase transformation. Firstly, parse the wiki markup into
an AST. Secondly, transform the AST into the final output markup,
based on the user's stated preferences.
Let's see if I can summarize this.
Special-casing the <verse> case strikes me as suboptimal.
On the flip side, being able to produce different outputs a la Muse is
a fine goal, but one that would probably require a fairly massive
rewrite of emacs-wiki.
Vadim
- Re: [emacs-wiki-discuss] RFC: verse tag markup and IE, Vadim Nasardinov, 2005/01/03
- [emacs-wiki-discuss] Re: RFC: verse tag markup and IE, Sacha Chua, 2005/01/04
- Re: [emacs-wiki-discuss] Re: RFC: verse tag markup and IE,
Vadim Nasardinov <=
- Re: [emacs-wiki-discuss] Re: RFC: verse tag markup and IE, Frederik Fouvry, 2005/01/04
- [emacs-wiki-discuss] Re: RFC: verse tag markup and IE, Michael Olson, 2005/01/06
- [emacs-wiki-discuss] Re: RFC: verse tag markup and IE, Andrew J. Korty, 2005/01/06
- Re: [emacs-wiki-discuss] Re: RFC: verse tag markup and IE, Angus Lees, 2005/01/11
- Re: [emacs-wiki-discuss] Re: RFC: verse tag markup and IE, Frederik Fouvry, 2005/01/12