{titlesec} is a package providing an interface to {sectioning} commands.
23
votes
3answers
8k views
How to set the font for a \section title (and chapter etc)
How do I specify the fonts, and general font size, for the titles, chapters and sections in my document
Update:
I can see how my question is confusing.
I use \section and \chapter etc. to organise ...
19
votes
2answers
795 views
Incompatibilities between KOMA-Script and titlesec
This is a complementary question to About memoir and titlesec incompatibility. The titlesec manual states (p. 2) that the package
[...] works with the standard classes and with many others, ...
15
votes
4answers
301 views
Using fixed space aroung headings to get text in sync with baseline grid
In order to make my text stay in sync with the baseline grid, I've set the vertical spacing before and after \section headings to integer multiples of \baselineskip (using the titlesec package). A ...
15
votes
1answer
324 views
Different vertical spacing (parskip) between concurrent section titles and paragraphs
I'm trying to remove the spacing between section headings, but maintain the paragraph to section heading spacing.
Even though I set titlespacing before and after to *0, there is still spacing - quite ...
14
votes
2answers
2k views
Formatting a \paragraph to look like a \section
I'm writing a document that contains a rather deep tree of nested lists, and was wondering if how I would go about reformatting the \paragraph macro to format the text contained within it as a ...
14
votes
2answers
532 views
How to extract the value from a pgfkeys style element
Lets say I have defined some style:
\tikzset{mystyle/.style={inner xsep=2pt, outer xsep=10pt}}
Given the name of the style: How can I later get the (possibly overriden) value of one of its element, ...
14
votes
2answers
8k views
Change whitespace above and below a section heading
I want to change the spacing around a section heading so that there is less of a gap between it and the paragraph that follows.
I found the following commands
\usepackage[compact]{titlesec}
...
13
votes
1answer
474 views
About memoir and titlesec incompatibility
In page 2 of the titlesec documentation, Javier Bezos writes
titlesec works with the standard classes and with many others,
including the AMS ones, and it runs smoothly with hyperref.
...
13
votes
1answer
310 views
Remove spacing above section in titlesec
I'm writing a document optimized for mobile usage, and as such I want to conserve my space. The spacing that titlesec adds to sections, subsections, etc. is getting somewhat annoying. Is there a ...
13
votes
1answer
1k views
Margin notes (and subsection titles) in both sides of a two column document
I would like to write a book document with two columns and subsubsection titles as margin notes at both sides of the page (in the side which corresponds to the column).
In order to specify the ...
12
votes
1answer
11k views
Change section fonts
I am trying to emulate MS Word 2010 functionality with LaTeX since I am fed up with word.
I am using TexShop, and I have been able to set the main font to Calibri through the use of XeTeX.
How do I ...
12
votes
1answer
414 views
My custom style doesn't work
It is my first experience with LaTeX. This may be some sort of dummy question. But anyway. I've spend a day with TeXLive on Fedora. And here is the problem. I have some file 1:
\documentclass{book}
...
11
votes
1answer
2k views
Obtaining the default section spacing into the \titlespacing* parameters
I'm using the book class.
I want to modify the spacing before and after my sections using the \titlespacing* command.
However, before I do that, I want to let its parameters be such that they ...
10
votes
2answers
5k views
Start new page with each section
I would like to start each section on a new page. Is adding the following to my preamble this the preferred method, or a hack?
\let\stdsection\section
\renewcommand\section{\newpage\stdsection}
10
votes
1answer
2k views
Section title gradient
Background
Writing a manual using KOMA Script. The default fonts are perfect and should not be changed.
Problem
KOMA Script produces the following section outline:
The desired outline looks ...
10
votes
1answer
335 views
Specific section format
I'd like to use titlesec to typeset a section header that would look like this:
--------- Name of Section ------------
(the ---- would be a rule, and the entire section header would be centered)
...
10
votes
3answers
751 views
Customize headers without fancyhdr
I have strange, old book chapter to rewrite in LaTeX. The most iritating thing is the header. On odd pages the header should consist of the section name etc. But the problem is that if the page starts ...
10
votes
1answer
870 views
How to decrease spacing before chapter title?
I want to decrease the vertical space between the top of the page and the chapter heading. I have tried to follow the instructions for titlesec but I am not successful. I have tried the following two ...
10
votes
2answers
251 views
Fix indent for section title
I like to recreate the layout of an official template, in order to get rid of Word. Because the template is from the government, I must recreate it 1:1.
In the end, the document should look like ...
10
votes
1answer
857 views
titlesec, hyperref, algorithm2e, and \appendix
When I use titlesec, hyperref, and algorithm2e together, sections after an \appendix are not numbered properly.
\documentclass{article}
\usepackage{titlesec}
\usepackage{hyperref}
...
9
votes
3answers
2k views
Underline and center headings
For a paper I have to make my LaTeX document guideline conforming. Many of you will already guess now that this means dirty work by violating virtually all possible typography standards.
My biggest ...
9
votes
1answer
368 views
Temporarily modifying the chapter headings' layout
I would like to modify the layout of some "special" chapters in my document, but afterwards reset to the layout I used before, i.e.
\documentclass{report}
\usepackage{titlesec}
\begin{document}
...
9
votes
2answers
417 views
Section should automatically start new page if the whole section does not fit on current page
I would like my sections to start on a new page if they do not fit on the current page. In other words: if a section fits on the current page print it, if it does not fit start printing it on the ...
9
votes
1answer
412 views
Shaded box around multiline section heading?
I'm using LaTeX to write up an assignment which comprises a number of questions. I'd like to break up the questions from my answers by placing the section headings inside a shaded box. I'm relatively ...
8
votes
2answers
3k views
Changing the section title style for an article document type
I have just started working on my master's thesis with my universities latex template. It uses the 'article' document class for it. I have tweaked it here and there a bit to make it more to my liking. ...
8
votes
2answers
982 views
How to get multi-line chapter name with ClassicThesis package?
I'm using the ClassicThesis by Miede for writing my thesis, the support package is Arsclassica.
It's a nice template, however I got a little problem with the Chapter name, some of them can be very ...
8
votes
1answer
190 views
Strange behaviour of \renewpagestyle from the titlesec package
The following code uses the pagestyles option and \renewpagestyle from the titlesec package to redefine the plain style:
\documentclass{book}
\usepackage[paperheight=12cm]{geometry}
...
7
votes
3answers
8k views
Change size of section, subsection, subsubsection, paragraph and subparagraph title
I would like to increase the size of pretty much every headlines, so that it is more prominent than the normal text.
I read about the titlesec package, but can't seem to find good example how to use ...
7
votes
2answers
734 views
How to make horizontal lines thicker?
I am customizing the section module following the tutorial here
http://blog.scribtex.com/how-to-write-a-latex-class-file-and-design-yo
How do I make the
[\titlerule] % Inserts a ...
7
votes
3answers
287 views
How can I make \titlespacing not omit the top spacing?
In a multicols*{2} environment for 12pt linehight text, I use
\titlespacing*{\subsection}{0pt}{12pt}{12pt}
To create exactly 12pt of space before and after subsections. Together with a line height ...
7
votes
1answer
391 views
Chapter heading
I was trying to personalize the chapter and section headings using titlesec for my master thesis using the following code
\documentclass{book}
\usepackage{tikz}
\usepackage{titlesec}
...
7
votes
1answer
453 views
How to prevent a page break between section title and colored rule?
I use \usepackage[explicit]{titlesec} to customize the design of my sections, subsections...
In particular, i have :
\titleformat{\section}%
{\large\sffamily\bfseries}%
{My Section \arabic{section} ...
7
votes
2answers
138 views
Page number in the margin and separator
I want to produce this kind of header.
My first attempt includes the use of fancyhdr package but still I can't figure out how it is possible to move the page number in the margin and put the | bold ...
7
votes
1answer
192 views
Translating custom \section format to titlesec
I have some custom \section formatting with a horizontal rule, and I'm trying to DRY out my code by using titlesec to define default formatting options. But I can't exactly reproduce what happens when ...
7
votes
1answer
103 views
titlesec: why is contents a section?
I've been playing around with the titlesec package combined with the scrartcl class. I find the headings titles of scrartcl a bit ugly, but I do like the fact that I can scale font sizes to 8pt.
...
7
votes
1answer
181 views
Changing size of footnote symbols in titlesec-formatted chapter titles
I am using titlesec to define the formatting of Chapter titles. At present, footnote symbols within these titles appear in the same format, but my author would like them to be somewhat smaller.
The ...
7
votes
1answer
532 views
Strange behaviour of titlesec, with colored titlerule
With the following MWE, i get the Section title underlined in black :
\documentclass[12pt]{article}
\usepackage[explicit]{titlesec}
\usepackage[dvipsnames]{xcolor}
\titleformat{\section}%
...
7
votes
1answer
928 views
Titlesec: remove space after empty margin section
I'm using titlesec to assign some custom formatting to my sections. In particular I want to use margin \section's, so that the title section is typeset on the left margin, and the text of that section ...
7
votes
2answers
3k views
Section and subsection colors using titlesec
Im trying to alter the colors on my section, subsection and subsubsection.
I do so using the titlesec page:
\titleformat*{\section}{\Large\bfseries\sffamily\color{red}}
...
7
votes
1answer
2k views
Underline a section header the full width of the page
How do I get a full page width underline or bottom-border on a section title?
At the moment I'm using
\usepackage{sectsty}
\sectionfont{\normalfont\sffamily\large\underline\bfseries\color{orange}}
...
7
votes
1answer
293 views
Space above chapter with titlesec
The following code gives me some space above the chapter title, that I'd like to avoid:
\documentclass{book}
\usepackage[showframe]{geometry}
\usepackage{titlesec}
\titleformat{\chapter}[frame]
{}
...
6
votes
4answers
1k views
Giving headlines a background color spanning across the entire typearea
I posted this at stackoverflow and got redirected here. This does indeed look like a better place to ask.
I would like to decorate my headlines (section, subsection, etc.) by adding a background ...
6
votes
2answers
2k views
paragraph style - how to force line break? \paragraph{} \\ - make paragraph a header?
I want to format paragraph to work as a regular title
\paragraph{title} text goes here
output of that is:
title text goes here
how can I change the output to force line break and use the usal ...
6
votes
2answers
247 views
Suppress headers when page contains a section title using titlesec
I'm writing a book with titlesec and try to suppress headers containing the section name, when the section starts at the top of the respective page. Given that all my sections start on a new page I ...
6
votes
2answers
2k views
Prevent a paragraph break after a section heading
In my .cls file for my thesis, I have defined \subsection as follows:
\newcommand{\subsection}[1]{%
\pagebreak[2]
\refstepcounter{subsection}
\addcontentsline{toc}{subsection}{
...
6
votes
2answers
220 views
titlesec: \sectionmark breaking \ifthesection?
In the titlesec package, one may use the \ifthesection (or \ifthechapter,...) command to apply some customization commands only when a \section has been defined. However, it seems that using ...
6
votes
2answers
309 views
Impossible to have a Tikz fading in a titlesec header?
I want to put a TikZ figure with a fading effect (which I reproduced in the body of the document as illustration) in the page header, which I set with the package titlesec. The following MWE seems to ...
6
votes
1answer
191 views
Wrong section counter for references when using titlesec
Changing the style of my sections using the package titlesec works fine with these lines
\usepackage{titlesec}
\titleformat{\section}[block]{\large\scshape\centering{\Roman{section}.}}{}{1em}{}
but ...
6
votes
1answer
2k views
Adding section number after section title with titlesec package
I am having difficulty adding the section number after the section title. Normally the order is section number followed by section title. I want it to be the opposite. I am looking for what I should ...
6
votes
2answers
864 views
Section titles, hyphenation, manual line breaks - and how to avoid them
I have several section titles in my document that are getting hyphenated, which is quite ugly.
I am now looking for some way to avoid the hyphenation, which is is somewhat related to this question, ...

