Discussion edit

Span edit

I think it would be better to use a span tag, like this:

<span
 class="center pagebreak"
 style="display: block; font-size: smaller; border-{{
   #switch:{{{2|}}}
   | top = top: 1px dashed
   | bottom: 1px dashed
 }}">{{{label|page}}} {{{1|}}}</span>

The span tag will not break the paragraphs of the text into multiple p tags if they contain page breaks. And a "pagebreak" class will make it easier for users to customise the display of the template using css. /EnDumEn 10:34, 27 January 2007 (UTC)Reply

Good suggestion. I'll make the change. --COGDEN 02:48, 28 January 2007 (UTC)Reply

This was altered by User:Hesperian earlier this year, and I didn't notice the change until now. I think Hesperian is wrong that this template is conceptually a "div" rather than a "span." A "span" is used for inline content, regardless of how it actually displays after rendered by CSS. The page template should not break up the paragraph. HTML, including "div" and "span", is only about the content, not how it displays. We choose to display it as a block-level break; however, it is inline content in HTML 4.0. Thus, I'm changing it back to a "span". --COGDEN (talk) 21:30, 27 October 2008 (UTC)Reply

Duly noted. Hesperian 22:27, 27 October 2008 (UTC)Reply

Anchor edit

Does this template make it possible for other sources to link back to the specific page? I'm thinking of the functionality of Template:Section — if I use the page break template to label, say, "page 50" in the original document, can I add a link from some other page that takes the reader directly to page 50, rather than to the top of the page? Thanks. Tarmstro99 18:51, 8 March 2007 (UTC)Reply

I've added that feature. —{admin} Pathoschild 20:44:14, 08 March 2007 (UTC)
Thanks! Tarmstro99 21:40, 8 March 2007 (UTC)Reply

I would suggest inserting into the template's div also a "page-break-after:always" so the page break appears also when printing the page. (anonymous contributor)

Transclusion edit

fwiw... I have observed instances where certain usages of this template in conjunction with the transclusion of pages to the main namespace conflicts with the "normal" <span id="#"> assignment(s) generated under the pagenum class if the label= parameter value happens to match the numbering scheme the class relies on & typically set on the index page in/by the <pagelist /> section. The numbering may become skewed at or around that point; even ommitted entirely. — George Orwell III (talk) 02:00, 6 February 2011 (UTC)Reply

Space between "page" and the label edit

Why isn't there a space between "page" and the page label? It looks like a typo when the pages are labeled "page245" rather than "page 245". Kaldari (talk) 02:10, 1 August 2010 (UTC)Reply

Fixed. Hesperian 03:31, 1 August 2010 (UTC)Reply
Ta, that's what I meant to do! ;-) Hesperian 04:36, 2 August 2010 (UTC)Reply

Numbers in the left hand column merging into the text edit

In the example:

<div class=indented-page>
and so the moral of this story is, when you
{{pagenum|17}}
ain't got rhythm, you should get out of the kitchen.

and so the moral of this story is, when you ain't got rhythm, you should get out of the kitchen.

Every thing works as advertised on the box. But if the page number is in the 100 or larger then the indent does not get any larger and the page number starts to mix with the text:

and so the moral of this story is, when you ain't got rhythm, you should get out of the kitchen.

and so the moral of this story is, when you ain't got rhythm, you should get out of the kitchen.

Is this easy to fix? -- Philip Baird Shearer (talk) 22:53, 16 November 2011 (UTC)Reply

Take out the divs; these have been superseded by a sitewide js/css solution. Hesperian 00:05, 17 November 2011 (UTC)Reply
Ok as you seem to know about this could you make the change (then I can see what you do and learn by it). -- Philip Baird Shearer (talk) 00:44, 17 November 2011 (UTC)Reply
Ideally, once all the EB1911 articles have been transcluded properly, and the page numbers appear on the left appropriately and automatically, how will that affect (or will it?) whatever clean-up you are trying to do, Philip? Londonjackbooks (talk) 01:01, 17 November 2011 (UTC)Reply
See Wikisource talk:WikiProject 1911 Encyclopædia Britannica#Volume information for EB1911 -- Philip Baird Shearer (talk) 22:23, 17 November 2011 (UTC)Reply

3+ digit numbers overlapping edit

The issue mentioned above seems to still (or again?) be an issue (see this revision). What are your thoughts on replacing "left: 1em" with "left: -1em"? This avoids the issue, at least until you reach page numbers of six digits or more, which seems unlikely. It's also more visually similar to the automatic page numbering. I've copied the template with the position change to User:GorillaWarfare/pagebreak, and am testing it at User:GorillaWarfare/sandbox. GorillaWarfare (talk) 12:40, 15 May 2013 (UTC)Reply

Using this template to control page breaks in exported books edit

@Billinghurst, @Hesperian: I'm thinking about refactoring this template so that it can be used to control page breaks in exported books (at least for EPUB and MOBI), in addition to it's current duty of showing page breaks on the Wikisource pages. Please see https://github.com/wsexport/tool/issues/113 for the background discussion. Let me know if there are concerns or questions about this. If not, I'll start working on a sandbox version. Basically, the end goal is to have better formatted exported versions, since right now they are pretty abysmal. Kaldari (talk) 23:46, 28 March 2019 (UTC)Reply

Sounds terrifying. Please don't break nearly every mainspace page on the site! But terror aside, it sounds like a really valuable contribution. Hesperian 00:28, 29 March 2019 (UTC)Reply
I accidentally made a change to both the sandbox and the main template. (This is what happens when you leave too many tabs open!) But it seems like the change works as intended and doesn't change anything about the HTML display (just the print version). I'm going to leave it in for now, but if you notice any issues or problems, please feel free to revert it. I'll try to stick to the sandbox for the rest of it! Kaldari (talk) 21:27, 2 April 2019 (UTC)Reply
@Billinghurst, @Hesperian: OK, it took some experimentation, but I think I have it working as intended in the sandbox now. The new version should display identically in the web version, but in the print version the page break lines should magically change into actual page breaks! What a concept! Feel free to try out the sandbox version and let me know if you notice any issues. I know the code probably looks weird (with a triple-embedded span), but it was necessary to implement it that way in order to not change the HTML rendering, but still have the page breaking and noprint work correctly. If there are no issues, I'll switch it out this weekend. Kaldari (talk) 22:56, 2 April 2019 (UTC)Reply
@Billinghurst, @Hesperian: The change has been made. Please let me know if you notice any problems! Kaldari (talk) 18:09, 10 April 2019 (UTC)Reply