45
votes
42
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}
]
\...
37
votes
remove sections numbering
To center the sections, you could for example use the sectsty package
One way to remove the numbers from the sections is to use unnumbered sections denoted by the stars.
\documentclass[a4paper,...
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 &...
33
votes
How to put a line-break in section heading?
I recently ran into a similar issue where my section title was being split across two lines, but only one or two words were ending up on the second line. I wanted to manually insert a line break so ...
33
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 ...
29
votes
Making the bibliography appear in the table of contents
Here a simple solution for biblatex. Then you can omit the heading and just add a sections as you like.
\section{References}
\printbibliography[heading=none]
28
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 ...
25
votes
Accepted
Hide sections of specific chapter from table of contents
You can change the value of the counter tocdepth mid-document, writing it to the ToC at the appropriate spot. This allows you to vary what shows and what doesn't show.
\documentclass{report}
\begin{...
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]{\...
23
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.
22
votes
Accepted
Is it possible to input a file while lowering every section it has by 1 level?
\documentclass{article}
\begin{document}
\section{Doc A}
{
\let\section\subsection
\let\subsection\subsubsection
\input{docA}
}
\section{Conclusions}
Very good.
\end{document}
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 ...
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 ...
20
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 ...
20
votes
Accepted
beautiful section styles
Answer based on titlesec and soul:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[explicit]{titlesec}
\usepackage{soul}
\definecolor{titleblue}{HTML}{4a7aa4}
\...
19
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 ...
18
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 ...
17
votes
Giving headlines a background color spanning across the entire typearea
Here is a suggestion redefining the new command \sectionlinesformat that is explained in the documentation of version 3.19 or newer:
\documentclass{scrartcl}[2015/09/15]
\usepackage{blindtext}% dummy ...
16
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 ...
16
votes
Accepted
How to suppress the final period (".") in paragraph titles?
The definition in elsarticle is badly written, because it unconditionally adds a period.
You can change it in a way that will add the period only if no punctuation follows the title with the help of ...
16
votes
Accepted
Definitions and theorems in beamer
If you disable the automatic creation of Theorem blocks by beamer and do like the usual way using amsthm you can format all easily.
So, the option notheorems disable the automatic process and then ...
16
votes
How to format section headings?
Like so?
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}{\centering\large}{}{0em}{\MakeUppercase}[\titlerule]
\begin{document}
\section{This}
\end{document}
(Some hints were ...
16
votes
Accepted
How can I make a "fake" subsection number?
Define an environment within which counter stepping and ToC-writing is disabled. This allows great freedom:
\documentclass{article}
\usepackage{xparse}
\newcounter{savesection}
\newcounter{...
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
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
\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
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
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sectioning × 5301table-of-contents × 688
chapters × 656
numbering × 625
titlesec × 568
formatting × 343
spacing × 322
koma-script × 308
header-footer × 276
sections-paragraphs × 262
memoir × 251
beamer × 215
page-breaking × 175
hyperref × 164
cross-referencing × 153
appendices × 137
macros × 130
fonts × 120
indentation × 120
horizontal-alignment × 116
context × 103
color × 100
bibliographies × 95
floats × 91
parts × 89