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

learn more… | top users | synonyms

4
votes
1answer
19 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
25 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
27 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
12 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
31 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
35 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
47 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
26 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
41 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
56 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
44 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
45 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
56 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
11 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
105 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
124 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
47 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
35 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
100 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
81 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
41 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
72 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
58 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
116 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
27 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
38 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
66 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
45 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
37 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
40 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
41 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
36 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
50 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
17 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
110 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
165 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 ...
5
votes
3answers
137 views

How do I redefine the paragraph style midway through the document (and then go back to the default)?

I prefer to build my bibliography manually because I'm finicky about the formatting, and I need each bibliographical entry to have a hanging indent and an empty line after it. I'm doing fine with this ...
2
votes
1answer
82 views

Fancyhdr - No “Chapter” Word, but part number

I am having trouble defining my headers with the fancyhdr package. Here is what I want : - on the left page, on the left side : partnumber.chapternumber. Chapter Name - on the right page, on the right ...
0
votes
1answer
40 views

Renumbering chapter after part, correct ref, ToC and chap header aspect

The title may seems unclear. I have a document with several parts, including several chapters. I want the numbering of the chapter to be reset after each new part (easy) BUT : - I want the header of ...
2
votes
2answers
83 views

How to convert titlesec code to scrlayer-scrpage code

In my LaTeX code I use the actual version of the KOMA-script bundle and its documentclass scrbook. In this regard I wonder how to convert code which uses the package titlesec to code which should use ...
1
vote
2answers
61 views

Changing space before chapter without titlesec package

I am sorry if this is a repeated question, I could not find anything similar on the forum search. How to adjust the space before the chapter heading without using titlesec package. I tried this code ...
8
votes
2answers
80 views

Converting “section” into “\section” to pass to the titleformat command

The \titleformat command of the titlesec package is invoked in the following way: \titleformat{\section}{<a few formatting options>} \titleformat{\subsection}{<a few formatting options>} ...
2
votes
2answers
97 views

\titlesec and chapter&section missing zero error

I've looked and looked on here for a possible answer but i'm coming short. I even referenced the titlesec .pdf instructions and still no clue. I'm having an issue with my \chapter in the main body, ...
2
votes
1answer
29 views

Problem with pagebreak in titlepage

I am trying to make a first page template. At this template I want a box at the bottom of the page with some text, but I can not get TeX to put it at the bottom, but rather it is moved to the next ...
0
votes
0answers
68 views

avoid hyphenation in chapter title using tikz and titlesec

[This question is similar to the one here, but the solutions given there do not work in my context] In a (fairly complex) book I'm using titlesec and tikz to produce fancy chapter headings, basically ...
0
votes
0answers
27 views

72 pt. spacing before Section heading [duplicate]

I'm trying to add a 72 pt. space before the section heading. I do not only want the 72 pt. between paragraphs but basically every section should start at a new page with a 72 pt. spacing before it. ...
3
votes
1answer
73 views

Do I need titlesec or is fncychap enough for doing the following?

i would like to change the "chapter" style of the documentclass "report" to read something like 1. Introduction in stead of Chapter 1 Introduction Can anyone help me with this? Do I need ...
2
votes
1answer
33 views

Hide titleformat in a macro when [explicit] is loaded

This is a follow-up question to: Different titleformat style for different numberless chapters I have something like the following macro: \titleformat{\chapter} {\normalfont\Huge\color{blue}} {} ...