Questions tagged [titlesec]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
15 views

Removing spacing between adjacent sections and subsections (titlesec)

I am building out sections and subsections. The beforesep on subsections is desirable generally, but not if a subsection is invoked directly following a section. Is there any way to take care of this? ...
0 votes
0 answers
8 views

How to fix chapter heading appearing before new chapter?

I've set up a title page for each chapter, but I can't figure out why the chapter heading is appearing before the chapter. \documentclass[12pt, oneside]{book} \usepackage{fancyhdr} \renewcommand{\...
  • 11
0 votes
0 answers
30 views

The numbering of my Paragraph is wrong. How can i fix it?

i am a beginner at latex and i am using a template for my thesis. I managed to make the \paragraph look like my \subsection but the numbering of my \paragraph is wrong. \usepackage[explicit]{titlesec} ...
  • 11
1 vote
0 answers
18 views

Titlesec error when using macros defined using \@ifstar in section titles

I am using titlesec and would like to use a macro that has a star variant in the title of a paragraph: \documentclass{article} \RequirePackage{titlesec} \makeatletter \def\something{\@ifstar{A}{B}} \...
  • 14.9k
0 votes
1 answer
22 views

How Do I add the small caps for the section?

Here is an example that I'm trying to copy, I don't want the roman numerals, just the small caps, the aim is to make it look identical to the paper. Mine: The Aim: My code is shown below: %++++++++++...
5 votes
2 answers
156 views

Make a specific style for chapters using titlesec

I`m writing a template to learn a little bit more about LaTeX, and I am not satisfied with my \chapter{} command. I tried to make a mini TOC with the chapter number like the figure below: However, I ...
  • 540
0 votes
0 answers
17 views

**titlesec** ToC styles for frontmatter and pagestyle for frontmatter, mainmatter

I'm looking for a way to create both a ToC style and pagestyle for \frontmatter and a different pagestyle for \mainmatter using titlesec. I've run in to several issues where my code doesn't ...
0 votes
0 answers
39 views

Package titlesec Error

I have a problem with package titlesec when i tried put chapter name and chapter number in the same line ! Please help me ! Thank you very much! % !TeX encoding = windows-1251 \documentclass[% 12pt, ...
  • 1
1 vote
1 answer
51 views

How I can do this section style better?

I am making a template and trying to customize several things in it, and one of them is the section style. I created a command that makes a hexagon on the left side of the screen, as shown in the ...
  • 540
2 votes
1 answer
101 views

How to expand the title text on the chapter title fully and on the header partially?

Having benefited from this TeX.SE answer I've written this code: \documentclass[a5paper,openany,14pt,]{extbook} \usepackage[left=2.34cm, right=2.34cm, top=2.66cm]{geometry} \usepackage[explicit]{...
0 votes
2 answers
34 views

titlesec & fancyhdr - the chapter name doesn't get printed at the header

In a document using the titlsec & fancyhdr packages, I couldn't manage to print the chapter name at the header center. \documentclass[a5paper,openany,14pt,]{extbook} \usepackage{titlesec} \...
2 votes
1 answer
43 views

Section style in LaTeX

In LaTeX, the code: \usepackage{titlesec} \titleformat{\section} {\centering\normalfont\bfseries\MakeUppercase} {SECTION \thesection}{14pt}{\vspace{0.5\baselineskip}} \begin{document} \section{...
1 vote
2 answers
36 views

Titlesec issue with table of contents and starred chapters

I would like to know why the following code prints the header "CONTENTS" after chapter 1 (Intro) starts, instead of writing the correct chapter name "Intro" in the header (as it ...
  • 860
0 votes
0 answers
19 views

Starting the titlerule left of the left text margin

I need to make the \titlerule in titlesec start left of the left text margin, as illustrated in the picture (only the rule, not the title text). Here is the MWE that generated the picture: \...
  • 665
0 votes
1 answer
83 views

How to recreate this lecture command?

Im trying to create a lecture command which will allow me to insert the lecture number which will be used to number sections, figures, and etc, and which will allow me to name the lecture. I also want ...
  • 69
1 vote
2 answers
53 views

Truncating long part titles in Legrand Orange template

I am new to Latex. I am using the Legrand Orange book template. Some of my part titles are too long and should be truncated for two lines. Any idea how I can make it wrap the title? Thanks. Update: ...
  • 31
0 votes
1 answer
25 views

How to introduce a tab after number in a section title? [duplicate]

I would like to have a fixed distance from the beginning of the section number to the section title. Visually, I expect all section and subsection numbers and titles to line up vertically as if they ...
1 vote
1 answer
42 views

Is there any way to change the PART style to have black background?

First the MWE \documentclass{book} \usepackage{xcolor} \usepackage{titlesec} \newcommand{\partfont}{} %% \titleclass{\part}{top} \titleformat{\part}[display] {\pagecolor{black}\color{...
  • 157
1 vote
0 answers
30 views

Reproduce article's default table of contents with the "titletoc" package

I'm currently trying to create my own class and in it I change the colors on the sectioning commands, in order to do that I used the "titlesec" package to change from \section to \...
  • 415
0 votes
0 answers
27 views

How do I reset titlesec spacing?

I am aware that it is possible to change the spacing before and after sections using the titlesec package. That's great. I changed it, but I want to reset it later in the document to the defaults. How ...
  • 55
0 votes
1 answer
42 views

Temporarily changing section formatting

My current problem is that while I've figured out how to control the vertical spacing around sections and subsections, in one chapter my "sections" don't really deserve the elevated ...
1 vote
1 answer
70 views

paracol breaks title marks in headers set by titleps

I noticed that the paracol environment from the paracol package makes \toptitlemarks, \firsttitlemarks, and \bottitlemarks from the titleps package not work. See the following code: \documentclass{...
  • 245
3 votes
1 answer
50 views

number subsubsection

I have a problem formatting my subsubsection title using titlesec. From my code, I would have thought the Subsubsection title was numbered I.1.1 but I don't see any number on my resulting file: I ...
  • 1,023
2 votes
1 answer
36 views

How do you remove all numbering except page numbering in table of contents

Here's my MWE: \documentclass[12pt,a4paper,titlepage]{report} \usepackage[margin=1in]{geometry} \usepackage[pagestyles]{titlesec} \titleformat{\chapter}{\bfseries\centering\Huge}{}{0pt}{} \...
0 votes
1 answer
71 views

LaTeX | Section title too long for header and \sectionmark not working on same page

I am a LaTeX noob but I have not found a solution for this problem yet: I have a section title (doc class book) too long for the header and I have used the \sectionmark solution found here on ...
1 vote
1 answer
43 views

Make section, subsection and subsubsection begin on the left of page and on the same level

I need to make all the section levels to begin at the same position on the left of the page. I need something like this 1 Introduction 1.1 Subsection Heading Here 1.1.1 Subsubsection heading here I ...
2 votes
2 answers
151 views

How can I add more text after the chapter name in a book

I am trying to typeset the Quran in LaTeX using XeLaTeX and arabxetex. For chapter pages, I want the English text on the left, and the Arabic text on the right. The result should be something like ...
  • 245
2 votes
1 answer
47 views

Add an extra parameter in titlesec to display text on chapter titles

I'm preparing a book which will list the solutions to common computer science problems I've made using the titlesec package. \documentclass[openany,14pt,oneside]{book} \usepackage[bf,sf]{titlesec} % I'...
0 votes
0 answers
20 views

Top margin variation does not affect title position

The idea behind the memoir-based setup below is that the title should be confined in the setting of the \newgeometry, while the image should span the whole width of the title page sitting at its ...
  • 2,947
0 votes
0 answers
27 views

In-line \paragraph{} and \subparagraph{} commands

I am attempting to find a way to create a clickable reference link that works similar to how a clickable reference link can be created to link to a chapter, section, subsection, subsubsection, ...
1 vote
1 answer
45 views

Title has unwanted indent in it

I don't know what went wrong but it seems my chapter title has indent in it. Anyone can help me understand why it happens? MWE \documentclass[12pt]{book} \usepackage{titlesec} \titleformat{\chapter}{...
  • 35
0 votes
0 answers
23 views

Section titles formatted as blocks in the Table of Contents

I have a basic question but cannot find an answer in the (rich) titlesec titletoc documentation. In the Toc, I would like to have the section titles formatted as the following, taken from the ...
  • 11
0 votes
0 answers
29 views

Increasing vertical spacing between EMPTY subsection and the next section

I'm trying to create a template for a worksheet that is very easy to use and edit for people with minimal to no TeX experience and decided to adapt the sectioning commands with titlesec to structure ...
0 votes
1 answer
53 views

Inserting a section title into a header with titlesec and fancyhdr

I would like to place specially formatted section titles into page headers. I had been accomplishing this with titlesec and fancyhdr. However, after updating my tex distribution my solution no longer ...
0 votes
1 answer
114 views

Display All Section Marks on the Page's Header

Typing a document with package titlesec, pagestyles can easily mark first and last section title in the page header. But How to display all section marks that appears in the page to the page's header? ...
  • 91
2 votes
1 answer
41 views

How to make chapter and section titles have title rules with different lengths?

First an MWE and its output are as follows: \documentclass{book} \usepackage{titlesec}% \let\oldtitleline\titleline \renewcommand{\titleline}{\oldtitleline*} \setlength{\titlewidth}{0.3\textwidth}% \...
  • 3,707
0 votes
1 answer
45 views

Titlesec undoes an etoolbox patch. How to make them compatible?

This answer says how to avoid indenting long section titles and obtaining something like in the picture (not me who introduced this format, it's just the format I have to deal with now, and titles ...
  • 4,584
1 vote
1 answer
53 views

titlesec section titlespacing not working after clearpage

In my scrreprt styled dcoument, the chapters, sections, etc. are formatted with titlesec. It is configured to insert a \cleardoublepage command before a new chapter and a \clearpage command before a ...
  • 13
2 votes
0 answers
51 views

frame does not appear in xelatex

I'm new in Xelatex, I'm trying to write a text with arabic font so I used polyglossia package and everything is okay but when I worked with titlesec the frame is not appearing if I used arbic or ...
  • 108
0 votes
0 answers
41 views

modify book.cls class to add one more section level (subsubsubsection)

I would like to modify the book.cls class by adding one more section level (subsubsubsection). I know this can be done with the titlesec package, but I'm looking for a way to do this within a copy of ...
1 vote
0 answers
19 views

I want Section 1 and chapter one the same page. otherwise the section on the new page

\usepackage{ifthen} \ifthenelse{\value{section}=1\OR \value{section}=0} {\renewcommand*{\thesection}{\arabic{section}} \let\bkdsection\section \renewcommand*\section{\bkdsection}} {\...
1 vote
1 answer
47 views

Setting styles of page numbers for chapter pages and normal pages

I have the following formatting requirements for my page numbering: For chapter pages, centered on the bottom (half an inch from bottom edge of the paper) For normal pages, right justified on the top-...
  • 11
2 votes
1 answer
62 views

How to get chapter title in header the same color when chapter title itself is in multiple fonts with different colors?

Assume I need to sandwich English words in chapter titles which are mainly in Burmese. I want those sandwiched English words in red color. However I want to have all the headers text only in gray ...
  • 151
4 votes
0 answers
32 views

titleformat and parttoc

I would like to have a parttoc on the first page of the part but I would like to be able to change the style of the part title. Can someone help me please ? I need to run this : \documentclass[12pt,...
  • 41
0 votes
0 answers
30 views

Thick line to the right and thin line below section of section title

I am trying to customize the section title of an exercise book I am writing. The sections are numberless. I would like to get something like this: EXERCISES ################################ My ...
0 votes
2 answers
60 views

Alignment of a 2-line title in the TOC in scrbook

I have checked several other questions addressing similar issues as this one, but I am still not able to tweak my document the way I want. I have this 2-line chapter title: which looks awful in the ...
2 votes
1 answer
45 views

How to Prevent Titlesec from Automatically Producing an Entry in the TOC

The following code is derived from egreg's answer in Centering an Arabic Section Number Above Justified Title Text \documentclass{book} \usepackage{titlesec} \titleformat{\section}[display] {\...
  • 7,272
3 votes
2 answers
50 views

How to produce a line break with the runin style?

When using the runin style for sections, text will immediately follow the title. However, in some rare situation I would like to have a line break after the title. How should I achieve this? I tried ...
  • 7,380
0 votes
0 answers
34 views

Difference Between Break and Linebreak Commands [duplicate]

The motivation for this question originates from the answer given to Centering an Arabic Section Number Above Justified Title Text Consider the code \documentclass{book} \usepackage{titlesec} \...
  • 7,272
1 vote
1 answer
38 views

Centering an Arabic Section Number Above Justified Title Text

Consider the code \documentclass{book} \usepackage{lipsum} \usepackage{titlesec} \titleformat{\section} {\sffamily\Large\bfseries} {\thesection}{1em}{} \renewcommand{\thesection}{\arabic{section}}...
  • 7,272

1
2 3 4 5
29