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]{\...
Daniel's user avatar
  • 377
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 ...
Frank Mittelbach's user avatar
22 votes
Accepted

How to get this fancier line to divide paragraphs?

The requested symbol and several other similar ones are part of the package https://ctan.org/pkg/pgfornament. Below is a screenshot from the pages 20 and 21 of the manual. You see that your ornament ...
CampanIgnis's user avatar
  • 4,539
20 votes
Accepted

Why does \color{blue} after \paragraph{...} color the paragraph title blue?

\paragraph is set at the start of the next paragraph. The next paragraph starts with the first letter O of Only after \color{blue}. Fixes: \leavevmode to explicitly start the paragraph before the ...
Heiko Oberdiek's user avatar
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 ...
egreg's user avatar
  • 1.1m
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
Shubham Sharma's user avatar
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 ...
Fran's user avatar
  • 79.4k
14 votes

How to write the following section in LaTeX?

You can use the enumitem package to make your life easy: \documentclass{article} \usepackage{amsmath} \usepackage{enumitem} \begin{document} \begin{enumerate}[start=42] \item Prove that, \begin{...
Au101's user avatar
  • 10.3k
14 votes

Why does \color{blue} after \paragraph{...} color the paragraph title blue?

To complement Heiko’s (as usual) fine answer, some more words about the workings of \paragraph. The command is defined in terms of \@startsection with a certain set of parameters, one of which is ...
egreg's user avatar
  • 1.1m
11 votes
Accepted

How to reverse section numbering for right-to-left languages?

Using the solution from Fix nested section numbers in RTL languages with polyglossia (and no, I haven't gotten down to why this works yet): \documentclass{book} \usepackage{polyglossia} \...
Mike Renfro's user avatar
  • 20.5k
11 votes
Accepted

How to add rectangle or other symbols before section name?

You already added titlesec to your tags, so you could use this package. For example like this: \documentclass[utf8]{article} \usepackage{titlesec,xcolor} \titleformat{\section}{\bfseries\Large}{\...
Jasper Habicht's user avatar
10 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} \...
finefoot's user avatar
  • 499
10 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 ...
esdd's user avatar
  • 85k
10 votes
Accepted

Figure is placed in a wrong position

\usepackage{float} And then say \begin{figure}[H]
Ptheguy's user avatar
  • 353
10 votes

How to write in the following manner?

Combining one of the examples from the Wikibook and the matching package documentation, we get the following. \documentclass[12pt]{exam} \usepackage{tasks} \settasks{ counter-format=(tsk[r]), ...
Johannes_B's user avatar
  • 24.1k
9 votes

How to reference \paragraph?

If you use the hyperref and the nameref package and label your paragraph: \paragraph{The Elephant}\label{para:xyz} Than you can use \autoref{para:xyz}, \nameref{para:xyz} within your code to get e....
MrAnimaniac's user avatar
9 votes

How to add an extra level of sections with headings below \subsubsection

With KOMA-Script classes you do not need nor should use an extra package to redefine sectioning commands or define new sectioning levels. And you don't need and should not use low level code. These ...
Schweinebacke's user avatar
9 votes
Accepted

How to create subsubparagraph and subsubsubparagraph?

Note that package titlesec breaks some of the KOMA-Script features. So it is not recommended to use this package together with scrartcl. You can use \DeclareNewSectionCommands and \...
esdd's user avatar
  • 85k
8 votes

Start new page with each section

The accepted answer in that form won't work as expected in LyX. This solution causes problems when the document includes a ToC and hyperref support: It makes the paging of the hyperref links be off-...
landroni's user avatar
  • 1,333
8 votes

How to suppress the final period (".") in paragraph titles?

And for the case that the puplisher complains that you did redefine internal commands here an add-hoc solution: \documentclass{elsarticle} \newcommand\eatpunct[1]{} \begin{document} \paragraph[Bla?]{...
Ulrike Fischer's user avatar
8 votes

Prevent widowing/orphaning of sections that can fit on one page

Here is one suggestion. Change the auto-generation of the code so that \section{<title>} ... is replaced by \begin{chunk}{<title>} ... \end{chunk} Use environ to define the ...
cfr's user avatar
  • 194k
8 votes
Accepted

Paragraph title in ConTeXt (similar to LaTeX \paragraph{})

Simply set alternative=text to get the correct spacing. With altenative=text, before and after keys are ignored. Instead you can use commandafter to set the bullet after the section title. By default, ...
Aditya's user avatar
  • 62k
8 votes

How to manually set the subsection number

Is there a way to start the page with a 5.2 subsection? How about \clearpage % start a new page here \setcounter{section}{5} \setcounter{subsection}{1} \subsection{Hello World} % increments '...
Mico's user avatar
  • 495k
8 votes
Accepted

Beamer automating numbering sections and subsections

Numbering of sections and subsection is automatic in latex - so I guess your question might be how to display these numbers? To display them in the toc: \setbeamertemplate{section in toc}[sections ...
samcarter_is_at_topanswers.xyz's user avatar
8 votes
Accepted

KOMA-Script scrbook: How to remove period after sections and subsections?

If only chapters should get a dot at the end of the numbers, you can use numbers=noenddot to remove the enddot for all numbers. The dot for chapters in headings and ToC can be added by \usepackage{...
esdd's user avatar
  • 85k
8 votes
Accepted

Change "paragraph" to "subsubsubsubsection"

To make \autoref work properly you need to add \def\paragraphautorefname{subsubsubsubsection} or better, if you use babel(for example \usepackage[english]{babel}) : \addto\extrasenglish{% \def\...
Ivan's user avatar
  • 4,348
7 votes

Start new page with each section

Another solution, which uses the sectsty package: \usepackage{sectsty} \sectionfont{\clearpage}
Mico's user avatar
  • 495k
7 votes

How to reference \paragraph?

I agree that the \setcounter{secnumdepth}{6} is an answer (though, \setcounter{secnumdepth}{4} is enough, because 5 is a subparagraph. The side effect is, however, that paragraph appears numbered. ...
Viatcheslav Nesterov's user avatar
7 votes
Accepted

referencing Subsubsection is not working as intended

You need to set the secnumdepth counter to at least 3 to get the correct sectioning numbers to be generated: \documentclass[12pt]{report} \setcounter{secnumdepth}{3} \begin{document} \chapter{...
Alan Munn's user avatar
  • 215k

Only top scored, non community-wiki answers of a minimum length are eligible