Questions tagged [titlesec]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
30 views

Create particular chapter titleformat style with tikz

Hi, i'd like to reproduce this particular chapter title format. I'm a newbie to latex and i don't know very well how to use tikz (i saw some post in the forum using it), so i dont have a code to show ...
Davide Ramaschi's user avatar
3 votes
2 answers
82 views

Center uppercase chapter title of more than one line with titlesec

I need about the same thing as Rob28... egreg's answer is perfect so far of course, but in addition, some of my titles are long and I have to split them at other places than the ones LaTeX chooses. I ...
Olivier's user avatar
  • 65
0 votes
1 answer
37 views

titlesec interferes with addcontentsline/addtocontents (adding Parts and Chapters to lot and lof)

For my lot and lof i am using something i found here, so that the parts and chapters show in them (lot and lof). And for my Titles (Part, Chapter, Section ...) i am using titlesec, so they look (imo) ...
Gabriele Di Toma's user avatar
1 vote
0 answers
31 views

APA7 Class: How to modify the section title of appendices

I'm using the APA 7 document class. And it formats the section titles of appendices Like this: Anhang A Appendix title I need to format it like this: Anhang A: Appendix title I've been browsing the ...
marsknight's user avatar
2 votes
1 answer
67 views

Remove chapter spacing completely

In the below MWE, I arranged the position of the chapter title (for this case I just need the number) such that it is at the corner touching the margin. How do I remove the spacing created around it ...
blackened's user avatar
  • 4,149
0 votes
1 answer
49 views

Colored Section Numbers

I would like to colour the section, subsection, and subsubsection numbers in my thesis document. I tried before the solution at the end of this thread:Section numbers colored but I get the error that ...
katsucurry's user avatar
1 vote
1 answer
28 views

Why need to redefine `main` pagestyle even if another pagestyle is in use?

This answer explains how to center the page numbers on the chapter pages, which are not centered even after the following MWE: \documentclass{book} \usepackage[pagestyles]{titlesec} \usepackage{...
Atom's user avatar
  • 665
0 votes
1 answer
41 views

How does \ifthesection of titleps work?

The titleps documentation mentions: (Only titlesec. Not in titleps.) \ifthechapter{⟨true⟩}{⟨false⟩}, \ifthesection{⟨true⟩}{⟨false⟩},\ifthesubsection{⟨true⟩}{⟨false⟩}... which expands to ⟨true⟩ except ...
Atom's user avatar
  • 665
0 votes
1 answer
33 views

Error changing title format [closed]

I'm trying to use the format of chapter title like this I used this code: \newlength\chapnumb \setlength\chapnumb{4cm} \newcommand{\chaptertitlefont}{\normalfont\sffamily\Huge} \titleformat{\...
Fatma Belabed's user avatar
0 votes
2 answers
21 views

package titlesec error: entered in horizontal mode at each \section{} row

I have the red error bullet package titlesec error: entered in horizontal mode at each \section{} instruction row At the beginning I had the following command, that was causing the error \titleformat{\...
Ingrid's user avatar
  • 1
0 votes
1 answer
44 views

Background color in frame mode (titlesec)

It is easy to get the un-colored version of my \section header using the following code: {\normalfont} {\filright \footnotesize \enspace SECTION \thesection\enspace } {8pt} {\Large\bfseries\...
hsmyers's user avatar
  • 1,495
2 votes
1 answer
36 views

a problem when using ```\usepackage{sectsty}``` and ``` \usepackage{titlesec}```

In my project, I use these packages \usepackage{sectsty} and \usepackage{titlesec}. However, everytime I put a section into a center environment, for instance "The first saying", the ouput I ...
PermQi's user avatar
  • 191
1 vote
1 answer
35 views

titlesec explicit stops formatting of subsubsection

I need the explicit option for titlesec. However, when I set the explicit option, and also try to format subsubsections, they disappear. The same does not happen to subsections. Maybe I am using ...
KHAAAAAAAAN's user avatar
0 votes
1 answer
45 views

Changing section name in table of contents

I used the code \usepackage{titlesec} \titleformat{\section}{\normalfont\Large\scshape}{Problem \# \thesection}{0em}{} and \section{} to create a section called ("Problem #"+section number)...
Stephanie Yao's user avatar
1 vote
1 answer
83 views

How can I edit my Title, Author and Date sections to change the spacing to even them out and shorten the space between, on top and below them? [closed]

I already have geometry set to top=2cm,bottom=2cm,right=2cm,left=2cm, but I want to make it so that can change the distance between the top of the page and the title, change the space between title, ...
Felix Maldonado's user avatar
4 votes
2 answers
182 views

Titlesec with tikz

I still confuse myself with titlesec and tikz. For example, in the below code, how do I place the chapter number and the title inside a rounded rectangle with a custom inner margin? \documentclass[...
blackened's user avatar
  • 4,149
1 vote
1 answer
44 views

How to center \S section in document and at header?

I am trying to center \S section in my document and header I use \usepackage{sectsty} \allsectionsfont{\centering} \usepackage{titlesec} \setcounter{tocdepth}{1} \titleformat{\section}[hang]{\...
Laurenso's user avatar
  • 373
1 vote
2 answers
38 views

Color gradient as line in titlesec

I created the following MWE: \documentclass[a4paper,11pt,oneside]{article} \usepackage[a4paper,margin=2.5cm,marginparwidth=2cm]{geometry} \usepackage[pagestyles]{titlesec} \usepackage{hyperref} \...
CFP's user avatar
  • 187
1 vote
1 answer
69 views

titlesec Indented Block Format

I am trying to achieve the following formatting using the titlesec package. \titleformat{}[wrap]{}{}{}{} works well to achieve the "5.2." and the wrapping of its child text. What is the ...
shea's user avatar
  • 63
2 votes
1 answer
54 views

Automatic Chapter or Section Title in Bold face and Small Caps

I have a very basic question that is basically a follow-up of this old one. How can I have small caps that are boldface in the title of a chapter or a section? Below a MWE. \RequirePackage{fix-cm} \...
Kolmin's user avatar
  • 559
1 vote
0 answers
27 views

wrapfigure in titleformat

General overview For each \section i try to put BAZ in wrapfigure in the right just in front of the section’s title but in the right side of the page. MWE \documentclass{article} \usepackage{titlesec} ...
fauve's user avatar
  • 2,499
0 votes
1 answer
64 views

Two parallel numbering system in sections, subsections, and paragraphs

I have a document (witch is an update of an old one) with a sectioning numbering system like this: \chapter 1 \section 1.1 \subsection 1.1.1 \subsubsection 1.1.1.1 \paragraph 1.1.1....
fauve's user avatar
  • 2,499
1 vote
1 answer
39 views

Including document title and part number in chapter heading, multi-line section titles

I'm attempting to replicate a particular Word template format used in my workplace in LaTeX (extbook class) but am having trouble replicating the desired Chapter and Section heading formats, shown in ...
Bells12's user avatar
  • 37
6 votes
2 answers
142 views

Titlespacing command not working for \subsection and also causing error for \section

I'm using the packages \documentclass{amsart} \usepackage{amsmath} they do not leave a vertical space between the section's title and the following text. So i'm trying to use the titlespacing ...
tutizeri's user avatar
  • 161
0 votes
0 answers
29 views

title of a section breakes an is on two pages

I use \usepackage{titlesec} to create some nice titles. For sections I use this setup: \titleformat{\section}[block] {\normalfont\sffamily}{\bfseries\thesection}{.50em}{\titlerule[0.75pt]\\[.8ex]\...
montarenbici's user avatar
0 votes
1 answer
30 views

Coloured subsection AND text right after the subsection name

I'm facing a problem due to the incompatibility between the packages TITLESEC and SECTSTY. What I want is to have a coloured subsection name, which I provided with \usepackage{sectsty} \subsectionfont{...
Henry's user avatar
  • 378
0 votes
0 answers
35 views

Make the Font of Chapter Number the Same as Chapter Title

I want my chapter number to be the same as the chapter number. \documentclass[12pt]{report} \usepackage[utf8]{inputenc} \usepackage{geometry} \usepackage{graphicx} \setlength{\parskip}{1ex plus 0....
economia's user avatar
  • 259
0 votes
3 answers
81 views

How to redefine \section to include "long-title" in the ToC?

OBS: I've made a previous post about my problem, but I was not clear enough. Therefore I will try again! I'm working on a math lecture notes template, and have the following: \section[Lecture \...
JokingGold0's user avatar
0 votes
1 answer
58 views

Endnotes section divided into subsections (follow-up)

This is a follow up from the question discussed here: Endnotes section divided into subsections My original code being turned into a MWE as much as possible is (below). My document has an unnumbered '...
Alex's user avatar
  • 55
1 vote
1 answer
66 views

References using nameref disappeared after titlesec update

With the latest update of the titlesec package (from v2.14 to v2.15) all references using nameref disappeared. I think this is a bug? This MWE shows the issue: \documentclass{article} \usepackage{...
suricata78's user avatar
1 vote
0 answers
39 views

Chapter number and name on separate lines using titletoc

I was wanting to use titletoc to put the chapter number and title on different lines in the table of contents. If I were to type the ToC out manually, then I would type something along the lines of \...
Troy W.'s user avatar
  • 151
1 vote
1 answer
29 views

How to rectify discrepancy between chapter title and toc-entry

As a compilation of the MWE below will illustrate, the titleword, which is intended to be smaller in the chapter title, becomes larger, and too large, in the toc-line. How can this be remedied? \...
Frode Alfson Bjørdal's user avatar
2 votes
2 answers
71 views

Custom section style using titlesec

Is there a way to modify the section label to anywhere else? For example, in the image below I would like the title to be right where it says "title here" This is the titleformat: \...
luth's user avatar
  • 23
1 vote
0 answers
18 views

How to use the same titleformat for numbered and unnumbered chapters/sections?

I'm using titlesec with explicit option, and I have a titleformat for chapters like this: \RequirePackage[explicit]{titlesec} \titleclass{\chapter}{straight} \titleformat{name=\chapter}[block] {\huge\...
Rubén Gómez Olivencia's user avatar
0 votes
2 answers
62 views

Two texts with the same width on two different lines, but with different font sizes

I want to create a new command for a template cover, and I think a specific type of formatting would look great, but I'm having trouble implementing it. Essentially, what I want to do is have a title ...
Jimeens's user avatar
  • 617
0 votes
0 answers
35 views

Format latex chapter and ToC

I am trying to get my chapter title as And the ToC with Title, Date and page number. As of now, I have only managed the date with vspace: \documentclass[10pt]{book} \usepackage[explicit,compact]{...
BaRud's user avatar
  • 2,169
2 votes
2 answers
62 views

Allign lettrine with title

I would like to recreate the look of the first page of an old book. Is it possible to align the initial with the section title? \documentclass{scrbook} \usepackage{microtype,fontspec,lettrine} \...
ReRunner's user avatar
  • 371
0 votes
0 answers
18 views

chapter title style and spacing issues of above of title

I'm writing my thesis using document class report. The chapter titles are coming as "Chapter 1": a gap then on the next line "Introduction". I want to make it "Chapter 1: ...
Noor Hira's user avatar
1 vote
0 answers
21 views

Keep section headings within a certain part of the line

Is it possible to force section headings to stay within the first 30% of the \linewidth? In other words, how can I make the section headings occupy a column whose width is 3/10 the width of the line? ...
Noah J's user avatar
  • 515
1 vote
1 answer
115 views

Can't get Appendix before A on TOC, when using appendix package with titlesec and titletoc

I'm writing my thesis and Appendices have to say “Anexo” before chapter letter. I tried using \usepackage[titletoc]{appendix}, but it didn't work. Also tried to comment command from titlesec and ...
JJP's user avatar
  • 81
0 votes
0 answers
33 views

Adding titlesec package makes nameref show wrong caption

After upgrading from Debian 11 (pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian)) to Debian 12 (*pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian)), some \nameref invocations show the wrong ...
nafmo's user avatar
  • 133
0 votes
1 answer
36 views

Undefined Control Sequence Error with \listofencl and Titlesec

With titlesec loaded, if I replace \subsection by \phantomsection I get the stated error. With that pkg removed, the replacement compiles fine. Any insight would be appreciated. \documentclass[12pt,...
Erwann's user avatar
  • 2,100
1 vote
1 answer
44 views

Counter in sectioning

I am using TikZ to define my chapter and section style, but the numbering of sections resets after every chapter. I want to number my section continuous after chapters. I use >remset.sty: \...
Durtle's user avatar
  • 21
0 votes
0 answers
25 views

titleformat with hang writes it in two lines

I can't find a way for the tikz code of the section text to be written after the section number. I appreciate any help \documentclass[a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage[...
antonio de la rosa's user avatar
0 votes
0 answers
65 views

Error Message when Using Section and Subsection in Titlesec

I have converted a .docx file to .tex, and I am trying to create a running header. Looking through the forums, I have found some nice code to generate this header. Unfortunately, when I try to ...
ceramicquasar88's user avatar
2 votes
1 answer
97 views

How can I break lines in a TikZ node used for \paragraph{…}

How to break the long title in the below code into lines? I have tried \\ and \newline without success. \documentclass[12pt]{extbook} \usepackage{extsizes} \usepackage{pgfornament,adjustbox} \...
Nguyễn Cảnh Dũng's user avatar
1 vote
0 answers
40 views

How to adjust hanging width in titlesec?

I want to achieve a section/subsection arrangement that looks like the one below: Where the subsection is indented and the multiline title is completely set apart as its own block of text. You can ...
tubaplayer144's user avatar
2 votes
0 answers
87 views

customizing chapter and section style with Tikz

How to put the section number and title in the specified box with the possibility that the sections are variable. \documentclass{book} \usepackage{fourier}% change to lmodern if fourier is no ...
Hassan's user avatar
  • 21
-2 votes
2 answers
60 views

Indent chapter title with titlesec

I am using the following code to define the Chapters with the titlesec package in the book class and XeLaTeX. \titleformat{\chapter}[block] {\futura\huge\bfseries\raggedright} {\thechapter\text{.}\...
Yannick's user avatar
  • 31
2 votes
2 answers
39 views

Change table of contents numbering without changing titles

I'm working on a latex project using the report document class. I want to change the way the table of content numbering is made. I want to show only the corresponding number, as follow : Yet, I also ...
cachkulberg's user avatar

1
2 3 4 5
31