alan-if / alan-docs

Alan IF Documentation Project
https://git.io/alan-docs
Other
4 stars 0 forks source link

Fix PDF Vertical Gaps #69

Closed tajmone closed 4 years ago

tajmone commented 5 years ago

This commit fixes #65 by removing every vertical space gaps in the PDF Manual due to concealed index terms on independent lines preceding a BNF code block (as well as other encountered gaps too).

In some section that began with a BNF rule, in order to avoid the vertical gap I had to either:


Before merging:

After merging:


Live Preview links

These links point to the beta7-prep-PDF-gaps branch, and will work even after force-pushing to the PR:

tajmone commented 5 years ago

@thoni56, here's the full list of the vertical gaps fixed in the document:

A FEW NOTES:

tajmone commented 5 years ago

@thoni56,

you might want to look at the sections listed above after:

  • Add a short paragraph (eg: "Syntax:") before the BNF rule:

I've explained in #65 why I needed to do that. I didn't want to alter the text dramatically, so I've just added "Syntax:" when I couldn't swap the BNF with the first paragraph.

This allows for easy substitution, in case you don't like it — and maybe prefer something like "Grammar rule:", or otherwise.

In any case, we can always polish the text later, but right now I wanted to get rid of those horrible vertical gaps in the PDF (they were quite huge and visible).

Also, I think that syntax element sections should always start with a brief sentence describing the purpose and use of the element, immediately followed by its BNF grammar, and then all further explanations and examples.

thoni56 commented 4 years ago

Is there a way for me to get at a PDF with this change without building it?

I should probably set up the toolchain anyway, but I thought to give quick feedback.

I don't have any general objections except that if there is this type of "restrictions" it will be hard to remember, e.g. that grammar rules section need to have a paragraph before it. (I like when we can fix so that the problem can't happen again, but I know that is your ambition too!)

tajmone commented 4 years ago

Is there a way for me to get at a PDF with this change without building it?

Yes, I could rebuild the PDF and amend the PR, but .... I fear this might disrupt the current status of things due to Asciidoctor having been updated since these PRs, which would introduce further conflicts.

You can peek at the Live HTML preview of the Manual, as per this PR status, at this link:

but this won't show the changes in the PDF (which is what this PR addresses).

We should wait for the branch conflicts to be solved first, to avoid further messing the conflicts status. Also, this PR can't be merged until PR #67 is merged (don't remember why).

I'll try to build a PDF preview of this and send it to you via email, tonight.

tajmone commented 4 years ago

PDF Live Preview

The PR actually does contain a PDF preview of the document (forgot about it):

Although it's not the best of Git practices to include built documents (HTML, PDF, etc.) in the actual commits, I did always include them to simplify previewing the results and discussing them without having to rebuild the whole thing (unfortunately, the toolchain is still a bit complex to set-up, and dependencies might get updated often).

tajmone commented 4 years ago

Great! I'll have to wait for PR #67 to be merged before merging this one, and also handle the various tasks mentioned at the top.

tajmone commented 4 years ago

PR Manually Merged

Due to the problems with the PR info not being updated after the force push, I've opted to manually merge the PR branch and close this PR.

The issue of GH not updating is a known problem, so in this case I deemed it safer to drop the PR procedure.