Page MenuHomePhabricator

Wrong indentation for first and last paragraph of the body if header and footer are not empty
Open, MediumPublic


All examples can be found at: page.

  1. Indentation of the first paragraph.

Assume we have a page where first paragraph continues from the previous page. Such the paragraph should render with no indentation (simply as in the printed book) even if we select the indented style for paragraphs at the page.

It's common practice in the Russian Wikisource (and all other sister Wikisource projects) to write the text (body in the terms of the proofread extension) of such pages with no additional leading linefeeds, while it's also common to add some extra leading linefeeds (and mask them somehow from deletion) for pages that start new paragraph.

Okay, if we look at the raw text of such page (in raw mode), we can see three linefeeds between the header text and the body. That seems to be okay if we'd saw the same on the page in the View mode -- three linefeeds output as the br tag inside the first paragraph of the body, so it renders with no indentation, exactly as needed (see example 1.1 at the page stated above).

However, when such a proofreed page renders by the extension in the View mode AND if the header field is not empty, there is no such the br tag between header and the body, so first paragraph renders with identation if we select indented style for the whole page. (See example 1.2 at the page stated above) Btw, if the header is empty, the br tag seems to be inserted. The header may (or may not) simply contain a running header for the page, so this behaviour (how the first paragraph renders) should not depend on the content of the header field.

In short: simply give us in the View mode those three linefeeds between the header and the body that can be seen in the raw proofread page text (or an explicite br tag).

  1. Rendering of the last paragraph

Similar problem with rendering last paragraph exists. (See examples 2.1, 2.2 at the page stated above) Unlike the header and the body, the footer is not separated from the body with any linefeed at all. So, if we add, for instance, a closing div tag for a div, which begins at the header and defines the style for the whole page, the last paragraph outputs with no p tags around it (so, it's not a html paragraph anymore), so it may render with different style, depending on the css styles applied. All this requires us to add some superfuous leading linefeeds in the footer field and mask them with a comment from deletion, and all this simply in order to obtain the body (not the header itself!) rendered properly...

In short: add a linefeed between the body and the footer (or also triple linefeeds or an explicite br tag as between the header and the body) in the View mode.

There is no need to change the raw representation of the proofread pages -- simply change the html shown at the View (and Preview) mode.

If you do not like changing this for all Wikis, give us a template page (similar to MediaWiki:proofread-index-template) which accepts the body, the header and the footer fields as parameters and renders the result, so that we could adjust this behaviour locally at our Wikisource.

I've seen similar questions at the French Wikisource (they also use indented styles for proofread pages, but do it on different manner). They also add superfluous noindent templates inside noinclude tags in the first paragraphs at pages when the header field is not empty (i.e. contains a running header). This is superfous since it's featured by the the described deficiency in the proofread extension, not the details of the text on the book page itself.

Event Timeline

Hinote created this task.Jan 23 2016, 3:02 AM
Hinote raised the priority of this task from to Medium.
Hinote updated the task description. (Show Details)
Hinote added a project: ProofreadPage.
Hinote added a subscriber: Hinote.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 23 2016, 3:02 AM
Hinote updated the task description. (Show Details)Jan 23 2016, 3:59 AM
Hinote set Security to None.
Magol added a subscriber: Magol.Jul 7 2018, 9:25 AM