{titlesec} is a package providing an interface to {sectioning} commands.

learn more… | top users | synonyms

34
votes
2answers
25k 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 ...
28
votes
4answers
46k 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 ...
25
votes
2answers
22k 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} ...
23
votes
2answers
2k 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, ...
22
votes
2answers
520 views

Gradient fill around section headings

Trying to make a document that has gradient fill around section titles, that are not effected by margins, as such: I managed to get the gradient effect but I can't figure out how to get it to start ...
19
votes
3answers
16k 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}
19
votes
1answer
889 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. ...
19
votes
1answer
964 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 ...
18
votes
1answer
22k 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 ...
16
votes
4answers
577 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 ...
16
votes
2answers
791 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, ...
16
votes
1answer
820 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 ...
15
votes
2answers
4k 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
1answer
8k 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 ...
14
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 ...
13
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 ...
12
votes
2answers
411 views

How to achieve this chapter style without using the memoir class?

As fncychap has no such chapter style, and using the memoir class will cause a lot conflicts with my current settings (book class), how to make this style (perhaps using the titlesec package)? Table ...
12
votes
1answer
1k 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} ...
12
votes
1answer
5k 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 ...
11
votes
3answers
1k 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 ...
11
votes
1answer
3k 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 ...
11
votes
2answers
316 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
2answers
3k 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 ...
10
votes
1answer
418 views

How to make this chapter heading style?

As fncychap has no such chapter style, and using the memoir class will cause a lot conflicts with my current settings (book class), how to make this style (perhaps using the titlesec package)? title ...
10
votes
1answer
427 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
1answer
658 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} ...
10
votes
1answer
187 views

Why does titlesec cause bizarre line breaks within \paragraph?

Consider the following example: \documentclass[12pt,a6paper]{article} %\usepackage{titlesec} \usepackage[textwidth=79mm]{geometry} \begin{document} \paragraph{I guess we'll have to make a few ...
10
votes
1answer
141 views

Is it possible to embed section titles within subsections?

I would like to to do the following \section{Animals} \subsection{Mammals} \subsection{Birds} and have it result in 1 Animals 1.2 Animals>Mammals 1.3 Animals>Birds I have tried to do this ...
10
votes
2answers
1k 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 ...
10
votes
4answers
624 views

Include multiple pdf pages on single sheet

I would like to include multiple pages from a pdf document on a single page im my document. \includepdf can do that using the 'nup' option. \documentclass{book} \usepackage{fancyhdr} ...
10
votes
2answers
1k views

Customizing Chapter style in scrbook

I want to obtain styles like those showed in the next two images (I do not need the picture in the background (parabolas)): My original LaTeX code (to be customized but should keep font as they ...
10
votes
1answer
101 views

How to set a box to a rubber length width

Problem I'm trying to create fancy section heading using titlesec. I need to put the section name into a \parbox to have line breaks. I want the parbox to extend to the far right margin, but I don't ...
10
votes
1answer
862 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 ...
10
votes
1answer
267 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} ...
10
votes
1answer
1k 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
4k 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
2answers
215 views

\section* no longer hides the section number

I wanted to add a background color to my sections, but by doing so \section* no longer works properly, ie, it now shows the section number when I want to hide it. Any ideas? Here's my code: ...
9
votes
3answers
209 views

how to get chapter title in a rectangular frame

how to get chapter heading like this in pdflatex can titlesec be used? % hanging chapters \usepackage{titlesec} \titleformat{\chapter}[hang] {\normalfont \Large \bfseries}{\chaptertitlename\ ...
9
votes
2answers
8k views

Format ToC for thesis

I apologize for the unspecified and broad question but I have no way to be specific. I'm looking to generate the TOC and List of Figure, List of Table according to the format required by my school. ...
9
votes
2answers
3k 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}{ ...
9
votes
1answer
193 views

How I can improve the style of this title?

I'm working on book class and happen to have a relatively long title, when I write I get this: I would go up a bit the title, but that short titles remain in place but that short titles remain ...
9
votes
2answers
190 views

Placing a bar/graphic before the section headers

I've used the titlesec package to produce section headers like this: Click for a full-resolution version. Using this minimal code: \documentclass{article} \usepackage[compact]{titlesec} ...
9
votes
1answer
644 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
711 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 ...
8
votes
2answers
2k 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 ...
8
votes
2answers
4k 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
3answers
1k 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 ...
8
votes
1answer
751 views

How to draw a gradient box around sections

How would you implement a margin-to-margin gradient using TikZ that is slightly larger than the text and that cover the whole lines of section text? The following code produced the results shown below ...
8
votes
2answers
2k views

How do I reset paragraph numbering only after new chapter?

I'm writing a report that needs some annoying formatting. The \chapters and \paragraphs need to be numbered using arabic numbers. The paragraph numbering needs to be reset at the commencement of each ...
8
votes
1answer
784 views

How can I get the Title, Author, and Date on the same line?

I would like to have Title flush left Author flush right Date flush right How can I do this on the same line or on a shared line? I was hope to achieve the following: This is as far as I got ...