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

learn more… | top users | synonyms

1
vote
2answers
79 views

Chaptertitle boxed in twoside book-document

\documentclass[11pt,a4paper,twoside,openany]{scrbook} \usepackage{tikz} \usepackage[explicit]{titlesec} \usepackage{blindtext} \titleformat{\section}[hang]{\large\bfseries}{\thesection\quad}{0pt}{#1} ...
2
votes
1answer
122 views

Chapter style for a book of complied articles

Say each chapter is an article (manually copying or typesetting the article). Naturally, article title will be used as chapter title. How do I define sections for subtitle, author, date, and source ...
1
vote
1answer
57 views

Why does my document still have vertical space before a chapter? [duplicate]

So I wanted to customise my chapter style and remove the space before it. I've already used \titlespacing from titlesec package, but there still is space before the title. mycls.cls: \NeedsTeXFormat{...
4
votes
1answer
82 views

Customizing section for adding bullet or image

I am a newbie to TeX and I'm trying to create a template CV for learning LaTeX class and new commands. I want to create an \iconsection command get 2 values: first, an icon filename or pifont symbol,...
5
votes
2answers
94 views

Using llap in titleformat prevents line breaking

I would like section numbers to be placed in the margin. I found a solution here (Theorem Name/Numbering in Margin) which works with a caveat: when the section title is very long, the title text line ...
1
vote
1answer
102 views

Titlesec chapter headings wrapped over two lines

I'm using titlesec to produce chapter headings with this code: \titleformat{\chapter}[display] {\bfseries\huge\sc} {\sc\filright\chaptertitlename~\thechapter} {0ex} {\titlerule \vspace{0ex}% \filleft}...
2
votes
1answer
65 views

Appendix Numbering Format: Dash instead of Dot after (alphabetic) number of appendix

How can I change the dot after appendix's numbering (A.) to dash (A -)? MWE \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage{standalone} \usepackage{wallpaper} \...
2
votes
1answer
160 views

Package titlesec Error: Incompatible package?

Here is my code. Something goes wrong. \documentclass{book} \usepackage{titling} \usepackage{lastpage} \usepackage{titleps} \newpagestyle{main} { \sethead[\footnotesize \sffamily{Page}\thepage\ \...
1
vote
2answers
103 views

LaTeX vertical spacing after numbered paragraphs

I'm relatively new to this forum and LaTeX in general, so please excuse me if I'm duplicating a question, but I can't find a satisfying solution to my problem. I have introduced numbered paragraphs by ...
2
votes
1answer
69 views

Problem with pgfornament in titlesec \titleformat

I'd like to make a nice section title using the pgfornament package in the \titleformat of the titlesec package. When I use only one ornament on the left side it works. \documentclass[11pt]{book} \...
2
votes
1answer
53 views

Why does my custom sectioning command crash on second run when using etoc?

Finally I have narrowed down the problem to a custom definition of a sectioning command using titlesec in explicit mode. I suspect it has something to do with me not providing an adequate counter for ...
4
votes
1answer
46 views

use titlesec in biditufte class

I want to specialize sectoining in persian biditufte class. I use this code in report class but in biditufte-handout class I got an error. \documentclass{report} \usepackage{xcolor} \usepackage[...
1
vote
3answers
167 views

ToC Chapter alignment conflict with titlesec

I need all the numbering aligned left, sections and subsections slightly (0 or 2pt maybe?) on the right of chapter. Chapter and section all caps. The screenshot will explain better what I need: ...
1
vote
1answer
71 views

Condensed bibliography with runin title as in titlesec

Here is an MWE for a document I'm working on, based on code from here, modified with some titlesec options. My goal is to get the references title to appear as a runin title as in all the other ...
1
vote
1answer
46 views

How do I customize the font and font size of every section title once and for all?

\documentclass{article} \newcommand{\sect}[1]{\section{\fontsize{20}{30}\selectfont \ctxfr #1}} \begin{document} \sect{Yes} \end{document} Above is what I tried; it is unfortunately not workable ('...
1
vote
0answers
11 views

Vanishing \footcite if the titlesec package is loaded [duplicate]

I'm trying to use multiple \footcite citations at the end of a \section. This works as expected as long as I don't have the titlesec package loaded, but as soon as I do, all but the last \footcite in ...
6
votes
3answers
131 views

Selective and bunched entries to list of figures

I have a complex document with a few thousand figures (most of which are slight variants, but a few are key). I would like to produce a list of figures (lof) which only includes individual figures ...
3
votes
1answer
92 views

title spacing using titlesec and customisation

I am using some code from here which allows me to use ordinal numbers in arabic for the chapter titles. I also want to change the title spacing. I am only a little familiar with titlesec. The \...
2
votes
1answer
37 views

Changing the relative position of the starting point of every chapter (also Preface, References, Index if any)

I would like that the starting point of the first page of each chapter (also Preface, References, Index if any) be at the position 1/3 of the text-height of the page (from the top of the page). In ...
0
votes
0answers
29 views

How to make titlesec show greater number depth?

\setcounter{secnumdepth}{5} \titleformat{\paragraph}[hang]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{} \titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{0.5em} \titleformat{\...
0
votes
2answers
167 views

customization of section with tikz and titlesec

i'm trying to customize the title of sections in my document using the packages tikz and titlesec. Unfortunately, that does not work and i need some help to solve my problem. I get this error : ! ...
1
vote
1answer
48 views

Automatically reset the counter of a custom-defined sectioning block with titlesec

I added a custom sectioning block to my document following the instructions I found on this question: Defining custom sectioning commands. Below is a mvce: \documentclass[12pt]{article} \usepackage{...
4
votes
1answer
232 views

titlesec ToC formatting — capitalization, subsection numbering for sections, title formatting

I'm a newer user of the detailed formatting capabilities in Latex... I'm having a really hard time figuring out titlesec documentation to do the necessary formatting that I require. Unfortunately, the ...
4
votes
1answer
65 views

Relative spacing in titlesec

I am trying to create a custom section and subsection format that consists of the index, followed by a vertical line, followed by the title. An example can be found here: http://texblog.org/2012/07/03/...
1
vote
1answer
83 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
101 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} \usepackage[autostyle]...
2
votes
1answer
298 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
74 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
64 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
34 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} \usepackage{...
3
votes
1answer
111 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
110 views

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

I have tried: \usepackage[tracking = true]{microtype} \usepackage{titlesec} \titleformat{\chapter}[hang] {\normalfont\huge\color{darkgray}}{\filleft\thechapter}{1em}{\filright\textls[120]{\...
0
votes
1answer
142 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
153 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
71 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
195 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 pagenumber,...
2
votes
1answer
104 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: \documentclass[...
2
votes
0answers
49 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 \section[...
3
votes
2answers
135 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
93 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
115 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} \usepackage{...
5
votes
2answers
164 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} \titleformat{\...
2
votes
1answer
404 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 done....
5
votes
1answer
1k 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
43 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} \...
1
vote
0answers
138 views

Adding a sectioning level with titleclass and tocdepth

I want to add a subchapter sectioning level, between chapter and section. I use the \titleclass command from titlesec package. According to titlesec documentation, \titleclass{\subchapter}{straight}[\...
2
votes
1answer
386 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} \titleformat*{\...
2
votes
2answers
226 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 \def\neverbreak{\nopagebreak\@...
0
votes
2answers
53 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
169 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} \...