[uf-new] Re: I propose a new microformat for poems.

paul_wilkins at xtra.co.nz paul_wilkins at xtra.co.nz
Mon Oct 8 14:17:26 PDT 2007


From: Benjamin Hawkes-Lewis <bhawkeslewis at googlemail.com>
> Brutal how?

In that there are several styling limitation when using a PRE block for a stanza, and that only a small percentage of poems are free-form in nature. Usually it's the 80% group for which problems are solved.

The tools for extracting and working with the text are often XML based. Processing of such text becomes more difficult when whitespace has to be taken into account.

it also reminds me of using tables for page layout in the bad old days. It's a lazy habit that provides no real benefit other than pure layout, often at the expense of other things.

Perhaps it may help if we see how the code looks for each case.

The standard formatting uses linebreaks

<div class="poem">

<h1>Title</h1>

<p class="stanza">

Line 1<br />

Line 2

</p>

<p class="stanza">

Line 3<br />

Line 4

</pre>

</div>


If you loath linebreaks like I do, other options are using ordered lists with a touch of styling to remove the line numbers


<div class="poem">

<h1>Title</h1>

<ol class="stanza">

  <li>Line 1</li>

  <li>Line 2</li>

</ol>

<ol> class="stanza">

  <li>Line 3</li>

  <li>Line 4</li>

</ol>

</div>


Then there's the preformatted tag, which does the job and in the few instances where required, lets you adjust the spacing, but doesn't allow much room for much else


<div class="poem">
<h1>Title</h1>
<pre>
Line 1
Line 2

Line 3
Line 4
</pre>
</div>

-- 
Paul Wilkins






More information about the microformats-new mailing list