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

learn more… | top users | synonyms

4
votes
1answer
12k views

How to change section/subsection font size? [duplicate]

I'm writing a paper that requires the section titles to be in 12pt font, I can get the title to be in 12pt using: \section{\fontsize{12}{15}\selectfont Introduction} but the section number does not ...
4
votes
1answer
163 views

Customize the section title with Latin Modern

I have created a thesis using mathptmx font. Now I would like to customize only the section title using Latin Modern Sans Bold. I used titlesec with \usepackage{titlesec} \titleformat{\section} ...
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 ...
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 ...
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 ...
4
votes
1answer
44 views

Adjusting spacing before and after subparagraph with sectsty

I am helping a friend that is using sectsty to format the titles in his document. How can I adjust the spacing before and after the titles, in particular the subparagraph one? (I know that titlesec ...
4
votes
1answer
28 views

How to change the appearance of subsections, subsubsections, etc. in an AMS Article?

Suppose I have the following document: \documentclass{amsart} \begin{document} \subsection{Subsection} Content. \end{document} How can I modify the code so that the subsection heading is italic ...
4
votes
1answer
187 views

How to affect the vertical gap between the glossary's name and its body

I'm using the glossaries package for producing of nomenclature/symbols/acronyms lists, but I don't know how to influence the vertical gap between the glossary title and the first glossary entry. ...
4
votes
1answer
61 views

Is there any way to put the section numbers after titles like “axiom”, “theorem”, etc?

The normal LaTeX input and output would be something like \subsection{Theorem (Fundamental Theorem of Calculus)} 1.1 Theorem (Fundamental Theorem of Calculus) Is there any way to use a ...
4
votes
1answer
65 views

Using \toptitlemarks and \bottitlemarks with any counters

\toptitlemarks and \bottitlemarks don't seem to work with random counters: \documentclass[paper=a4,pagesize=pdftex]{scrbook} \usepackage[pagestyles]{titlesec} \usepackage{lipsum} ...
4
votes
1answer
1k views

Add a rule after chapter title using titlesec

I've been experimenting with chapter title formatting using titlesec but I can't seem to find the proper way to add a rule just below the chapter title. After reading the doc, I found that \titleline ...
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} ...
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 ...
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 ...
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 ...
4
votes
1answer
65 views

How to get sentence case in section titles without biblatex

I would like to change my section titles into sentence case just like the solution here: How to make sections into sentence case The titlesec package is already included in my document to modify ...
4
votes
1answer
207 views

Using the titlesec package with the res document class

I am trying to redefine the formatting of the my sections using the titlesec package within a res document. However, I am getting the following error message which only occurs if I try to run the ...
4
votes
1answer
292 views

Multiline title vertical alignment using classicthesis and arsclassica

I would like to align the 2nd line of my title to have the same baseline with the chapter number. What I have now is , but I would like to have instead. I found that the tweak in How to get ...
4
votes
1answer
507 views

Current section title macro using titlesec

I have a macro that contains the title for the current section, however when using the titlesec package, it no longer works for \section and \subsection. I know titlesec redefines the functions I'm ...
4
votes
1answer
113 views

Bad cross-reference using titlesec

When I define two new level using titlesec, the reference doesn't work correctly. This is an example: \documentclass{article} \usepackage{titlesec} % First level ...
4
votes
0answers
359 views

Trouble with titlesec

I've been using titlesec for quite some time now and want to "pimp up my style" ;) I've read How to change header to list first section on page and not last section and tried to adapt the code for ...
4
votes
2answers
217 views

Custom titlemarks

My title marks are not working as I want them to. I had to move away from using the native section and subsectionand therefore my title marks does not work. I had a look at the extramarks feature of ...
3
votes
2answers
272 views

\clearpage after every subsubsection

I'd like to clear the page at the end of every \subsubsection. I tried \usepackage{titlesec} \newcommand{\subsubsectionbreak}{\clearpage} But this appears to force a \clearpage at the start of ...
3
votes
2answers
511 views

Section title with subtitle

I'm using the memoir class, I would like to create a more fancy section title, but I don't have the necessary skills in LaTeX. I found many fancy section titles on this forum, but I don't know how to ...
3
votes
2answers
180 views

titlesec troubles

I am working on a document that will consist of many sections and subsections. I want to have a table of contents per section. I am using titlesec, titletoc and titleps. I have the following MWE: ...
3
votes
2answers
356 views

How to adjust the size and placement of chapter heading in report class

How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error ! Package ...
3
votes
2answers
674 views

The problem with the command: titleformat it is important

This is my first post here. I am using a few commands and packages to make the titles behave according to my thesis specifications but when I used the \titleformat I get an error: ! Package ...
3
votes
2answers
786 views

Problems with titlesec, hyperref, biblatex and tocbibind

I am using the titlesec package to change the section font to sans-serif. Unfortunately, this breaks the links to "unnumbered" sections both in the TOC and in the bookmarks sidebar of PDF readers. I ...
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 ...
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 ...
3
votes
1answer
283 views

Strange interaction between natbib and algorithm2e

Here's a minimal example. \documentclass{article} \usepackage{titlesec} \usepackage{algorithm2e} \usepackage{natbib} \begin{document} \bibliographystyle{plainnat} \begin{thebibliography}{1} ...
3
votes
2answers
5k views

Problems with fontspec and titlesec packages

I've been trying to create a CV template by following the tutorial from here. Here's the latex code I used \documentclass[a4paper,10pt]{article} %A Few Useful Packages \usepackage{marvosym} ...
3
votes
2answers
223 views

titlesec \clearpage before a part

I'm using the titlesec package for my sectioning. I want to have a \clearpage before every \part however when I put it into the format field of ...
3
votes
1answer
112 views

titleps' page styles inserted just before chapters start too early

The following MCE and image show that titleps' page styles inserted just before chapters start too early: the head rule begins with the 'test' page style which should be applied only after the end of ...
3
votes
2answers
739 views

extra } when use titlesec package

In the .tex file, I want to use the package titlesec. But there is a error: ! Argument of \subparagraph has an extra }. Is there some simple method to fix this? The code is: ...
3
votes
2answers
838 views

Format appendix chapter title with titlesec in a scrbook

I'm writing a longer text and redefined the Design of a Chapter start page using titlesec. For example \documentclass[cleardoublepage=empty,fontsize=11pt,a4paper,twoside,DIV=calc]{scrbook} ...
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} ...
3
votes
1answer
65 views

Change chapter title format in scrreprt without titlesec?

I'm working with scrreprt and I have loaded minitoc to have a short TOC after each chapter title. However when I give the \chapter command I get: 1 Chapter Title I'd like to have: Chapter 1 ...
3
votes
1answer
67 views

Customizing the style of the “Table of Contents” title

I used titlesec for customizing chapter titles. How can I put the Table of contents title above the horizontal line? (I am trying to customize the place of the title, not the title) Added figure is ...
3
votes
2answers
106 views

Page styles with Koma instead of titlesec

I usually set up my page style titlesec along the lines of \documentclass{scrartcl} \usepackage[pagestyles]{titlesec} \newpagestyle{mypagestyle}{ \headrule \sethead{Document ...
3
votes
1answer
610 views

How to achieve different formats for label and text in a subsection heading using titlesec

How to get a different formatting for the label and text of a subsection using titlesec? Reason: Italic numbers in the subsection heading hurts my eyes and should be avoided at all cost, Label of the ...
3
votes
1answer
54 views

Remove spacing after blank section with title formatted with leftmargin

I have some sections that have no direct text (other than subsections). For these blank sections, I am trying to make the subsection text (or heading) start at the same place as those sections that do ...
3
votes
1answer
32 views

Sectioning using \titleformat results in problems with \subsection*

I am trying to write a Preface with subsections, but without sectionnumbers (since the preface is technically not really part of the report). The sections and subsections are constructed using ...
3
votes
1answer
37 views

\chaptertitle from titleps ignored after redefinition of \chapter macro

The following MWE shows that, if the \chapter macro is redefined as in a previous question of mine: Prepend different stuffs to starred and unstarred \chapter commands, the \chaptertitle macro from ...
3
votes
1answer
173 views

Titlesec problem, defining space before section with \titlespacing

I am using the article document class and have trouble with the \titlespacing command of the titlesec package (explicit). I want to have more space before the \section. MWE: ...
3
votes
1answer
195 views

Adding a period after section

I have \usepackage{titlesec} \titleformat{\section}[runin] {\normalfont\Large\bfseries}{\thesection}{1em}{} \titleformat{\subsection}[runin] {\normalfont\large\bfseries}{\thesubsection}{1em}{} ...
3
votes
1answer
161 views

Moving the chapter name in a titlesec frame?

I'm messing around with titlesec to make a frame with the chapter name in it. I can't figure out how to move the chapter name ("Chapter Foo" in the example). Here's the MWE: ...
3
votes
1answer
148 views

How to change horizontal spacing before section number

How do i change the small horizontal spacing that is present before a section number? I have used the command \titlespacing from package titlesec to set the left spacing to 0, but it is still ...
3
votes
1answer
112 views

titleformat has no effect!

I have tried to specify the color for my section as shown here, but it has no effect. What am I doing wrong? MWE: \documentclass[10pt,letterpaper]{article} \usepackage{lipsum} \usepackage{multirow} ...
3
votes
2answers
243 views

Alignment marginnotes

I am trying to write a report for Uni, where I need something like what marginnotes does. The problem is I would need two different margins on the left side of the page. One for the chapter or ...