Hi,
There is a need for a special syntax for texts in verse, as : creates an indentation and <br/> is quite ugly.
Could it be possible to have a code <verse> which would produce carriage return at the end of each line ?
Thanks, Yann
-----BEGIN PGP SIGNED MESSAGE-----
Moin,
On Thursday 31 March 2005 15:39, Yann Forget wrote:
Hi,
There is a need for a special syntax for texts in verse, as
: creates an indentation and <br/> is quite ugly.
Could it be possible to have a code <verse> which would produce carriage return at the end of each line ?
You have three options:
* You can use <pre>. * if you dislike its border etc, use a template like so:
Template::verse contains:
<pre style="background: #e0e0ff; border: 1px solid #303030; padding-left: 2em; margin: 0em;"> {{{txt}}} </pre>
(Note: First line is broken into two, but should work in either way.)
Then use it like so:
{{verse|txt= Your / verses / here My / nerves / tear }}
You can easily change the style in the template, thus reformatting all verses. (I would recommend using a different font, for instance :)
* The third option is to hack Parser.php to allow a new tag, <verse></verse> and then add CSS code to the Monoskin.js (or whatever it is called) and all the other skins to format it.
The custom tag is a bit easier for people to write (opposed to the {{vers| txt}} syntax, but needs hacking at the source (read: upgrade software - hack needs to be redone, want to reformat: need someone to hack again). The template is easier to customize and will survive software updates.
* The fourth option would be to write an extension, that essential returns what the template does for each <verse></verse>. Cleaner than the source hack, uses custom tag, but also needs an admin if you want to change the font of the verses.
Hope this helps,
Tels
- -- Signed on Thu Mar 31 17:46:23 2005 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email.
"What is fair use? Fair use is not a law. There's nothing in law. Right now, any professor can show a complete movie in his classroom without paying a dime - that's fair use. What is not fair use is making a copy of an encrypted DVD, because once you're able to break the encryption, you've undermined the encryption itself." - Jack Valenti
Yann Forget wrote:
Hi,
There is a need for a special syntax for texts in verse, as : creates an indentation and <br/> is quite ugly.
Could it be possible to have a code <verse> which would produce carriage return at the end of each line ?
That would be especially useful in Wikisource where we receive a lot of verse material.
Ec
On Thursday 31. March 2005. 14:39, Yann Forget wrote:
There is a need for a special syntax for texts in verse, as
: creates an indentation and <br/> is quite ugly.
Could it be possible to have a code <verse> which would produce carriage return at the end of each line ?
Have you tried with ; at the beginnings of lines?
In theory, this is best implemented using <l></l> pairs, but browsers don't widely support XHTML 2 yet. (You can, of course, cheat using CSS: l { display: block }, but that's not very nice.)
wikitech-l@lists.wikimedia.org