Extension talk:Poem

Jump to: navigation, search

About this board

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

Poem combined with Proofread.Transclusion function

4
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 comment was hidden by 87.123.56.251 (history)
Reply to "Poem combined with Proofread.Transclusion function"
Summary last edited by Craft6789 07:07, 26 July 2016 2 months ago

edit test</poem>

Craft6789 (talkcontribs)
soteria place
Craft6789 (talkcontribs)

Poem

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

2
Ineuw (talkcontribs)

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

display:table;

line-height:

font-size:

margin-left:

margin-right:

width:

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">

one

two

three

</poem>

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

poem still generates <pre> for leading blanks

6
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"
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)

Reply to "Inserting poem tags in VisualEditor"

你好,能不能将==标题功能也概括在里面呢? Hello, could you = = title function are also summarized in the inside?

1
111.206.190.218 (talkcontribs)

嗨 我们都知道,mediawiki对于内容换行方面处理的不好,比如说我们必须换行或使用
才能让内容起到换行的效果,这对于转载别人的内容非常不方便,而poem这个标签解决了这个问题,我发现以于换行符,加粗符等支持的都非常好,但对于标签符==不支持,我多么希望能够支持将==概括在里面,这样我转载一篇别人的文章,就可以直接将所有内容直接用poem概括起来,然后再在里面进行简单的加粗加标题的方式排版了。

The following is an online translation of the above Chinese content: hi As we all know, MediaWiki for newline treatment is not good, for example, we should wrap or use
to make content to wrap this effect, for others reproduced content is very inconvenient, and the poem tag to solve this problem, I found in a newline, bold character of support very good, but for the tag match = = do not support, I wish to support the general = = inside, so I transfer one of the others, you can directly all the contents of the direct use of poem to sum up, and then a simple title in bold with the way of layout.

Reply to "你好,能不能将==标题功能也概括在里面呢? Hello, could you = = title function are also summarized in the inside?"
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"
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"
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?"