50
votes
48
votes
Making the bibliography appear in the table of contents
Another simple solution with Biblatex is found at https://fr.sharelatex.com/learn/Bibliography_management_with_biblatex
\printbibliography[
heading=bibintoc,
title={Whole bibliography}
]
\...
35
votes
Formatting section titles
I'd like to take a crack at this question, because 5 years ago I landed here and thought titlesec was the best way to do this. That may or may not be true.
The class settings are perhaps obvious to ...
34
votes
What is this symbol in LaTeX? And where do I get it?
It's hard to judge the scale of your fleuron, but you can design something similar using the TikZ calligraphy library.
In the code below, the \pen command defines the angle (30°) and width (2mm) of a &...
29
votes
How to get default formatting for \chapter, \section, etc.?
The standard classes are defined as follows (copied from titlesec reference, section 8.2)
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\...
28
votes
Accepted
The correct way to perform a section break in LaTeX
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.
You can try the following ...
24
votes
How to add an extra level of sections with headings below \subsubsection
I know this is an old question, but I found it with Google and I think the solutions are too complicated.
For me this is the easiest way for a subsubsubsection:
\newcommand{\subsubsubsection}[1]{\...
24
votes
How can one keep a \section from being at the end of a page?
You should use the option
\usepackage[nobottomtitles*]{titlesec}
This will prevent your heading titles to be displayed at the bottom of the page and it will place your heading in the next page.
24
votes
Footnote in sub-section title
I think "don't do that" is not a helpful answer. Section footnotes are often very useful!
According to: http://www.tex.ac.uk/FAQ-ftnsect.html
The correct thing to do is the following:
% in the ...
22
votes
Accepted
beautiful section styles
If you're using LuaLaTeX, use the version below with lua-ul.
soul based solution
Answer based on titlesec and soul:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[...
22
votes
Accepted
Why is \paragraph treated as level below \subsubsection?
Historically speaking this is inherited from Scribe (designed by Brian Reid in 1979 or so). This system heavily influenced many decisions that Leslie made and you can trace a lot of LaTeX back to ...
21
votes
''subsubsection''-level headers not numbered by default
I'm guessing that your document class is either report, book, scrreprt, or scrbook -- or a document class that's based on one of these four classes. These document classes have the following setting ...
20
votes
Start new chapter on same page
I have used this whenever I needed to add one chapter to the previous page:
\begingroup
\let\clearpage\relax
\chapter{My Chapter}
\endgroup
It doesn't change the rest of the chapters, or anything ...
19
votes
Is it possible to create a new sectioning level?
Sure. There’s no reason you can't go infinitely in any direction.
In book, the section level of \part is -1. You just need to define a level which has level -2.
Dig into book.cls and you'll find the ...
18
votes
Accepted
Remove bibliography part in table of contents
To avoid thebibliography from setting a section-like entry in the ToC, wrap the following around it:
\let\oldaddcontentsline\addcontentsline% Store \addcontentsline
\renewcommand{\addcontentsline}[3]{...
17
votes
Continuous v. per-chapter/section numbering of figures, tables, and other document elements
Patryk's answer works perfectly. But you need to reset the counter of tables, figures, equations, etc. manually every time you want to start your object labels at "1" again. So it would be more ...
17
votes
Accepted
Inserting a table in a two column document
Use table for single column floats and table* for double column floats.
\documentclass[twocolumn]{article}
\usepackage{booktabs,chemformula}
\begin{document}
\section{Electronic Structure}
\input ...
16
votes
Accepted
Empty lines or not?
Just use blank lines where logically you want a paragraph break. Section headings naturally form paragraph breaks already so a blank line before or after them makes no difference. For other constructs ...
16
votes
Accepted
\subsubsubsection for scrbook
Update (needs KOMA-Script version 3.26b)
The original answer below is still correct. But there are the new command \RedeclareSectionCommands, the new options runin and afterindent. And there are some ...
15
votes
Accepted
Start new page with each section
With an uptodate TeX distribution you can use
\AddToHook{cmd/section/before}{\clearpage}
Example:
\documentclass{article}
\AddToHook{cmd/section/before}{\clearpage}
\begin{document}
\tableofcontents
...
15
votes
paragraph style - how to force line break? \paragraph{} \\ - make paragraph a header?
I have seen many hacks for this, including \mbox{} and other approaches but this one is the most convenient!
\paragraph ~\\
Source for the answer
15
votes
How to add an extra level of sections with headings below \subsubsection
The are two good answers to show how to add a new level section or modify an existing one. But both are assuming some basic knowledge of LaTeX and typography. Maybe these remarks can help to new ...
15
votes
Accepted
Define new section
There really are a number of different ways to achieve what you want. Some are simpler than others and may work just as well.
Use existing levels if possible
It really only makes sense to add a ...
14
votes
How to add an extra level of sections with headings below \subsubsection
This very excellent answer can also very easily be expanded to add \subsubsubsection and \subsubsubsubsection commands:
\documentclass{article}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\...
14
votes
Accepted
How can I make a command like \tag, but for chapter numbering?
One needs to redefine both \thechapter and \thesection immediately before the chapter in question, and one needs to revert to the default definitions immediately before the next chapter. If you have ...
14
votes
Accepted
Frame whole sections in ConTeXt
You can use the textbackground environment to put a frame around the content of a section. With the beforesection and aftersection keys you can start and stop the frame at the begin and end of a ...
13
votes
KOMA-Script: change font of sectioning headings to serif
As was suggested here, there is also an option that can be set that also modifies the size of the headings slightly to match that of the standard classes.
\documentclass[headings=standardclasses]{...
13
votes
Accepted
13
votes
Accepted
How can I change the font color of entire subsection?
Put \color{red} at the start of the section and \color{black} at the end.
In the standard classes at least, section headings pick up the current colour.
This of course requires the color or xcolor ...
13
votes
The correct way to perform a section break in LaTeX
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sectioning × 5387table-of-contents × 701
chapters × 662
numbering × 634
titlesec × 572
formatting × 351
spacing × 323
koma-script × 313
header-footer × 280
sections-paragraphs × 265
memoir × 253
beamer × 222
page-breaking × 176
hyperref × 168
cross-referencing × 157
appendices × 137
macros × 132
fonts × 122
indentation × 121
horizontal-alignment × 117
context × 104
color × 103
bibliographies × 94
parts × 93
floats × 92