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

learn more… | top users | synonyms

0
votes
1answer
28 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
29 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 ...
7
votes
0answers
28 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
41 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
35 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
32 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
54 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? ...
-1
votes
0answers
27 views

overfull \hbox with titlesec

i already searched but didn't find the answer. I have used a template in order to create my CV (CV Latex templates). And below the titlerule if my text is too long it will go beyond the border. The ...
2
votes
1answer
33 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
47 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} ...
4
votes
2answers
84 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
38 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
49 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
26 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
42 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, ...
1
vote
1answer
30 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
41 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
41 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 ...
2
votes
1answer
57 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} ...
1
vote
1answer
36 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
43 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
60 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
47 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
56 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
62 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
15 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
115 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
139 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} ...
3
votes
1answer
58 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
40 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
101 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
88 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
42 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
78 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
72 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
119 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
30 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
41 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
70 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
51 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
44 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
26 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
54 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 ...
3
votes
2answers
48 views

Titlesec commands creating “bookmarks” on file structure

I used the titlesec package to customize my sections. When I use the commands \titleformat and \titlespacing, a "bookmark" is created because I wrote \section inside those commands, which according to ...
2
votes
1answer
50 views

dynamic title size using titlesec

Is there a way to dynamically size titles as part of a \titleformat (from the titlesec package) definition? I'd like to scale titles of different lengths to be the same width (relative to \textwidth) ...
1
vote
1answer
44 views

titlesec: different formats for numbered and unnumbered sections/chapters

I'm not sure if this is too minimal. (In the real document the problem appears at the bibliography, table of contents and \chapter*) \documentclass[a4paper, 11pt]{report} \usepackage[utf8]{inputenc} ...
1
vote
2answers
54 views

Change color of numbers of sections

I want to change this box in which I have the section number to black, which I can do. But then the text is the same color and illegible. I need to make it white. I tried this but it didn't do ...
3
votes
1answer
20 views

Titlesec and \ref do not match

I am using the titlesec package to modify how the sections are numbered. The problem is that when I label it and refer latter, the reference will use the standard section number. Here is a minimal ...
0
votes
2answers
120 views

TOC and header versions of section titles (titlesec interferes with fancyhdr)

I am working on a long document with many chapters, using report class. I would like to have three different versions of certain section titles (long for document, medium for TOC, and short for ...
0
votes
1answer
322 views

Put the § symbol before each section number [duplicate]

I'm writing a document (article class). I'm using the clever reference package to crossreference sections, and I have modified the references so the \cref{label} produces, for example if it's section ...