In preparation for making a new release with ebook builds, I was looking through the PDF (English) output today, and noticed a few things that could be improved in the formatting:

a) There is a lot of vertical whitespace between topic headings and the text in the chapter.

b) There is not much vertical whitespace between the end of one topic and the next topic heading.

I'll keep looking through and see if I find anything else... add comments here... and then fix them if possible. Overall it looks pretty good.

Comments

jhodgdon created an issue. See original summary.

jhodgdon’s picture

c) Numbered lists. The number is followed by a . but the . gets swallowed by the text if there are steps numbered with two digits (10, 11, ...). Topic "Adding basic fields to a content type" is an example.

jhodgdon’s picture

I've made a small tweak to the PDF stylesheet file scripts/pdf.xls, which takes care of 2 of the 3 problems (b and c).

It turns out that the extra vertical whitespace between topic headers and the first text in the chapter is due to the index entries. We have things like:

[role="summary"]
Overview of Drupal and the reasons to choose it as a reliable Content Management System (CMS).

(((CMS (Content Management System),overview)))
(((Content Management System (CMS),overview)))
(((Drupal content management system,overview)))
(((Drupal content management system,server requirements)))
(((Drupal core,overview)))
(((Drupal.org website,downloading modules and themes from)))

//==== Prerequisite knowledge

==== What is a Content Management System?

The block of index entries is creating a paragraph in the output. It renders as a blank paragraph. This is true in the e-book as well as HTML output.

What we need to do to fix this is attach the index entries in the source to particular paragraphs of text. So it should be something like:

==== What is a Content Management System?

(((CMS (Content Management System),overview)))
(((Content Management System (CMS),overview)))
(((Drupal content management system,overview)))
A content management system (CMS) is a software tool that lets users add,
publish, edit, or remove content from a website, using a web browser on a
...

And then the other index entries would go with text about them.

There may be a way to fix this using a script... but not today. So, leaving this open.

  • jhodgdon committed 3ab0725 on 8.x-2.x
    Issue #2859434 by jhodgdon: PDF formatting tweaks
    
  • jhodgdon committed fff8675 on 8.x-2.x
    Issue #2859434 by jhodgdon: Refactor addnames script so it is more...
jhodgdon’s picture

Well, maybe I will get to it today. As a first step, I refactored the addnames script so that it can handle adding more preprocessing steps, and that a command line argument can decide which steps we need (we don't do it for ebooks). Next I can try to figure out a way to move the index entries to a better place reliably...

jhodgdon’s picture

Status: Active » Fixed

I managed to tweak the XSLT so that this is now working well for HTML and PDF/eBook output.

  • jhodgdon committed 34e2dc1 on 8.x-2.x
    Issue #2859434 by jhodgdon: Fix extra space from index entries
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.