Last modified: 2014-09-26 14:16:54 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)
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
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
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.
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) ...
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.
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.
(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).
All this would be less painful (for subpage-enabled namespaces) if the BASEPAGENAME was always used by default.
#684 asked the same.
Change 163139 had a related patch set uploaded by Nemo bis: Respect $wgNamespacesWithSubpages by default https://gerrit.wikimedia.org/r/163139
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. ------------------------------------------------------
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).
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. ------------------------------------------------------
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").