Extension talk:Poem

About this board


previous talk on this page

Bencheung0422 (talkcontribs)

I used <poem></poem>, It not work, totally show <poem>and</poem>


Any workaround for page breaks?

Vito Genovese (talkcontribs)


We need to get rid of automatic page breaks for single-stanza poems that go on for several pages. An example is at . I've tried some noinclude/onlyinclude tricks that do not seem to work.

Any suggestions?

Reply to "Any workaround for page breaks?"

Pipesymbol at the beginning of a line gets replaced by another character (only in Wikipedia app)

Fulla07 (talkcontribs)

See for example this article: leading pipes are replace by l, u, a,...

A workaround is to enclose the pipes with nowiki-tags as I did in the german version of said example. --Fulla07 (talk) 21:12, 13 November 2018 (UTC)

Alex brollo (talkcontribs)

I'm not sure to understand the issue, nevertheless I avoid the use of regular pipeline as a textual element; I use U+2758, &#10072, "Light vertical bar", this: ❘ that doesn't conflict with wiki markup.

Fulla07 (talkcontribs)

Personally, I don't have a problem with this either, but the poem tag is often used for lyrics and in lyrics there are often parts that are repeated.

It seems to be quiet common to put it like this: |: Repeate this once :|

Classic Wikipedia and mobile version have no issue with it, but in the App the first pipe is replaced by another character.

I just wanted to report this, even if it is a minor issue.

Reply to "Pipesymbol at the beginning of a line gets replaced by another character (only in Wikipedia app)"

Inserting poem tags in VisualEditor

Halfbeing (talkcontribs)

Once a poem already exists on a page it is possible to select it and edit it (albeit using markup) from within VisualEditor. There is a demonstration of this in the VisualEditor sandboxed demo page. But is there a way to create a new poem in visual editor? I can't find any way of inserting poem tags without switching to the traditional editor and back again, which takes quite a long time and breaks my concentration.

Also, does anyone happen to know how long it is likely to be before the poem extension becomes fully compatible with VisualEditor. I find a wiki to be an excellent writer's notebook in many ways, but the inability to handle unusual text formatting easily is the only big stumbling block. Halfbeing (talk) 09:20, 5 February 2016 (UTC)

Pols12 (talkcontribs)

Tracked by task T45120 (but which was removed from workboard).

Reply to "Inserting poem tags in VisualEditor"

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

Summary by Craft6789
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">

When I write:

1 + 1 = 2

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):



{{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.

    Willeeuwis (talkcontribs)

    Revisiting this, I saw that I never thanked you four helping me out. Better late than never: thanks :-)

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

    Poem combined with Proofread.Transclusion function

    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!

    This post was hidden by (history)
    Reply to "Poem combined with Proofread.Transclusion function"
    Summary last edited by Craft6789 07:07, 26 July 2016 6 years ago

    edit test</poem>

    Craft6789 (talkcontribs)
    Craft6789 (talkcontribs)

    Wrapping verses into span tags

    Alex brollo (talkcontribs)

    With a minor change into extension code, verses could be wrapped into span tags.

    Advantages: any verse would be retrieved as a html entity; anchors (like that built by it.source tl|§) will point precisely to a verse and to highlight precisely the quoted verse; it would be simpler to count them and to apply a dynamic verse numbering.

    Disadvantages: now the poem block is a single span, and can be simply formatted as a single block (ie with <i> or <b> html tags); the trick will fail when a verse is brocken in parts into different lines.

    Reply to "Wrapping verses into span tags"

    Extending the poem's style parameters

    Ineuw (talkcontribs)

    Through trial and error, I discovered that the poem tag accepts the following style parameters:







    However, it would be most helpful if it would include (if possible), the logical parameter of 'padding' and 'text-indent.' ~~~~

    Alex brollo (talkcontribs)

    Try to pass simply a style. I'm using this trick into mul.source, coupled with S:mul:Template:AbsLeft. here a test code (test it into a wikisource sandbox):

    <poem style="position:relative; padding-left:4em; border:1px red dotted; width:15em">





    Alex brollo (talk) 07:37, 16 February 2016 (UTC)

    poem still generates <pre> for leading blanks

    Kbrose (talkcontribs)

    Despite what the documentation says:

    • Spaces at the beginning of a line are preserved and no longer invoke the <pre> tag

    it still happens. Is there a work around? ~~~~

    Alex brollo (talkcontribs)

    Please can you link a page where it happens?

    Kbrose (talkcontribs)

    No, I am using it on a private wiki. 1.25 MW with 1.25 or 1.26 extension.

    If it indeed works as advertised on, say, the English WP, could the result be some side effect due to some other configuration that I don't have?

    Kbrose (talkcontribs)

    Ok, after some more experimentation, it appears that the injection of <pre> is the result of some side effect when using <poem> in a template. I don't know yet exactly what caused it, but I'll close the issue from my side, as I have a workaround for the desired outcome by other means.

    Alex brollo (talkcontribs)

    If you really need to use poem tag into a template, try #tag:poem syntax: Help:Magic words (if you never did).

    Kbrose (talkcontribs)

    Ah, yes. I probably should have used it that way. I'll try that some time. Thanks much.

    Reply to "poem still generates <pre> for leading blanks"
    Return to "Poem" page.