I'm trying to write a novel using bookdown: HTML, EPUB, as well as PDF (pdfLaTeX). I'm using the indent mode, so paragraphs begin with an indent. I have the following custom LaTeX command, called \scenebreak
, which:
Here's the LaTeX:
% scene breaks
\renewcommand{\pfbreakdisplay}{%
\scriptsize\ding{86}}
\newcommand{\scenebreak}{\pfbreak*\noindent}
\newcommand{\forceindent}{\leavevmode{\indent}}
When introducing the scenebreak in LaTeX, I call it so
Text here
\scenebreak
New scene begins here.
In HTML, this is how I've done it:
<div style='text-align:center;'>•</div>
I'm aware that a block
in bookdown is like a LaTeX environment.
Is a similar setup possible with commands/macros?
There are several common ways of indicating a scene break within a chapter in a book. Perhaps the most common is to simply add an extra blank line between paragraphs: Here, the blank line between paragraphs shows the reader that a shift has occurred (in this case, we skip forward to the next day).
For scene breaks within a chapter, insert one line with three asterisks centered. Don't use underlines or boldface anywhere in the text of your story. Use italics sparingly.
Variable Number of Scenes Per Chapter: You must have at least one scene per chapter. It may only be one word or one sentence, but it still counts as a scene.
In book terms, a scene is an important point in your story where a character tries to accomplish a goal but faces obstacles. A chapter is a pause in a novel, usually demarcated by a page break and new heading. Scenes are essential to the plot, whereas chapters just help to break up the narrative and control the pace.
I don't really understand your question, but if you are trying to write out different content depending on the different output format, here is what you could do:
```{r echo=FALSE}
knitr::asis_output(if (knitr:::is_latex_output()) {
"\\scenebreak"
} else {
"<div style='text-align:center;'>•</div>"
})
```
If you have to do this multiple times, create a function and call the function instead, e.g., insert this code chunk in the beginning of your book:
```{r, include=FALSE}
scenebreak = function() {
knitr::asis_output(if (knitr:::is_latex_output()) {
"\\scenebreak"
} else {
"<div style='text-align:center;'>•</div>"
})
}
```
Then use the function scenebreak()
where a break is needed:
```{r echo=FALSE}
scenebreak()
```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With