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

learn more… | top users | synonyms

1
vote
1answer
57 views

Space between two consecutive headings with titlesec option largestsep

To format headings I am using the titlesec package. I need 12 pt space before each heading and 6 pt after. If there are consecutive headings (i.e. heading directly followed by subheading) I need 12 pt ...
2
votes
1answer
69 views

remove chapter number from section entries in tableofcontents

an MWE: \documentclass{book} \usepackage{a4wide} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{polyglossia} \setmainlanguage[spelling=new,babelshorthands=true]{german} ...
2
votes
1answer
145 views

Adding line after section heading

I am trying to add a horizontal line (like \hrule) that starts just after each section's heading, fills the rest of the line, and is vertically aligned with the heading, as shown below. To do so, I ...
4
votes
1answer
55 views

How do the letters/numbers appear bigger?

Can we change something at the command \titleformat{\section}{\bf}{\thesection}{1em}{} so that the letters of a section and its number appear a little bigger?
2
votes
1answer
49 views

Can we change something so that the chapter is at the left side?

Using the following commands: \usepackage[sf,sl,outermarks]{titlesec} \titleformat{\chapter}[display] {\bfseries\Large} {\filleft\MakeUppercase{\chaptertitlename} \Huge\thechapter} {4ex} ...
1
vote
0answers
26 views

Titlesec / AutoFakeBold making pdf figures bold

I have a simple MWE similar to the following: \documentclass[12pt]{article} \usepackage[letterpaper, left=19mm, right=19mm, top=3.52cm, bottom=2.84cm, headheight=38.7pt]{geometry} ...
3
votes
1answer
94 views

How to write the “subtitle” like this?

I want to write some subtitle like the bold sentence inside the box, could anyone give me some guide on how to do it? Basically this subtitle is inside a section environment. I have no idea how to ...
3
votes
1answer
94 views

(Almost) Robert Bringhurst Style Chapter Titles in Standard Book Class

I have tried: \usepackage[tracking = true]{microtype} \usepackage{titlesec} \titleformat{\chapter}[hang] ...
0
votes
1answer
74 views

how to make only the chapter-titles to be in the middle of a new page

I am using Thesis.cls to write my thesis (From Easy Thesis tempalate). I wish to have the chapter title in a separate page and at the middle of the page. For that I browse the internet and I got ...
2
votes
1answer
82 views

left and right aligned section title on one line

I am trying to have a simple bilingual title for a section. The English text should align to the left and the Arabic text should align to the right, both on the same line. The following line of ...
8
votes
0answers
54 views

How can protrusion in the headings of document divisions be fixed when using pdfLaTeX and titlesec?

How can protrusion in the headings of document divisions be fixed when using pdfLaTeX and titlesec? In this answer I provide a tentative patch which allows character protrusion to work normally in ...
2
votes
1answer
105 views

Epigraph on Part Page

I used the solution given here to get a nice, customizable epigraph on a part page. However, the solution uses the command \usepagestyle{epigraph}, and because of this, the part page has a ...
2
votes
1answer
77 views

How to set the section “range” onto the head? scrpage2, scrbook, titlesec

I want to get the "range" of the sections of one page into the headline. I use scrpage2 scrlayer-scrpage for changing the headline and scrbook as documentclass. I try to write a MWE: ...
2
votes
0answers
42 views

titlesec extra arguments to sections

Is it possible to add extra arguments to a modified section environment using the titleformat command of the titlesec package? For example, that the section color appears as red when doing ...
3
votes
2answers
90 views

Redefining \section with titlesec using \clearpage causes extra entries in table of contents

The following MWE shows that whenever I issue a \clearpage within the redefinition of \section, it produces an additional entry in the table of contents. Why does this happen? And how should I fix it? ...
2
votes
1answer
57 views

determine the exact size and position of titles with the titlesec package

I need 11pt titles and don't know what to do, 'medium' seems quite vague. This is my code: \usepackage{titlesec} \titleformat{\chapter}[display] {\normalfont\Medium\upfamily\centering} ...
2
votes
1answer
83 views

Package `tcolorbox` within `titlesec`

It may not be a very good idea, but I am trying to use tcolorbox for formatting titlesec as follows: \documentclass[10pt,twoside]{book} \usepackage{fontspec} \usepackage{lipsum} ...
5
votes
2answers
121 views

Centering sections

I would like to use titlesec to center my sections as follows (MWE): \documentclass[10pt,a4paper,twoside]{book} \usepackage[latin1]{inputenc} \usepackage{lipsum} \usepackage{titlesec} ...
2
votes
1answer
173 views

\titleformat (in titlesec) doesn't show any horizontal line for chapter

I have been trying to get a simple thing working with titlesec: getting a horizontal line under each chapter. There are many tutorials, documents and questions on TeX that explain how this can be ...
4
votes
1answer
429 views

Package titlesec Error: Entered in horizontal mode. \section{INTRODUÇÃO}

How can I solve this issue? \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage{txfonts} \usepackage{indentfirst} \setlength\parindent{1.25cm} ...
1
vote
1answer
32 views

Titlesec shows in ToC

I use titlesec to show the writer and translator of each chapter of my book as follows: \documentclass[10pt,a4paper]{book} \usepackage[utf8]{inputenc} \usepackage{fontspec} \usepackage{titlesec} ...
0
votes
0answers
86 views

Adding a sectionning level with titleclass and tocdepth

I want to add a subchapter sectionning level, between chapter and section. I use the \titleclass command from titlesec package. According to titlesec documentation, ...
2
votes
1answer
148 views

Easy mode of titlesec not working with beamerarticle

I can't get the "easy" mode of titlesec to work with beamerarticle. With the following example: \documentclass{extarticle} \RequirePackage{beamerarticle} \RequirePackage{titlesec} ...
2
votes
2answers
114 views

Absolutely prevent pagebreak after section title

Okay I've searched but didn't find any existing solution. My question is how to absolutely forbid pagebreak immediately after section title. I tried: \makeatletter ...
0
votes
2answers
50 views

\newgeometry at the beginning of section

For some reasons, I would like to change the geometry at the beginning of each section, and later manually use \restoregeometry. My first guess was to use \titleformat to force the execution of ...
3
votes
1answer
120 views

How to place a section heading inside tikz figure using titlesec and the runin option

I am currently workin on a big tikz figure and I want to place a section heading inside a box, which leads to a problem. A minimal example is here: \documentclass{article} \usepackage[T1]{fontenc} ...
2
votes
1answer
90 views

Change spacing before chapter title within frontmatter

I am using the report class for my dissertation, which requires 2 inch margin beginning at each chapter. I am using the following command: \titlespacing*{\chapter}{0pt}{2in}{1in} This works fine ...
3
votes
1answer
76 views

How can I use titlesec without changing CHAPTER ONE to CHAPTER 1

I have a week to submit my Ph.D thesis, done in latex, and have ran into a strange difficulty. Before introducing {\usepackage[rm,tiny,compact, bf]{titlesec} } which was necessary in order to unify ...
0
votes
0answers
77 views

Spacing before and after headings

EDIT: I've adjusted this question after experimenting with the titlesec package. I removed the following code to prevent conflicts as suggested by @Bernard & @cfr. \makeatletter ...
2
votes
1answer
59 views

section spacing from top of page vs normal text spacing

I'm trying to change the distance from the top of the page that text starts appearing when I use \section, so that it matches the distance when I just use regular formatting (not in a section). Below ...
2
votes
2answers
112 views

How to prevent page break between two section headings with color formatting using titlesec?

Description This question is based on almost the the following question, How to prevent page break between two section headings. The answer given there explains that the problem is with \color, which ...
2
votes
2answers
91 views

Using titlesec with mwrep class

I use mwrep class in my document and try to customize section titles with titlesec. It works OK for sections and subsections but it has no effect for chapters. Here I read that "The mwrep class uses ...
1
vote
1answer
41 views

inline uppercase chapter title

Hi I want to put the chapters title in one line and uppercase, I found this code that makes it inline but how ti make it uppercase too code: \usepackage{titlesec} \titleformat{\chapter}[hang] ...
2
votes
2answers
158 views

What is the proper way to change the section title font in LaTeX?

Suppose I wanted to use a different font for a title then the body text in LaTeX (pdflatex). (For example, if I wanted to use a slightly fancier font for titles, or a sans-serif one.) How would I do ...
5
votes
1answer
179 views

How to make headers uppercase without breaking references in latex?

I am trying to make section headers uppercase. I tried different packages (titlesec and sectsty) but always get broken references. \documentclass[english]{article} \usepackage[T1]{fontenc} ...
4
votes
1answer
371 views

Redefining commands in Latex (\section in particular)

A few days ago I asked a question about how to redefine the \section command to be able to write content just after the head of the section with no line breaking: Redefining \section command (I ...
2
votes
1answer
64 views

Format title for \chapter*{}

I have formatted Chapter titles using the package titlesec, but the formatting is unsuccessful in applying to my chapters with an asterisk *, (those chapters which I do not want appearing in my table ...
1
vote
2answers
149 views

Redefining \section command

I'm writing a draft of my notes with Latex. They are basically definitions related to a particular concept from different sources. Therefore I have used the command \section to highlight the concept ...
1
vote
1answer
113 views

Chapter formatting and spacing

I use report document class and the thing is that I would like to change the chapter both in format, letterspace and place on the page. Right now a chapter look like this: I want it to look like ...
1
vote
1answer
78 views

Make subsection text appear left aligned within the defined left margin?

How can I make subsection text appear left aligned within the defined left margin, with its "own" margin of 0.75in (instead of 3.0in)? I believe the package for the task is titlesec but I'm open to ...
3
votes
1answer
122 views

LaTeX: How to change size only with titlesec

I need to change the font size of my \subsection headings. Although when I use the \titleformat{\subsection}{\Large\bfseries}{\thesubsection}{0.7em}{} command, the font of the heading is also ...
1
vote
2answers
243 views

Reduce white space above chapter title, and reduce space between title and text, for unnumbered chapters

How can I reduce the white space above the chapter heading? How can I reduce the space between the heading and the text? I want to be able to do this for selected chapters only, or after a given ...
4
votes
1answer
131 views

Starting counter from 0

I'm working on a sheet of exercises using LaTeX. I've set up my sections to look like Exercise # | <title>. How can I force the section counter to start from 0, so that I can have an exercise 0 ...
0
votes
1answer
34 views

Latex reference obtaining a section including color

I have the code: \definecolor{amaranth}{rgb}{0.9, 0.17, 0.31} \titleformat{\section} [runin] {\color{amaranth}\sffamily\filright} {\thesection} {0.5em} {} ...
5
votes
1answer
53 views

Stop page break between title and contents

I am using the article class in LaTeX, and I want a page break between sections, so I added the following to the preamble: \usepackage{titlesec} \newcommand{\sectionbreak}{\clearpage} However, I ...
1
vote
2answers
98 views

Width of section name within a rectangle using titlesec

I just stumbled upon this question about fancy heading. I want to know if there is a way for the rectangle to cover the section name no matter how long or short it is? \documentclass{article} ...
0
votes
0answers
62 views

Customizing a title section with titles package

Looking at the titlesec documentation I found a example suitable for me, so I made a little modifications and get something like this with the following code \documentclass{article} ...
1
vote
1answer
82 views

Tracking in chapter titles with titlesec

I've been trying to add tracking (letter spacing) to my chapter titles with titlesec, but to no avail. I'm using fontspec and XeTeX, so microtype isn't available to me. Another post said this can be ...
3
votes
1answer
40 views

Computation of size in titlespacing

Consider the following example: \documentclass[11pt,a4paper]{book} \usepackage{lipsum} \usepackage{titlesec} \newlength{\textsize} \makeatletter \setlength{\textsize}{\f@size pt} \makeatother ...
2
votes
1answer
206 views

Adding chapter prefix for Appendix

I am working on a larger report and need help with chapter naming for the appendices. I want to add "Appendix" as a prefix to the chapter numbering for the appendices in my document in the actual ...