Section Break & Paragraph Style

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Section Break & Paragraph Style

BitPuffin
Hello folks! I've been using Asciidoc to try to write some fiction. And there are two issues that I've encountered thus far.

The first is that I haven't found any way to create a section break. A section break is the thing that is somewhere between a paragraph and a whole new chapter. It is usually delimited by a completely blank line in books of fiction, or with a line separating the sections. Here are two such examples from The Name of the Wind and Fahrenheit 451. (Unfortunately I did not check them after I took the photos that they were oriented correctly so please tilt your heads lol).

Is there a way to make one of these with AsciiDoc? The closest I have come to it is to do '<<<<<' which fills out the entire page with blank, but that's not quite what I want.

Second, the paragraph style, usually in fiction books, the paragraph formatting is such that when a new paragraph starts it's simple one newline (no empty newline) and a leading indentation, is there a way to configure asciidoc to do this instead, because I really just want section breaks to look like paragraphs normally do sort of (though maybe two blank lines not sure, I'll take whatever I can get, as long as I know the syntax for it).

And those are my two questions, otherwise I'm quite enjoying the tool, it's quite nice to do the whole 1 sentence per line thing for example, which I can't really do in a word processor since that also encapsulate the formatting.

Cheers.
Ted
Reply | Threaded
Open this post in threaded view
|

Re: Section Break & Paragraph Style

Ted
This post was updated on .
Looking at the docs it looks like you can only center images or text inside table cells. So you could create an image of the Section Break you want and then center it. Or use some asterisks or an icon inside a table cell.

= Test Section Break

image::sectionBreakImage.png[align="center"]

Espresso, and steamed single shot eu brewed ut latte cortado.
Black, iced aromatic, et extraction shop a plunger pot trifecta.
Steamed acerbic, qui, in milk extra pumpkin spice mazagran blue mountain coffee decaffeinated medium.
Coffee, siphon et americano french press latte roast trifecta est cortado breve.
Sugar single origin, arabica whipped percolator body that macchiato.

[cols="1*^", frame=none]
|===
| icon:ellipsis-h[2x]
|===

Iced and macchiato, crema to go dark kopi-luwak spoon.
Robusta in medium, as white arabica flavour con panna spoon.
Siphon at variety grinder redeye variety bar galao crema.
Whipped skinny grinder bar single origin rich americano espresso single shot.
Cream cafe au lait, espresso blue mountain so single shot medium redeye.


As far as the second paragraph style goes, that could be accomplished with a custom style sheet. Perhaps others here have some better ideas than mine?
- Ted @TedAtCIS
Reply | Threaded
Open this post in threaded view
|

Re: Section Break & Paragraph Style

BitPuffin
Hmm yes an image seems like a possible workaround. Though I really wish that it was a feature of AsciiDoc since it kind of is part of the content, and is present in almost every fiction book I've read.

As for the style sheet, I thought of that, however my thinking is that it would only work while exporting to HTML? Or am I wrong to assume this? I wish I could make it have that formatting in say, pdf, epub, mobi and so on.

Either way thanks for your input!

Oh, and I'm not sure I understood the section in the middle of your example:

[cols="1*^", frame=none]
|===
| icon:ellipsis-h[2x]
|===

Not sure what that would do.

Thanks!
Ted
Reply | Threaded
Open this post in threaded view
|

Re: Section Break & Paragraph Style

Ted
I did some research. The following paragraph style works well when rendering to HTML. (It did not work for PDF and I didn't try ePUB)

Using an image for the section break worked in HTML and PDF.

You'll need 3 files to make this work:

1. fictionBook.adoc
= Fiction book
:docinfo1:
:icons: font
:blank: pass:[ +]

Carajillo coffee strong doppio, crema café au lait as single origin foam. Robusta, half and half, caffeine macchiato a caffeine cup arabica. Carajillo java in filter to go eu, cultivar robusta coffee organic grinder decaffeinated.

Rich dripper caramelization ut skinny ut that mazagran acerbic coffee. Coffee macchiato, doppio est grounds flavour, eu cultivar percolator white eu beans. Wings, a fair trade et galão coffee acerbic, wings latte strong medium cream.

{blank}

image::sectionBreak.jpg[align="center"]

Spoon black arabica sit sugar trifecta carajillo strong cream wings. Aroma con panna single origin single shot est blue mountain that mazagran doppio. Single origin barista as, seasonal viennese doppio, single origin coffee instant aftertaste redeye.

Mocha cream beans, brewed bar that caffeine bar brewed filter kopi-luwak. Cortado americano mocha macchiato so shop sugar. Instant doppio, brewed, pumpkin spice grinder, wings, to go mug chicory americano crema body.


2. docinfo.html
<style type="text/css"> p { text-indent: 25px; margin-bottom: 0; margin-top: 0; text-align: justify; } </style>

3. sectionBreak.jpg
A small image file with a black hairline.  


At the command prompt, generate the HTML with this command:

>asciidoctor fictionBook.adoc



The table example is what you would use if you don't have an image file. So instead of this:
image::sectionBreak.jpg[align="center"]

use this whole thing:
[cols="1*^", frame=none]
|===
| icon:ellipsis-h[2x]
|===

It will produce a "***". Unfortunately the table didn't turnout 100% in the HTML, so the icon is not centered.
- Ted @TedAtCIS
Ted
Reply | Threaded
Open this post in threaded view
|

Re: Section Break & Paragraph Style

Ted
The other thought I had was the sectionBreak.jpg file could have some built in white space. This would eliminate the need to have the {blank} line that's used to compensate for the paragraph's zero bottom margin.

The image would be created with about 1/4" of white above the black line.

- Ted @TedAtCIS
Reply | Threaded
Open this post in threaded view
|

Re: Section Break & Paragraph Style

ngrilly
In reply to this post by BitPuffin
To create an empty paragraph to mark the beginning of a new section, enter a paragraph containing only   (this the HTML for a non-breaking space). No need to create and use a {blank} macro.