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

learn more… | top users | synonyms

4
votes
1answer
318 views

Offset color block behind section titles

Joseph Wright's CV source contains a snippet of code that produces an offset color block behind section titles using the titlesec package, like so: \documentclass[11pt]{article} ...
3
votes
1answer
255 views

Roman numerals appear in toc but not in document

I'm writing a thesis and sections are required to have roman numerals in both the toc and the document itself. The pertinent document code looks like this: \documentclass[twoside,12pt]{report} ...
3
votes
1answer
821 views

titlesec section font size incorrect

My dissertation requires the section title to be of the same font size as the text. I am using the titlesec package and I have provided these options: \usepackage[rm,tiny,center,compact]{titlesec} ...
2
votes
1answer
477 views

Customizing \chapter command

Here is the picture: The code is from this post. \documentclass[a4paper,12pt]{book} \usepackage{graphicx} \usepackage{lipsum} \usepackage{fontspec} \usepackage{titlesec} \setmainfont{EB Garamond ...
12
votes
1answer
4k 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 ...
4
votes
1answer
1k views

Automatically adding \noindent after \section{*}

I'm using titlesec package and a document class ABNT Class which follows a Brazilian standard for document development. So far I've managed to follow the Brazilian Computer Association guidelines for ...
6
votes
2answers
714 views

Hide \thechapter for unnumbered Chapters

I want to display my Chapter-Numbers on the right below the Title. I came to the following minimal working example: \documentclass{article} \usepackage{titlesec} \usepackage{marginnote} ...
5
votes
2answers
871 views

Error while trying to start chapters on the same page

This is my first post here. I have tried the solution proposed in this site to start chapters in the same page as the previous one ended but I always get an error. I am a TeX newbie and I feel that ...
9
votes
1answer
568 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
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. ...
4
votes
1answer
8k views

“Missing \endcsname inserted” and other errors when trying to align title section

I want to somehow align section headings: unnumbered should be centerized; numbered should be aligned left and indented. I'm just trying to compile an example ...
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 ...
5
votes
1answer
660 views

Package titlesec adds extra space on top of \chapter, despite commands to the contrary

My university's Ph.D. thesis guidelines specify an exact top-margin on the first pages of chapters. I am trying to use titlesec to set this margin, but it seems to always set it to be more than it ...
5
votes
1answer
320 views

How do you make a customization on the chapter page

I can't figure out how to modify it so that it looks like the image below. \documentclass{book} \usepackage{titlesec} \titleformat{\chapter} ...
5
votes
1answer
487 views

chapter headings vertically centered but not table of contents

My university requires the chapter headings to be on a separate page and vertically and horizontally cantered. Based on some of the answers on this forum i used the following code to achieve it. ...
4
votes
1answer
2k views

Section indent or leftmargin

I use the titlesec package for decoration sections and subsections. But i do not know how to change leftmargin or indent for this. Look at the picture, the green line is where i want to move the ...
5
votes
1answer
656 views

titleformat not being applied to bibliography

Here is a MWE of the code I am using for applying a titleformat to my chapters. But it does not get applied to my bibliography chapter. Any ideas why? \documentclass[a4paper,11pt]{report} ...
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
646 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 ...
4
votes
1answer
764 views

Setting the upper margin of chapter titles in scrbook

In a scrbook document I need to set the chapter titles close to the upper page margin, without leading number and with a \hrule afterwards. Redefining \chapterheadstartvskip does the trick with the ...
3
votes
1answer
2k views

How can I set a color for the title rule?

I'm writing a document which uses titlesec, and I'd like to set the title rule to a different color. How can I do that? This is what I currently have, which produces section titles with black ...
1
vote
2answers
951 views

titlesec messin' up my hyperref'd table of contents

Please consider the following multipage MWE, which contains page number restarting; made to compile with pdflatex test.tex: \documentclass[12pt]{article} \usepackage{geometry} ...
6
votes
1answer
134 views

Centring a heading, including the numbering

I've got a problem that should be simple to fix. I'm using the fontspec to layout my chapter headings like so %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode ...
3
votes
2answers
521 views

How to have an amsart-like subsection style

If you use the amsart class, then it puts a period after the subsection title, but not if there is no title. For example, if I write \subsection{Title} Blah1 \subsection{} Blah2 Then amsart ...
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 ...
2
votes
0answers
750 views

Explanation of code using \titleformat [closed]

I am writing a project in latex and to make my output pdf look more fancy i am using a "Fancy chapter headings with TikZ" code found here http://texblog.net/latex-archive/layout/fancy-chapter-tikz/ ...
6
votes
2answers
367 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 ...
5
votes
1answer
493 views

Positioning the beginning of table of content (toc) to the top of the page

I managed with great help from here to shift the beginning of the chapter titles to the top of the page, but it doesn't affect the table of content. Why is that? And how could I do that? I don't ...
2
votes
2answers
1k views

Can't shift/position \chapter with titlesec?

Somehow I my attempt to change the placement of \chapter seems not to work. I would like to that my chaptertitle begins right at the top of the page. Do I need to change the plain pagestyle? ...
6
votes
2answers
402 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 ...
2
votes
1answer
992 views

amsart and titlesec - title font won't change

Ok, I am very new to LaTeX. I am using a default template. I have been trying to figure out how to change the font sizes and other formatting. Reading forums convinced me to try titlesec. All titlesec ...
9
votes
2answers
603 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 ...
4
votes
1answer
143 views

Setting vertical spacing between different document elements at the same time

I have the following problem. Let's define three types of document elements: Titles, Paragraphs and Longtables. The problem is to setup vertical spaces between them independently. For example, let's ...
2
votes
1answer
393 views

Modifying toc & bib titles

I would like to \flushright the toc's and bibliography's title, but the font size and spaces above and below should be the same as for regular chapters. Here is what I did: \documentclass{report} ...
5
votes
2answers
323 views

How to import additional code into class file

I was inspired by the article "Fancy chapter headings with TikZ" (Stefan Kottwitz many thx) and I have created the whole fancy sectioning. But what I need to do now is to import this whole code for ...
5
votes
1answer
610 views

Format title: section number flush left and title centered?

How can I format with the titlesec package that I get somethine like this (this is a twocolumn document): I do not know how to get the number to the left and the title in the center is this ...
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 ...
5
votes
2answers
3k views

How can I hide the chapter headings number on LaTeX and change the spacing?

I'm writing my Thesis but I have run into some layout troubles, I'm using the standard book document class, which results in my Chapters headings in the form of: Chapter # Name of my chapter ...
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, ...
1
vote
2answers
634 views

Use sections “inline”

How can I get the startpoints for my sections (see top part of MWE) as one inline text, similar to what can be done with the bottom part of my MWE? I need the sections since my title marks etc work ...
2
votes
1answer
8k views

Vertical space before section title with titlesec

I was trying to eliminate the vertical space before and after the title of a section by using the titlesec package and the command \titlespacing*{\section}{0pt}{0pt}{0pt}, but it works only in ...
7
votes
1answer
953 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
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
1answer
613 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} ...
4
votes
1answer
3k views

\titleformat{name=\section} in documentclass

I defined a documentclass in which I redefine a heading format with (using the package titlesec): \titleformat{name=\section} This works. But if I move this \titleformat{name=\section} to a ...
3
votes
1answer
537 views

Center body and left margin in page

I'm using the titlesec package to put section titles to the left of their body, but I'd like for the entire page to appear centered. That is, I'd like for the space from the far left of the page to ...
1
vote
1answer
402 views

is it possible to fake the amsart class format?

I often use the amsart documentclass. I like it because it is very compact (it also seems to be an industry standard in my area). What I don't like about it is that I'm not able to use kpfonts or ...
4
votes
1answer
460 views

\addvspace after a titlesec heading

So, I'm trying to make an environment that is always padded above and below by a certain vertical space, no more and no less (unless the previous or following elements require even more space). My ...
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} ...
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} ...