12
votes
Accepted
Beamer: How to add progress bar with section titles?
I know it's been a while, but you can blame the lockdown here in France for providing me free time...
I started from Gonzalo Medina's proposal and build the missing stuff around it.
I believe this ...
9
votes
Accepted
Size of integral symbol in section header with mlmodern
EDIT: As egreg correctly noted in the comments below, the change that we describe in the answer here will last temporarily since, on a subsequent update of the package, the change we propose will be ...
8
votes
Accepted
Part of subsection title not in bold
The analogue of \textbf for medium (not bold) is \textmd so..
\textmd{THIS IS NOT BOLD}
8
votes
Accepted
Adding * to some section numbers
You can use a conditional and mark “difficult” sections with
\section+{Title}
This also allows the standard optional argument to \section, so you can still do
\section+[Short title]{Long title}
as ...
7
votes
`{` in the definition of a macro?
Strange as it may seem, there are times when TeX isn't the answer.
Given an original document
\documentclass{article}
\begin{document}
\section*{\huge CHAPTER 1.\\ Introduction}
\addcontentsline{toc}...
6
votes
Accepted
chemmacros \iupac command shows no formatting in titles
You get a warning, namely
LaTeX Font Warning: Font shape `OT1/cmss/bx/it' undefined
(Font) using `OT1/cmss/bx/n' instead on input line 7.
which means that sans serif boldface italic is ...
5
votes
Accepted
Fake bold applied inconsistently to section titles
The xfakebold code is quite simple minded: it simply inserts a \pdfliteral.
[Update 2023: this is no longer always true, xfakebold now uses internally the pdfrender package and works across pagebreaks ...
5
votes
Accepted
Modify subsection numbering in KOMA
I literally googeled "koma latex change subsection" and used the first hit :).
\documentclass{scrartcl}
% https://tex.stackexchange.com/questions/353008
\renewcommand*\thesubsection{Unit \...
5
votes
Adding * to some section numbers
Here's a solution which sets up a new command, \starredsection. It meets all four of the OP's requirements. Its limitations are (a) any \label command must be included in the argument of \...
5
votes
how to use `\texorpdfstring' correctly and properly
The command \texorpdfstring takes two arguments:
what should be typeset in the PDF, and
what should appear in the bookmark.
In your code \texorpdfstring{$\mu=0$} is the first argument is $\mu=0$ and ...
5
votes
Subtitle, but over section name?
For not numbered sections with \section*{…} you can use something like:
\documentclass{report}
\begin{document}
\section*{%
{\small\normalfont\itshape Small subtitle\\}%
Section name}
\end{...
4
votes
Accepted
Bad hyphenation in Section Title
You can use
\section[form for header with no break](display form\\ with linebreak}
4
votes
Accepted
Changing style of (sub)sections
Use the titlesec package and redefine the format for \subsection like
\titleformat{\subsection}[runin]%
{\normalfont\normalsize\bfseries}{\hspace*{\parindent}\thesubsection}{1em}{}
4
votes
Accepted
Fancyhdr and \thesection command
As I stated in my comment, the section number \thesection must be communicated through a mark (for \thechapter this isn't necessary as chapters always start at a new page).
But normal LaTeX doesn't ...
4
votes
Accepted
How to remove the words 'Who?' and 'When?' in the title page of Bergen beamer theme?
To remove 'Who' and 'When', add the following in the preamble
\def\insertauthorindicator{}% Default is "Who?"
\def\insertdateindicator{}% Default is "When?"
For the second part, ...
4
votes
Accepted
Chapter headings on the side, with ornaments
While TikZ isn't actually needed for this, it does make aligning the text and clip art easier.
\documentclass{article}
\usepackage{tikz}
\usepackage{lipsum}
\newsavebox{\decorationbox}
\savebox{\...
4
votes
Accepted
Subtitles for subsections in scrbook
You can declare a new section command \subsecsubtitle
\RedeclareSectionCommand[
afterskip=.5ex
]{subsection}
\DeclareNewSectionCommand[
style=section,
level=\subsectionnumdepth,
afterskip=1....
4
votes
Accepted
Customise section with koma script
Something like this?
\documentclass[openright]{scrbook}
\usepackage{geometry}
\geometry{a4paper,twoside, margin=3cm}
\usepackage{blindtext}% only dummy text
\usepackage{xcolor}
\usepackage{xhfill}
\...
4
votes
Accepted
How to absolutely prevent overfull lines in ConTeXt?
To avoid overfull lines with ragged text which can appear when you disable hyphenation you can add the broad keyword to the align option to improve line breaking.
\definefont [SectionFont] [Italic sa ...
4
votes
Accepted
How to change the layout of section titles
You could use the titlesec package to redefine the layout of the section heading:
\documentclass[a4paper,11pt]{book}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{array}
\...
4
votes
Accepted
How can I suppress the word 'Chapter' (book) and have number and title in one line?
You can consider using Koma Script scrbook rather than book.
\documentclass{scrbook}
\usepackage[german]{babel}
\begin{document}
\chapter{The first chapter}
\end{document}
Or you can customize ...
3
votes
Format \section like \subsection (except for numbering)
Taking a look for example in this answer of mine we can take a look at the general structure of the sectioning macros in the standard class article. The default for \subsection is (you can get this ...
3
votes
How can I modify the section style like this?
Fairly simple using memoir:
\documentclass{memoir}
\usepackage[portuguese]{babel}
\usepackage{lipsum}
\chapterstyle{bianchi}
\begin{document}
\chapter{Introduç\~ao}
\section{Some subsection}
\lipsum
\...
3
votes
Accepted
Create attractive section
You can use a custom macro to format section heading using the sectsty package. If you need more flexibility, consider using the titlesec package, or switch to a more versatile document class like ...
3
votes
Accepted
How to make a centered, non-bold abstract and section titles
Here is how to obtain what you want for section titles. I used the titlecaps package to have the first letter of each (significant) word capitalised, which looks better with small caps, in my ...
3
votes
Modify subsection numbering in KOMA
If your use case doesn't require you to create cross-references to the "units", @Dr.ManuelKuehner's simple and straightforward answer is perfectly adequate.
In, however, if you foresee a ...
3
votes
Fancyhdr and \thesection command
A workaround which redefines \sectionmark to use only the left header of odd pages:
\renewcommand{\sectionmark}[1]{\markright{#1\hfill \thesection}}
MWE
\documentclass[a4paper,12pt,twoside]{book}
\...
3
votes
Accepted
add box around section title with a line
\documentclass[12pt]{article}
\usepackage[sfdefault]{roboto}
\usepackage[top=1cm, left=0.5cm, right=0.5cm, bottom=0.5cm]{geometry}
\usepackage[explicit]{titlesec}
\usepackage{tikz}
\definecolor{...
3
votes
Accepted
Justify section number and multi-line section title
You may achieve your typesetting objective with the help of the sectsty package.
\documentclass{report}
\usepackage{sectsty}
\sectionfont{\parindent0pt\nohang\raggedright}
\begin{document}
\...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
section-titles × 265sectioning × 57
titlesec × 42
table-of-contents × 29
formatting × 19
chapters × 19
header-footer × 17
beamer × 14
titles × 14
koma-script × 13
fonts × 10
spacing × 9
numbering × 9
appendix × 8
hyperref × 7
math-mode × 6
macros × 6
sections-paragraphs × 6
cross-referencing × 5
luatex × 5
packages × 5
line-breaking × 5
tcolorbox × 5
context × 5
appendices × 5