Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructuring for PDF/HTML compatibility and numbering #367

Merged
merged 17 commits into from
Jan 30, 2020
Merged

Conversation

adswa
Copy link
Contributor

@adswa adswa commented Jan 23, 2020

This PR restructures the table of contents in the HTML and PDF version of the handbook. This is done to reduce the significant mismatches between HTML and PDF version (see #38 (comment) for an overview of problems I have identified), and to create a handbook toctree that is allows easy navigation based on Chapter or usecase numbers.

In particular, this PR:

  • adds chapter-level toctrees for Basics chapters. This allows to reference chapters (instead of only sections), but more importantly, it allows to combine the 10 index toctrees for the Basics to a single toctree. With this change, the PDF output has one part for the Basics (instead of 10), and what the HTML refers to as "chapters" is now also a chapter in the PDF.
  • adds roman numerals to the chapter headings. This is to introduce a form of numbering of chapters for doclinks to refer to, without causing confusion in the (differently, but arabic) numbered table of contents in the PDF
  • numbers sections and subsections within chapters automatically. (I.e, Chapter "Roman numeral"; Section "Arabic numeral", highest section number within a chapter is 6 currently. Example of what would be navigatable: "See Chapter IV, Section 2.3 for more details")
  • automatically numbers the use cases (Arabic numerals)
  • cherry-picks agreed-upon changes from Further Latex improvements #353 to improve the general feel of the PDF (remove blank pages, enforce figure positions, DataLad-ish heading and background colors, keep hidden sections hidden also in PDF). I will close Further Latex improvements #353 in favor of this PR.
  • cherry-picks useful commits from Restructure usecases #366 (transform usecase intro into a list). I will close Restructure usecases #366 in favor of this PR.
  • some configurations to the latex preamble in conf.py that give a detailed table of contents in the PDF, and allow for a sidebar navigation that resembles that of the toctree in the HTML

adswa added 15 commits January 23, 2020 09:07
same functions as toctree, but no potential problems in PDF
prev. figures were needlessly placed in the middle of otherwise empty pages, or too far after the text they applied to
This change gives a detailed toctree down to subsection level and a sidebar navigation that mirrors that of the books index page.
this is to reduce mismatch between html and pdf numbering
- rely on chapter level toctrees for the basics chapters and combine the basics into a single
toctree. This has two advantages: shows the Basics in html as one consecutive part, and leads to 'basics' being a single part in the PDF (instead of 10 different parts)
- insert small figures with additional captions to make the distinction between the book parts more clear
- Set the toctree depth to 2 to show chapters (e.g. DataLad, Runand sections (e.g., Keep track)
This allows that the Basics are a single part and to reference chapters (instead of only sections). The toctrees are hidden in the PDF, and chapters start with an illustration
@adswa
Copy link
Contributor Author

adswa commented Jan 23, 2020

FTR: If this PR is merged, I think the only severe deficiency of the PDF version of the book is that findoutmores are not distinguishable from the main text.

@adswa
Copy link
Contributor Author

adswa commented Jan 23, 2020

Note that for across docs referencing we can insert reference handles at any point in the rst documents. An example is http://handbook.datalad.org/en/latest/basics/101-136-filesystem.html#removing-annexed-content-entirely. With the numbering, we can refer to this paragraph with "Chapter VIII, 2.7.2")

@adswa adswa mentioned this pull request Jan 24, 2020
1 task
@adswa
Copy link
Contributor Author

adswa commented Jan 28, 2020

@mih, let me know whether you're okay with this PR. There's left-over TODOs (we talked about custom numbering in Latex table of contents, numerals types are still subject to discussion), but if possible, I'd like to have the general restructuring in master soon-ish to sort the new usecases in. :)

@mih
Copy link
Collaborator

mih commented Jan 30, 2020

Sure, go ahead. I might come back to this at a later point in time. Thx!

@adswa adswa merged commit 2f977c2 into master Jan 30, 2020
@adswa adswa deleted the doclinks branch January 30, 2020 14:10
@adswa adswa mentioned this pull request Apr 2, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants