Jump to content

Template talk:Ppoem

Page contents not supported in other languages.
Add topic
From Wikisource
Latest comment: 12 hours ago by Alien333 in topic escape characters

Headings

[edit]

On Page:The works of Christopher Marlowe - ed. Dyce - 1859.djvu/75

The heading markup was not recognised. I assume this is a design choice, and it can be worked around. ShakespeareFan00 (talk) 18:43, 5 March 2021 (UTC)Reply

In case someone else comes across this: {class} actually uses class ws-poem-class, as it's made to function with the "default" classes in Template:Ppoem/styles.css. — Alien333 (what I did & why I did it wrong) 07:51, 5 June 2024 (UTC)Reply

Italics

[edit]

Could we have the same shorthand from table style for poem style? e.g. it for italics Cheers, Zoeannl (talk) 00:37, 4 November 2021 (UTC)Reply

@Zoeannl generally, ppoem is trying to avoid explicit inline CSS, whether directly or via a shorthand (actually, especially via a shorthand, as {{ts}} is a huge mess). Usually, formatting on poems is shared amongst all or many poems in a work, so you can define a class, and apply that to the poem, stanza or line in question and then style that with an appropriate CSS rule in the CSS. This has the benefit of being re-usable, as well as semantically meaningful. Inductiveloadtalk/contribs 17:56, 1 May 2022 (UTC)Reply

Suppressing the default hanging indent

[edit]

Is there a way to suppress or modify the default hanging indent on individual lines? Chrisguise (talk) 17:12, 5 March 2022 (UTC)Reply

@Chrisguise: Hmm. Lines can have a {class} prefix that will add that class to the line's container, and then you can target that class from CSS (for example the per-work / Index CSS) and set the combination of margin/text-indent you need. What's your use-case? Xover (talk) 21:46, 6 March 2022 (UTC)Reply
Hi,
I will take your word for that - I have no knowledge of HTML programming.
I have a couple of instances.
1) I've done a lot of Algernon Charles Swinburne's poetry and, in some cases, if I had used {{ppoem}}, a line wrap of 4em would have been too much compared to how the work is printed.
2) I'm doing work on Shakespeare's first folio. I had been using <poem>, which works fine (once you get the hang of which templates put in extra blank lines and which don't) but I recently switched to {{ppoem}}, as I'd encountered a couple of instances where a line continues across two pages. Most of the text is in verse, which works fine, but some is just prose. Using <poem> I had been doing this without line breaks so that the text wraps itself, which works, but with {{ppoem}} it puts in the hanging indent, which isn't present in the text. I could use line breaks per the printed text, or keep dropping in and out of {{ppoem}} as required, but I thought I'd ask the question ....... Chrisguise (talk) 01:19, 7 March 2022 (UTC)Reply
A bit lat here, but I found in the module that it's overriden if you give any value to the no_hi parameter (also added to doc). — Alien333 (what I did & why I did it wrong) 08:39, 12 June 2024 (UTC)Reply

pline

[edit]

The pline template only appears to partly work with ppoem. {{pline|10|r}} renders correctly but {{pline|10|l}} does not. The line number appears mid-way through the line, as if it is being offset to the right of the start of the line, rather than to the left of it. Chrisguise (talk) 07:56, 1 May 2022 (UTC)Reply

@Chrisguise ppoem isn't designed to use {{pline}}, as it has built-in support for the <<< and >>> syntax. Inductiveloadtalk/contribs 09:35, 1 May 2022 (UTC)Reply
It seems a bit odd that while introducing a better means to format poems (which {{ppoem}} is), it should reduce useful functionality elsewhere (e.g. the use of pline, with its inbuilt 'anchor' capability and less distracting formatting, compared to the plain numbering with ppoem). I haven't tried applying formatting to the number in ppoem yet, but it's just more work if that's what's required.
Incidentally, the 'errata' mark-up also doesn't work properly with ppoem. See the difference between the errata in Demeter and other poems/To the Marquis of Dufferin and Ava, which uses <poem></poem>, and Demeter and other poems/To Mary Boyle, which uses {{ppoem}}. Chrisguise (talk) 05:06, 5 May 2022 (UTC)Reply
[edit]

I intermittently get instances where author links or title links in {{ppoem}} won't work and I can't figure out what combination of things it is that causes this. My latest example is Page:Sketch of Connecticut, Forty Years Since.djvu/27. The link from the first line to an anchor in the poem text works, but the author link to Robert Burns and the general title link at the end of the poem extract don't. When the problem happens, it's always following either >> or >>>, but it doesn't consistently fail. Chrisguise (talk) 15:41, 29 July 2022 (UTC)Reply

@Chrisguise: Long story short: Special:Diff/12515917. Xover (talk) 20:57, 29 July 2022 (UTC)Reply
Thanks for that - although I'm sure I tried that myself. Heigh-ho. Chrisguise (talk) 21:52, 29 July 2022 (UTC)Reply

Unnecessary line break with dropinitial

[edit]

In the poem below

A short lineA very long second line

the width of the container doesn't increase to accommodate the second line, introducing unnecessary line break. Alnaling (talk) 17:03, 5 December 2022 (UTC)Reply

@Alnaling sadly this is a known issue (under "Disadvantages", this is what prompted "Dropinitials can sometimes cause a line to wrap prematurely"). HTML and CSS seem to be very resistant to allowing this work robustly. Sometimes one wishes for the simpler days of moveable type! Ideas for fixing this in a robust way are very welcome. Inductiveloadtalk/contribs 22:24, 5 December 2022 (UTC)Reply
Sorry for the noise, I didn't notice that this disadvantage was listed. Alnaling (talk) 09:46, 6 December 2022 (UTC)Reply

Option for manual centring

[edit]

In a poem interrupted by regular text, the centring will not be the same on both sides if the {{ppoem}} tag is used twice. Perhaps a good way to deal with this would be to allow manually setting the width of a ppoem. I am using <poem> inside a {{center block}}, currently, but I would much rather use {{ppoem}} if I could!

For example,This poem has a line which is quite long—

Then here is some regular text.

And here, thepoem continues,with different centring.

Raketsla (talk) 16:38, 15 December 2022 (UTC)Reply

| style=width:[width] would work just fine to do that. — Alien333 (what I did & why I did it wrong) 19:12, 8 June 2024 (UTC)Reply

Indented first line

[edit]

For poems with an indented first line, this templates seems to remove all initial whitespace. For example this poem:

Ut vulpia adulatio,Nun in der Werlde blyket,   Sic hominis est ratioGelyk dem vosse geschicket.

Is this a limitation of templates, automatically removing initial whitespace from all parameters? --YodinT 12:58, 17 July 2023 (UTC)Reply

@Yodin: Yes, removing leading and trailing whitespace is a limitation of all templates (it's base MediaWiki behaviour).
But in this particular case: ppoem has its own little microlanguage for poem formatting, but you seem to be treating it as if it was any other template. Try
{{ppoem|
:Ut vulpia adulatio,
Nun in der Werlde blyket,
:Sic hominis est ratio
Gelyk dem vosse geschicket.
}}
instead. The ":" is for creating just this kind of indentation in poems.
Note that for ppoem I recommend the somewhat-unusual-for-a-template source code formatting convention you see here, with the template invocation on its own line, and the same for the closing braces. It makes it a lot more clear what is actually going on there, especially when you start adding |start= and |end= to the template call. --Xover (talk) 09:01, 18 July 2023 (UTC)Reply
Thanks :) I did notice the difference between : (non breaking em spaces?) and spaces (non breaking spaces), and thought that the original spacing was a bit less than 1em. But trying out the : method, 1em does seem about right (and as you say looks much clearer!) I'll look over the rest of the syntax as it looks like a much better way to format poems! --YodinT 11:46, 18 July 2023 (UTC)Reply

Template missing basic examples.

[edit]

In my work, this template's default center is always sufficient, but in case of this page, where the poem is not centered, I resorted to an unorthodox approach. I used the {{left}} template with a 4em offset from the margin with newline, but I would rather learn to use this template properly. I looked all the examples, and also checked "What links here", but found none that would demonstrate how to apply the parameters. — ineuw (talk) 06:21, 2 March 2024 (UTC)Reply

That specific poem is I think centered, it's just that the first lines pushes it left because it's long, so this should be enough.
To answer your question, though, style=margin-left:4em overrides the default auto and works just fine (see here). — Alien333 (what I did & why I did it wrong) 13:00, 25 May 2024 (UTC)Reply
How right you are. It is an appreciated wake up call and I centered it. — ineuw (talk) 23:07, 25 May 2024 (UTC)Reply

Problem with line numbering and drop initial

[edit]

Minimal example:

I19 N ote that it works on this line.II20 but not on this one;III21 and not on this one either!IV22 Back to normal.

Mårtensås (talk) 16:14, 3 June 2024 (UTC)Reply

@Mårtensås: Thanks for the report. This is most likely not fixable because drop initials are not actually supported in web browsers (there's a draft spec for it, but it hasn't moved in years and no browsers support it), meaning {{di}} tries to fake it using nested elements and floats. I'll make a note of the issue though, in case an opportunity arises. Xover (talk) 17:05, 3 June 2024 (UTC)Reply
@Mårtensås This piqued my curiosity as well, and as I write this, it occurred to me that a floating image of a dropped initial may be possible. Can you post a link to the page? — ineuw (talk) 21:26, 12 June 2024 (UTC)Reply
@Ineuw: You'll likely run into the same issue (manifesting slightly differently). The problem is that both ppoem and {{di}} are using left floats there, and there's no general way to make the two cooperate. Xover (talk) 06:20, 13 June 2024 (UTC)Reply
I'm working on Swedish Wikisource, but I've imported ppoem so it's the same template and syntax as on ENWS. sv:Sida:Upplandslagen_efter_Ängsöhandskriften_(von_Freisen_1912).pdf/137 Mårtensås (talk) 13:50, 13 June 2024 (UTC)Reply

Line break

[edit]

@Alien333: Something in the new changes is causing poems to give unusually long line breaks after the end of poems. For example:

Text above poem.

Text in poem

Text below poem.

Do you know what this might be caused by? SnowyCinema (talk) 04:46, 21 December 2024 (UTC)Reply

Aaah, see what you mean. On chrome, right? Reverted, going to experiment some more. — Alien  3
3 3
14:12, 21 December 2024 (UTC)Reply

Ppoem with Brace3 and Rotate

[edit]

I love ppoem! It has made a lot of formatting much easier. Thank you!

Right now I am trying to format a litany (prayer). (Examples linked below.)

I want to put on the right a tall brace (Template Brace3) (covering many lines) followed further right by a line of rotated text (Template Rotate), indicating that the rotated text should be repeated after each line.

The only way I can get the rotated text to the right of the bracket is to put the codes (Brace3 then Rotate) one right after the other on the same line (after a line of text, where I want the top of the bracket). But this places the rotated text near the top of the bracket. (I had to insert a large em at the end of Line 1 to prevent very short line wrapping--thanks for that note on the template page.)

If I put the bracket at the line where I want the bracket to start, and then the text at the line where I want it to appear (centered vertically on the bracket), then the text is to the left of (inside) the bracket.

Spanning several pages will be yet another challenge.

In other books, parallel columns bring even more fun. Is there a way to effect parallel columns using ppoem? (I tried nesting ppoem within a table but could not make that work.)

Suggestions, please? Am I missing something? Is there some underlying formatting conflict among these various templates?


Examples:

  • User:Laura1822/sandbox experimenting on the following page, changed from using a table to using ppoem, as described above.
  • example page of Litany of the Holy Name, using tables, with bracket and perpendicular "Have mercy on us."
  • example page of Litany of the Holy Name, using multicol, with Latin/English parallel columns, colored text, floatright text, colored page rules/frame, pictorial dropcaps. (Need to add brackets and rotated text, if I can get them to work with multicol.)
  • example page of Litany of the Saints, using multicol, with Latin/English, floatright (not rotated) text, page rules/frame

Laura1822 (talk) 21:17, 22 December 2024 (UTC)Reply

To rotate text (as opposed to symbols or images or whatever), it's better to use the {{vrl}} template, as it accounts for the spacing better.
The way I'd do it (but here are others) is having a table with three columns: the ppoem, the braces, and the vertical text. See Page:Blessedbegodcomp00call.pdf/407 for an example.
This should work cross-page, as the ppoems in the first column will join together normally, and the braces and the text should be still aligned right. To shift them down, I've used {{dhr}}.
For when you have two such poems, next to each other, I'd just nest the tables as columns inside another table.
Note: For Page:Rite of Consecration of a Catholic Bishop.djvu/18, when you look closely the text is inside the poem, not outside. Therefore, you could (inside of each of the ppoems) use something like {{fr|{{vrl|aa}}}} at the end of lines. Also, you can make an entire poem bold by adding the parameter |class=ws-poem-bold.
Hope this answers your questions! — Alien  3
3 3
08:01, 23 December 2024 (UTC)Reply
That is fabulous! Thank you, I will study the codes and keep the links to those pages handy. I really tried to put the ppoem inside a table but I could not figure it out. (Tables are not my friends. Ppoem is much friendlier--once I got it.) Can't tell you how much I appreciate it. Truly. Laura1822 (talk) 16:08, 23 December 2024 (UTC)Reply

Note to those considering changing stuff

[edit]

Many other possibilities have been discussed and rejected, with good reasons. To not repeat my mistakes, I heavily recommend reading the sections of User talk:Inductiveload/Archives/2021 relevant to ppoem, before changing it. — Alien  3
3 3
09:06, 2 January 2025 (UTC)Reply

escape characters

[edit]

It says that one must "escape" the = and | characters (equals sign and pipe). How is this done? I tried {{|}} but that does not appear to work (at least in the preview). Thanks! Laura1822 (talk) 22:52, 11 January 2025 (UTC)Reply

Found it! {{!}} Laura1822 (talk) 22:59, 11 January 2025 (UTC)Reply
Yes,
{{!}} and {{=}}
are builtin escapes for templates. — Alien  3
3 3
08:22, 12 January 2025 (UTC)Reply