Extension talk:Poem

Jump to: navigation, search

About this discussion

Archives 

previous talk on this page


By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
Alex brollo (talkcontribs)

<br/> tags break italic and bold wiki markup but - interestingly - don't break <i> and <b> tags:

« Nel mezzo del cammin di nostra vita
mi ritrovai per una selva oscura,
ché la diritta via era smarrita. »

« Nel mezzo del cammin di nostra vita
mi ritrovai per una selva oscura,
ché la diritta via era smarrita. »

A lot of difference when poem to be rendered in italic is long.

Nikola Smolenski (talkcontribs)

This is the usual MediaWiki behavior, the wikitags are broken after a new line. Perhaps you should mention this in your Wikisource's documentation.

Alex brollo (talkcontribs)

Thanks; I simply consider it another proof that wikitags for italic and bold should be deprecated - and replaced by some well-formed code. But I know that most wikipedians wouldn't agree. ;-)

Reply to "Italic/bold markup and poem"

Poem combined with Proofread.Transclusion function

3
Nigmont (talkcontribs)

I wonder: can the Poem extension work properly when it is used in conjunction with the Transclusion function of the Proofread Extension? If saying more specifically: can this work when the opening tag <poem> and the closing tag </poem> are placed on different pages (e.g. closing tag is on the page next to the one where the opening tag resides) and the poetry lines flow between starting and ending page? I think currently this wouldn't work - am I right?

More detailed explanation of the issue case:

when I place such code on two neighboring proofread pages:

  • at the end of the first page - section named let us say "page_1_sec_2"
## page_1_sec_2 ##
<table align=center><tr><td><poem>First M lines
  • at the start of the second page - section named let us say "page_2_sec_1":
## page_2_sec_1 ##
Last N lines</poem></td></tr></table>
####

and I transclude the sections with a command like:

<pages index="The book.djvu" from=1 fromsection=page_1_sec_2 to=2 tosection=page_2_sec_1 />

then I got that only the first part (from "page_1_sec_2") of the poetry is displayed properly on the transclusion page, but the second part (last N lines) flows without linebreaks, and finally the closing tag </poem> is visually displayed - it seems like it is not treated as the closing tag.

I encountered this while working in the Multilingual Wikisource. Currently I found rude workaround, but without using the "poem" tag, and I was forced to insert <br/> tags as linebreaks.

Really: is there a way how to get these functions to work together? Or maybe some improvements may be introduced into the Mediawiki software to support this case too? --Nigmont (talk) 19:33, 6 March 2015 (UTC)

Billinghurst (talkcontribs)

The <poem> tag works fine in a transcluded page, though you you need to terminate it on the same page that it starts, and put a new tag on the next page. We do it all the time at English Wikisource. It simply needs to be open and closed often if you are looking to do more complex coding, and when using templates with it you need to use it with the magic tag {{#tag:...}}

There are numbers of limitations with poem and you just need to work within them.

Nigmont (talkcontribs)

Just now I have tried as you said (to put both opening and closing "poem" tags on each transcluded page), and it works well. Thank you very much, your reply is very helpful!

Reply to "Poem combined with Proofread.Transclusion function"
Robertgarrigos (talkcontribs)

I would love to be able to edit text marked as poem with the visualeditor. Is that possible in any way?

Thanks.

Robert

Ricordisamoa (talkcontribs)

No, it's not currently possible, but you can follow phab:T45120 for updates.

Reply to "poem with VisualEditor"
Subfader (talkcontribs)
preg_replace_callback(): Requires argument 2, 'Poem::replaceSpaces', to be a valid callback in ... 
$text = preg_replace_callback( '/^( +)/m', array( 'Poem', 'replaceSpaces' ), $text );
Reply to "PHP 5.5.13 preg_replace_callback error"
Quiddity (talkcontribs)

Regarding <lines> as an alternate names. There was a comment at http://lists.wikimedia.org/pipermail/wikitech-l/2014-February/074337.html which pointed to https://bugzilla.wikimedia.org/show_bug.cgi?id=52061 and https://gerrit.wikimedia.org/r/#/c/106861/

Just noting for future reference.

Reply to "Pointer to discussion about "lines""
Emilio Speciale (talkcontribs)

Do you have any solution on numbering verses with this extension? like

Spento il diurno raggio in occidente,
E queto il fumo delle ville, e queta
De' cani era la voce e della gente;
Quand'ella, volta all'amorosa meta,
Si ritrovò nel mezzo ad una landa.................5
Quanto foss'altra mai vezzosa e lieta.
Spandeva il suo chiaror per ogni banda
La sorella del sole, e fea d'argento
Gli arbori ch'a quel loco eran ghirlanda.
I ramoscelli ivan cantando al vento,............10
E in un con l'usignol che sempre piagne
Fra i tronchi un rivo fea dolce lamento.
Limpido il mar da lungi, e le campagne
E le foreste, e tutte ad una ad una
Le cime si scoprian delle montagne.............15
In queta ombra giacea la valle bruna,
E i collicelli intorno rivestia
Del suo candor la rugiadosa luna.

Thanks

Nemo bis (talkcontribs)

I suppose you already know that Wikisources have their own tricks for this? They use templates for the number and a CSS class for the dots. I'm afraid the extension doesn't help with this, or if it does nobody discovered it yet!

Emilio Speciale (talkcontribs)

Thank you for your answer. I hope someone has some suggestions. Have a nice day.

Reply to "How to number verses?"

Class 'Html' not found in extensions/Poem/Poem.class.php on line 56

2
168.91.255.100 (talkcontribs)

Any time I try to add the poem tag, the page crashes and I get the message " Class 'Html' not found in /var/lib/mediawiki/extensions/Poem/Poem.class.php on line 56" in the apache error.log.

Alex brollo (talkcontribs)

In which wikisource are you working? Can you give me the name of a page where such error pops out? And please - have you an user name somewhere?

Reply to " Class 'Html' not found in extensions/Poem/Poem.class.php on line 56"

The =-sign within a text that's part of a poem embedded in a template.

3
Willeeuwis (talkcontribs)

Willeeuwis (talk) 07:14, 11 May 2012 (UTC)

I have a simple template:

<div style="padding-left:20px; border-left:1px solid black">
<poem>
{{{1}}}
</poem>
</div>

When I write:

<poem>
1 + 1 = 2
</poem>

This results, as expected, in:

1 + 1 = 2

When write:

{{quote|1 + 1 = 2}}

This results in (with the lay out as decalred by the div style):

{{{1}}}

Writing:

{{quote|1 + 1 <nowiki>=</nowiki> 2}}

solves the problem, but why the difference. Is it the template that does this? Can this be "undone"?

Alex brollo (talkcontribs)

In general, the behavior of an extension tag as poem or ref included into a template is umpredictable (I suppose, from exoteric priorities into parsing). Often the issue is solved using #tag syntax instead of the extension tag. I.e. this solves the unpleasant issue of "a ref inside of a ref [1]</ref>".

Explore the #tag syntax if you did never do before! Alex brollo (talk)

first level references
  1. This is a first-level ref[a 1]:-)
second level references
  1. and this is a second-level ref template is umpand this is a third-level ref :-)
third level references
    Phil Boswell (talkcontribs)

    This is because when you write {{quote|1 + 1 = 2}} the parser thinks you wish to invoke {{quote}} with a single parameter named "1 + 1". If you have a named parameter, it does not get assigned a number: that's only for anonymous parameters. So {{{1}}} does not have a value, and you have not used a pipe to indicate a default value, so you get the raw parameter showing up as above.

    Reply to "The =-sign within a text that's part of a poem embedded in a template."
    There are no older topics