Last modified: 2014-09-26 14:16:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30066, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28066 - Collections should accept "chapters" consisting of "only one wikipage" and format them properly
Collections should accept "chapters" consisting of "only one wikipage" and fo...
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
Collection (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://pt.wikibooks.org/w/index.php?t...
:
Depends on:
Blocks: 71328
  Show dependency treegraph
 
Reported: 2011-03-15 17:58 UTC by Helder
Modified: 2014-09-26 14:16 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Current formatting.odt (3.72 KB, application/vnd.oasis.opendocument.text)
2014-09-26 14:03 UTC, Helder
Details
Desired formatting.odt (19.54 KB, application/vnd.oasis.opendocument.text)
2014-09-26 14:05 UTC, Helder
Details
Current formatting2.odt (3.71 KB, application/vnd.oasis.opendocument.text)
2014-09-26 14:15 UTC, Helder
Details
Desired formatting2.odt (21.87 KB, application/vnd.oasis.opendocument.text)
2014-09-26 14:16 UTC, Helder
Details

Description Helder 2011-03-15 17:58:11 UTC
(copied from
[[Help:Books/Feedback/Archives/2010/March#Bug:_It_is_not_possible_to_define_a_chapter_to_have_only_one_wikipage]]
since PediaPress bug tracker system still doesn't work: 
[[Help:Books/Feedback/Archives/2010/November#Problem_with_login_at_code.pediapress_(continuation)]]
)


When we try to use the book functionality for creating PDF versions of wikibooks, it's likely that each chapter will be made of exactly one wikipage of the wikibook. For example, suppose we have this book:
* Sample book/Sample first chapter
* Sample book/Sample second chapter

So, when we try to create the PDF using this extension, there is no way to make a nice PDF because the current options are:
1) To use this syntax:
:[[Sample book/Sample first chapter|Sample first chapter]]
:[[Sample book/Sample second chapter|Sample second chapter]]

or

2) To use this syntax:
;Sample first chapter
:[[Sample book/Sample first chapter|Sample first chapter]]
;Sample first chapter
:[[Sample book/Sample second chapter|Sample second chapter]]

In both cases the resulting PDF isn't properly formated:
1) In the first situation the chapter's names are formated as if they were subchapters, not as if they were chapters (and at Wikibooks the pages are usually chapters, so **the titles should be centralized and with lines at top/bottom **) and "Sample second chapter" usually starts in the middle of a page (instead of at the top, because the previous page isn't filled with blank space)

2)The second case shows each title two times (one centralized and one left aligned). If this is the way to solve the formating of title and make each chapter to start in a new page, then it is needed some way to suppress the uggly repetition of the same title with two diferent formatings.

The extension would really produce better results for Wikibooks books if it could handle this cases properly.

Maybe the following syntax should work and give the expected results:
;[[Sample book/Sample first chapter|Sample first chapter]]
;[[Sample book/Sample second chapter|Sample second chapter]]
(this was my first try to fix the bug, but unfortunatelly it didn't work)
Comment 1 Helder 2011-04-16 15:28:16 UTC
On
[[meta:Book_tool/Feedback#Question:_Formatting]]
it was described a similar problem which happens on Wikisources and it was provided a link to this ticket:
http://code.pediapress.com/wiki/ticket/419
Comment 2 Bugmeister Bot 2011-08-19 19:12:30 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 3 Marcin Cieślak 2014-09-01 08:49:19 UTC
As I understand the description it is not about problem with rendering but we wish to be able to provide customized table of contents for the book.
Comment 4 Helder 2014-09-01 11:16:49 UTC
It is a problem with the rendering.
> the resulting PDF isn't properly formated:
> 1) In the first situation the chapter's names are formated as if they were subchapters, not as if they were chapters ...
> 2)The second case shows each title two times (one centralized and one left aligned) ...
Comment 5 Marcin Cieślak 2014-09-01 12:48:32 UTC
It seems to me it is one bug, not two. There is also some misunderstanding of the Wiki syntax as pointed out in the [[:en:Help:Books/Feedback/Archives/2010/March#Bug:_It_is_not_possible_to_define_a_chapter_to_have_only_one_wikipage]]. 

Semicolon and colon create a definition table, similar (or exactly the same) as HTML's <DL> <DT>...</DT> <DD>....</DD> </DL>.

; starts a "defined term" (<dt>...</dt>)
: starts a "definition of the term (<dd>...</dd>)

"The second case" behaviour is therefore correct - one line should be left aligned and bolded, and the other intended.

Using ; and : is just a convention used by the Special:Book.

Here is my understanding:

 It should be possible to attach a single Wiki page on the top level
 of the book table of contents hierarchy.

It is then an enhancement request for the JavaScript bookmark editor.
Comment 6 Helder 2014-09-01 13:21:21 UTC
I know that, the point is that Collection extension uses ";" / ":" also to define the structure of the book. And the way it does so currently does not allow use to get the desired formatting for a book when we have a whole chapter consisting of a single page. Even with changes to the front-end, the current parser used for book pages do not produces the right structure for these books.
Comment 7 Nemo 2014-09-26 05:57:26 UTC
(In reply to Helder from comment #0)
> Maybe the following syntax should work and give the expected results:
> ;[[Sample book/Sample first chapter|Sample first chapter]]
> ;[[Sample book/Sample second chapter|Sample second chapter]]
> (this was my first try to fix the bug, but unfortunatelly it didn't work)

This is basically http://web.archive.org/web/20110722071901/http://code.pediapress.com/wiki/ticket/705 where volker said:
> I strongly support this feature request. If renaming articles would be easy on 
> the Special:Collection page a couple other problems/feature requests would be
> fixed in my option (like #355).
Comment 8 Nemo 2014-09-26 06:16:18 UTC
All this would be less painful (for subpage-enabled namespaces) if the BASEPAGENAME was always used by default.
Comment 9 Nemo 2014-09-26 06:24:12 UTC
#684 asked the same.
Comment 10 Gerrit Notification Bot 2014-09-26 10:18:00 UTC
Change 163139 had a related patch set uploaded by Nemo bis:
Respect $wgNamespacesWithSubpages by default

https://gerrit.wikimedia.org/r/163139
Comment 11 Helder 2014-09-26 14:03:49 UTC
Created attachment 16599 [details]
Current formatting.odt

The attached ODT file was generated with a collection like
------------------------------------------------------
== My Title ==
=== My Subtitle ===
;First chapter
:[[My Title/First chapter|First chapter]]
;Second chapter
------------------------------------------------------

The page "My Title/First chapter" had this wikitext:
------------------------------------------------------
Leading paragraph.
==First section==
Paragraph.
== Subsection ==
Paragraph.
==Second section==
Paragraph.
== Subsection ==
Paragraph.
------------------------------------------------------
Comment 12 Helder 2014-09-26 14:05:42 UTC
Created attachment 16600 [details]
Desired formatting.odt

This is how I want it to look like.
I don't really care what the syntax in the collection page should look like, as long as we can have the proper formatting of chapter name in the files, and not have duplicate titles (one from the chapter and another from the page title).
Comment 13 Helder 2014-09-26 14:15:26 UTC
Created attachment 16601 [details]
Current formatting2.odt

The other alternative we currently have, which is to add the pages (which ARE chapters on Wikibooks) as in
------------------------------------------------------
== My Title ==
=== My Subtitle ===
:[[My Title/First chapter|First chapter]]
:[[My Title/Second chapter|Second chapter]]
------------------------------------------------------
produces an ODF file like the one in this attachment.

Here:
* "My Title/First chapter" has the same content as before
* "My Title/Second chapter" has the content
------------------------------------------------------
Leading paragraph.
==First section==
Paragraph.
------------------------------------------------------
Comment 14 Helder 2014-09-26 14:16:54 UTC
Created attachment 16602 [details]
Desired formatting2.odt

This is how the second example should look like (i.e. page titles formatted with the style "Chapter").

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links