-
-
Notifications
You must be signed in to change notification settings - Fork 5
Add information about page anchors #8
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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). | ||
|
|
||
| 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. | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.