Last modified: 2005-08-31 19:41:10 UTC
Hi, There is no specific syntax for formatting a text in verse. People from Wikisource have expressed the wish to have a <verse> syntax which would produce something like <pre style="background: #ffffff; border: 0px; padding-left: 2em; margin: 0em;"> </pre> Thanks, Yann
Actually, it should be: <pre style="background: #ffffff; border: 0px; line-height: 150%; padding-left: 2em; margin: 0em;">
It is language and style dependent
(In reply to comment #2) > It is language and style dependent This syntax would be useful for all languages with the Latin alphabet and all Indian languages, at least. Not everybody is obliged to use it.
Is there any specific reason why the "people on wikisource" can't just add the following to MediaWiki:Monobook.css: .verse { background-color: #ffffff; border-width 0; padding-left: 2em; margin: 0; } And use this with: <pre class="verse"> verse text here </pre>
Hi, Actuellement, I was told that this feature should NOT be based on <pre> because <pre> doesn't allow other wiki syntax inside the tag. So it should be a new tag with just take into account the carriage return. Example: <verse> test 1 test 2 test 3 </verse> should produce test 1 test 2 test 3 instead of test 1test 2test 3
This is just the sort of thing global style sheets are good for. Note that a <div> should work fine here: .verse { background-color: #ffffff; border-width 0; padding-left: 2em; margin: 0; white-space: pre; } <div class="verse"> verse is fun verse is art making it rhyme is the best part </div>
There is apparently no solution to this with plain CSS. What we really need is the ability to turn off the ignoring of single line breaks. The only other alternatives that I can think of are to use a pre block which causes other formatting problems discussed in the comments or to use a br on the end of every line which is just ridiculous. A div would NOT work fine because the goal is to make mediawiki obey single line breaks... This is most likely not possible with CSS.
Oh sorry. I have never heard of whitespace: pre. I guess that was what we needed.
(In reply to comment #6) > This is just the sort of thing global style sheets are good for. Note that a <div> should work fine here: > > .verse { > background-color: #ffffff; > border-width 0; > padding-left: 2em; > margin: 0; > white-space: pre; > } > > <div class="verse"> > verse is fun > verse is art > making it rhyme > is the best part > </div> A <div> DOES NOT do what is needed. That is the problem. This would work if a <pre class="verse"> could be used, but it doesn't work.
There was 2 problems: 1. The cache doesn't clear. 2. It should be style="border: 0px;
(In reply to comment #5) It seems to me that pre DOES allow other wiki syntax but that p style="white-space: pre;" removes the CR in wikimedia (In reply to comment #10) So what we must do is just add "font-family:sans-serif;" to the verse class.
See the following for background information on this: * http://wikisource.org/wiki/Wikisource:Scriptorium/Archives/Feb_2005_-_Apr_2005#Syntax_for_texts_in_verse * http://wikisource.org/wiki/Wikisource:Scriptorium/Archives/Apr_2005_-_Aug_2005#Texts_in_verse%3A_solution.21