29

I have been searching for an answer to this question for years, sleuthing through dozens of pages of google search results and hundreds of ways to phrase the question, and not once have I found a good answer. I've found the same question I've been asking before, but it's never answered properly, so I'm going to be as clear as I possibly can here.

Section breaks are spaces between paragraphs used within chapters of a book to make it clear to the reader that their frame of reference is about to change, or that some other large detail is different. Going from one character to another, or to specify that some time has passed since the last paragraph. Here's what the wikipedia article has to say on the matter:

In written narrative such as fiction, sections are not usually numbered or named. Section breaks are used to signal various changes in a story, including changes in time, location, point-of-view character, mood, tone, emotion, and pace. As a fiction-writing mode, the section break can be considered a transition, similar to a chapter break.

As far as I can tell, LaTeX has no way to perform section breaks, at all. There's ways to emulate one, but there's no actual command you can use to signify a section break available in LaTeX. I have been using \bigskip\bigskip for a while, but now that I'm also using tex4ebook that's no longer working for me, as it's just a PDF visual change.

Please tell me I'm wrong. Please tell me there's a proper way of inserting a typographical section break that works in every place I need it.

  • 1
    I’d go for \bigbreak between the last paragraph of the section which is about to end and the first paragraph of the section that is about to begin. This, however, will simply insert a suitable amount of vertical space (or a page break if appropriate). You should make clear what kind of visual clue you want to show up in the printed page to mark the section change. I’m assuming that you do not want to insert a section title, right? – GuM Nov 27 '17 at 9:44
  • 3
    Depends a bit on the documentclass, memoir for example has some stuff for this type of thing. See the manual chapter 6.7. – Torbjørn T. Nov 27 '17 at 9:56
  • The package 'novel' answer your question. It provides commands for those kind of sectioning, with the ability to specify space clearance and even, some signs as asterisks. – djnavas Nov 29 '17 at 8:49
27

Edit: I've put the package on Github and released it on CTAN.

I also added new package option asterism and a new command \asterism, which will print the asterism symbol.

enter image description here

You can try the following package, sectionbreak.sty:

\ProvidesPackage{sectionbreak}
\usepackage{kvoptions}
\DeclareStringOption[2em]{preskip}
\DeclareStringOption[2em]{postskip}
\DeclareStringOption[\relax]{style}
\DeclareStringOption[~]{mark}

\ProcessKeyvalOptions*

\newcommand\pre@sectionbreak{\par\vskip\sectionbreak@preskip\relax}
\newcommand\post@sectionbreak{\par\vskip\sectionbreak@postskip\relax}
% print centered section break mark
\newcommand\print@sectionbreak[1]{%
  \bgroup%
  \noindent\null\hfill\sectionbreak@style\hbox{#1}\hfill\null\par%
  \egroup%
}
% default section break mark is an unbreakable space

\newcommand\sectionbreak[1][\sectionbreak@mark]{%
  \pre@sectionbreak%
  \print@sectionbreak{#1}%
  \post@sectionbreak%
}

\newcommand\sectionbreakmark[1]{%
  \gdef\sectionbreak@mark{#1}%
}

\endinput

It provides a document command, \sectionbreak. It has one optional argument, where you can specify characters which should be printed in the section break. For example, I've often seen *** used in this context. Default section mark is a space, so it doesn't print anything.

It is possible to change the used characters using mark option of the sectionbreak package. If you want to use more complicated mark, like rule or image, you can use the \sectionbreakmark command.

There are also options for dimensions which should be used for space before and after the mark, preskip and postskip. They are set to 2em by default. The last option is style, you can set it for example to \bfseries if you want the mark to be printed in the bold weight.

As you mentioned that you use tex4ebook, you will also need to provide a configuration file for tex4ht, because it would be translated insufficiently to HTML by default. It might look like this:

\NewConfigure{sectionbreak}{2}


\renewcommand\sectionbreak[1][\sectionbreak@mark]{%
  \a:sectionbreak\bgroup\sectionbreak@style #1\egroup\b:sectionbreak%
}

\Configure{sectionbreak}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="sectionbreak">}}{\HCode{</div>}}

\Css{div.sectionbreak{
  margin-top:3rem;
  margin-bottom:3rem;
  text-align:center;
}}

It declares new configuration hooks, sectionbreak, which are then inserted to redefined \sectionbreak command. The redefined command just inserts the HTML code configured in the hooks and the section break mark. The sectionbreak is then configured to insert the <div class="sectionbreak"> element. Using CSS, we center the section mark and define some vertical space before and after mark.

It can be used like this:
\documentclass{article}
\usepackage[mark=***]{sectionbreak}
\usepackage{lipsum}

\begin{document}
\lipsum[1-3]

\sectionbreak[!!!]

\lipsum[5-7]

\sectionbreak

\lipsum[1-2]
\sectionbreakmark{\rule{10em}{3pt}}
\sectionbreak

\lipsum[6-8]
\end{document}

This is the resulting PDF with asterisk mark:

enter image description here

And this is the resulting HTML, again with asterisks (this example comes from the original answer, where asterisks were used after the first \lipsum command, the correct marks are rendered in HTML as well):

enter image description here

<p class="indent" >   Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat at,
tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec nonummy
pellentesque ante. Phasellus adipiscing semper elit. Proin fermentum massa ac quam.
Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam
ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula
feugiat magna. Nunc eleifend consequat lorem. Sed lacinia nulla vitae enim.
Pellentesque tincidunt purus vel magna. Integer non enim. Praesent euismod nunc
eu purus. Donec bibendum quam in tellus. Nullam cursus pulvinar lectus.
Donec et mi. Nam vulputate metus eu enim. Vestibulum pellentesque felis eu
massa.
</p>
   <div class="sectionbreak">***</div>
<!--l. 10--><p class="indent" >   Fusce mauris. Vestibulum luctus nibh at lectus. Sed bibendum, nulla a faucibus
semper, leo velit ultricies tellus, ac venenatis arcu wisi vel nisl. Vestibulum
diam. Aliquam pellentesque, augue quis sagittis posuere, turpis lacus congue
quam, in hendrerit risus eros eget felis. Maecenas eget erat in sapien mattis
porttitor. Vestibulum porttitor. Nulla facilisi. Sed a turpis eu lacus commodo
facilisis. Morbi fringilla, wisi in dignissim interdum, justo lectus sagittis
dui, et vehicula libero dui cursus dui. Mauris tempor ligula sed lacus. Duis
cursus enim ut augue. Cras ac magna. Cras nulla. Nulla egestas. Curabitur a
leo. Quisque egestas wisi eget nunc. Nam feugiat lacus vel est. Curabitur
consectetuer.
</p>
  • Michal, there you go saving me once again! Thanks for the package! – gusbrs Feb 7 at 17:07
  • @gusbrs great! :) I've also fixed lot of ODT issues in tex4ht lately :) – michal.h21 Feb 7 at 17:15
  • I'm glad to hear that! :) – gusbrs Feb 7 at 17:18
13

The memoir class has various commands for producing what it calls "anonymous divisions". For example \plainbreak{2} will produce 2 blank lines while \fancybreak{{*}\\{* * *}\\{*}} typesets a centered little diamond made of asterisks. It also has commands to deal with the situation where, for example, blank lines are used in the middle of a page but something more indicative is need if the anonymous break occurs at the start or end of a page.

In my opinion it is always better to have some typographical marker for anonymous divisions (section breaks) rather than simply extra blank space.

Read the manual (texdoc memoir) for more information.

6

You could insert an empty sectioning command (which one depends on the structure of your document):

\documentclass{article}

\usepackage{lipsum}

\begin{document}
\lipsum[1-3]

\section*{}

\lipsum[5-7]

\end{document}
  • 1
    What's the correct command for \documentclass{book}? – iirelu Nov 27 '17 at 19:08
  • 2
    It depends on the content of your document and which sectioning levels you use. If you have only chapters I would use \section. – Ulrike Fischer Nov 27 '17 at 19:14
0

The OP assumes there were a »correct« way for a thing he calls section break. Obviously meant is a larger space between two paragraphs.

If you think twice, this larger space will become invisible, if there is a pagebreak between the two paragraphs. Using centered *** or a short line as a marker will look peculiar on the bottom of a page.

And what's the difference between beginning a new paragraph and an new paragraph after a larger break?

But if you must, it's just a blank line, then a new paragraph consisting of \mbox{} and another blank line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.