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

learn more… | top users | synonyms

29
votes
2answers
16k 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 ...
21
votes
2answers
18k 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} ...
19
votes
2answers
1k 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, ...
18
votes
1answer
707 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 ...
17
votes
3answers
29k 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 ...
17
votes
1answer
18k 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 ...
17
votes
1answer
740 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. ...
16
votes
2answers
685 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
4answers
482 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
640 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 ...
14
votes
2answers
3k 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
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
2answers
11k 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}
12
votes
1answer
868 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

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 ...
11
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 ...
11
votes
2answers
323 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 ...
11
votes
1answer
4k 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
2answers
288 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
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 ...
10
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 ...
10
votes
1answer
401 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
144 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
130 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
1answer
77 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
648 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
246 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
3k 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
192 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
160 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
7k 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
2answers
167 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
570 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} ...
9
votes
1answer
533 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
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 ...
9
votes
4answers
252 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} ...
9
votes
2answers
604 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
2answers
546 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 ...
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
1answer
196 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 ...
8
votes
1answer
476 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
1answer
533 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 ...
8
votes
2answers
207 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 ...
8
votes
2answers
5k 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}} ...
8
votes
1answer
664 views

chapter style latex horizontal line

I want a chapter style like this: 1 ------chapter name------------- text text text text tex t text text text text t I have come this far: ...
8
votes
1answer
347 views

Positioning of the chapter number in the margin note space

How can I fix the position of my chapter number? I would like to put it right in the middle of the space for the notes, and aligned with the first line of text of the chapter. I am undecided for the ...
7
votes
4answers
2k 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 ...
7
votes
2answers
1k 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 ...