Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions sectioning.asciidoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,45 @@
The projects preferred markup format is http://asciidoctor.org[Asciidoc].
Asciidoc has a lot of great features, but denoting chapter and title information is the first step in making beautiful ebooks.
Sectioning
----------

The project's preferred markup format is http://asciidoc.org[Asciidoc].
Asciidoc has a lot of great features, but denoting title and chapter information is the first step in making beautiful ebooks.

The title of the book should have a row of dashes underneath. This turns into a Level one header +<h1>+
== Titles
The title of the book should have a row of hyphens underneath. This turns it into a level-one header (+<h1>+ in HTML).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is the recommended format in the python Asciidoc documentation. I am now in favor of the Asciidoctor style guide, which says to use one leading =.

Thank you for updating this, it is very clearly out of date.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm a bit confused about what's Asciidoc standard and what's just the conventions of various communities that use it! But yes, it makes sense that the title be considered outside of the heading hierarchy and so therefore the highest headings should all be level-1.


Alice in Wonderland
-------------------

Chapters should have two equals signs. This turns into an +<h2>+ tag in html
Subtitles are not supported in Asciidoc, but can be included in the title separated by a colon. They will be included in works' metadata.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to say subtitles are not supported by asciidoc. If the primary use case is a subtitle in the document title, that's probably something to support in metadata.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Although, I've just noticed this: http://asciidoctor.org/docs/user-manual/#subtitle-partitioning

== Chapters, sections, and subsections
Chapter headings should have two equals signs. This turns into a level-two header (+<h2>+ tag in HTML).

== Chapter 1
Paragraph text &etc
Paragraph text &c.
== Chapter 2

If the book is broken up into smaller subsections than chapters, you can use more equal signs:

== Chapter 9
=== Section A
=== Section A

If a chapter or section heading has a title as well as a number, put them all on the same line and separated by a colon:

== Chapter 5: Advice from a Caterpillar

== Pages
Where a Gitenberg book has scans of the original available,
you can choose to include page-markers (http://asciidoc.org/userguide.html#X30[anchors] in Asciidoc)
to make it easier to relate the text to the original images.
These are invisible in the formatted output.

First came ten soldiers carrying clubs; these were all shaped like the three
gardeners, oblong and flat, with their hands and feet at the corners: next the
ten courtiers; these were ornamented all over with diamonds, and walked two
and [[source-page-115]] two, as the soldiers did. After these came the royal children;
there were ten of them, and the little dears came jumping merrily along hand in
hand, in couples: they were all ornamented with hearts.

The anchor should be of the form `[[source-page-x]]` where `x` is the number of the page.
If a word is hypenated across the page, put the anchor in the next available whitespace.