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

learn more… | top users | synonyms

3
votes
1answer
74 views

Titlesec space issue

\documentclass[11pt,]{article} \usepackage{titlesec} \titleformat{\section}[leftmargin]{\normalfont \titlerule*[.6em]{\bfseries.}% \vspace{6pt}% \sffamily\bfseries\filleft} {\thesection}{.5em}{} ...
3
votes
1answer
38 views

How could i adjust the direction of section number and section name?

In Default Settings , LaTeX let the section name and section number both are bottom align, like this: now I want them use the "center align" like this: I try to use the titlesec package to ...
1
vote
1answer
41 views

Can you change the style of the section number but not the subsection

So I'd like to make the section headers be 1. Introduction for instance but not the subsections 1.1 Subsection I've tried these commands here: How to add a dot after the section number? but they ...
2
votes
0answers
25 views

Use titlesec from Sublime 2

Sorry for the stupid question.. But how is it possible to use the titlesecpackage of LaTeX from sublime 2? Thanks in advance.
4
votes
1answer
172 views

Bad interaction between titlesec/titleps and packages that use \markboth internally

The following MWE demonstrates a bad interaction between endfloat and titleps. The second page has the word FIGURES in all caps in both the header and the footer, contrary to the page style ...
0
votes
2answers
56 views

How to format section headings?

a question about formatting section titles. In the article class, I want to format my section titles as follows: Hide the section number in the title. Use upper case. Add a dashed title rule below ...
1
vote
1answer
60 views

Mini TOC next to chaper

I would like to place a mini table of context directly next to the chapter like in the following. For compatibility reasons the toc should be created using titletoc as suggested in this answer. The ...
2
votes
2answers
79 views

Titlesec: chapter in top margin

How can I put a chapter or section title into the margin such that it is on the top of the page? This is what I want: But the following MWE produces \documentclass{book} ...
0
votes
1answer
45 views

Section* in titlesec package

I cannot see section* in this source: \documentclass[oneside]{book} \usepackage[margin=1cm,top=1.5cm,right=1.5cm,bottom=2cm]{geometry} \usepackage[explicit]{titlesec} \usepackage{polyglossia} ...
1
vote
1answer
38 views

Use titleclass only in part of document

For my current project I need my document to have three parts. In the first and last part, I want the default sectioning, but in the middle part I need to apply a different style to the section level ...
8
votes
3answers
89 views

Section title formatting also in the toc

I have searched the web to no avail trying to figure out how to redefine the section title format in a way that will be transmitted to the way that same chapter appears in the Table of Contents. I ...
2
votes
1answer
61 views

How to change space before and after chapter / section etc

I would like to have the following spacing: \titlespacing*{\chapter}{0pt}{50pt}{30pt} \titlespacing*{\section}{0pt}{13.2pt}{*0} \titlespacing*{\subsection}{0pt}{13.2pt}{*0} ...
1
vote
1answer
51 views

A problem of compatibility between titlesec/titleps and biblatex

I recently met a problem when trying to format headers and footers of the bibliography with titlesec/titleps, and I can't understand what's happening. More precisely, if I change the page style just ...
2
votes
2answers
245 views

Customizing chapter and section style (scrbook)

I have found a very cool custom style for chapter and section headings (It is from Customizing Chapter style in scrbook): \documentclass[ 11pt, pagesize=auto, version=last, chapterprefix=true ...
0
votes
2answers
72 views

How to center section when using \titleformat{\section}?

I decided to use \usepackage[center]{titlesec} in order to center my sections, but I don't want them displaying the chapter/section numbering in the chapter/section headings so I applied the ...
2
votes
1answer
44 views

Wrong section number with fancyhdr when using clearpage

I am using Latex for my Bachelors Thesis and I have run into a little problem, I haven't been able to fix yet: I am using Article as my document class and want each section to start with a new page, ...
1
vote
1answer
66 views

Custom chapter number with titlesec and geometry: number past page border

I have used the titlesec package and geometry package to get the following chapter style (note that I'm using XeLaTeX): This works, however I am unable to align the chapter number in the way I ...
4
votes
1answer
48 views

Sections in the margin and subsections on the same line as the section

I'd like to write a document so that \section material shows up in the margin and so that \subsection material shows up on the same line as the \section in the margin (assuming there isn't anything ...
4
votes
2answers
57 views

Help changing Title Format

I managed to find this code snippet somewhere a while back which made my chapter titles look fancy: \titleformat{\chapter}[display] {\normalfont\Large\raggedleft} {\MakeUppercase{\chaptertitlename}% ...
1
vote
1answer
126 views

change font and font sizes for section and paragraph

I am migrating my organisation's documentation system to LaTeX. Parameters defined: Heading Font: Futura Bold Heading Colour: RGB{x,y,z} Font Size: 18pt, 15pt Body Font: Futura Book Font Size: 12pt ...
1
vote
1answer
34 views

\titlespacing* with a negative before-sep makes PDF bookmark aim too low

When I use \titlespacing* with a negative before-sep to make the chapter title higher, clicking the title in the PDF bookmark will navigate to a lower position. With the following MWE, the title will ...
3
votes
1answer
47 views

truncate headings when they have macros in them

EDIT: @egreg, I copy-pasted your document with \expandonce, but if I put a subsection with a macro inside, \subsection{\textit{EE} LEFTshort subsec}, then I get the error Missing control sequence ...
2
votes
1answer
38 views

A manually created suffix for section titles compiled using tex4ht

I am building a document that looks one way with xelatex and another plain text file appearance using tex4ht. I produce an html document that then produces a great document that can be copied into ...
6
votes
3answers
144 views

Section title with dash which appears conditionally on whether there is a section title

I would like to add a dash after the section label but before the section title. But I would like to do this conditionally on if there is a section title in the first place. So \section{Merry ...
6
votes
1answer
51 views

How can I use the `\nameref{}` command for starred sections using the `titlesec`-package?

I want to add subsubsections with alternative numbering (A1..A3, B1..B3, etc.) to my document. These subsubsections should be added to the ToC, but the native numbering should be suppressed, the ...
2
votes
1answer
135 views

Book (Novel) Layout

I would be grateful for any advice please. I would like to format section headings with the Mathilde font. However, I receive an the error: File ended while scanning use of \scr@ttl@@extract. Usage ...
2
votes
1answer
48 views

Add “Part” before the number in Toc when using titlesec package

According to other answers here and elsewhere on the Internet, to add "Part" before the part number in the ToC you do this: \usepackage{tocloft} \renewcommand\cftpartpresnum{Part~} However, I've ...
8
votes
1answer
108 views

Trouble understanding \titlelabel, \thesection, \thesubsection, \thetitle

I am reading the document for titlesec package. There is a command called \titlelabel{<lable-format>} and the document says: "Changes the label format in sections, subsections, etc. A ...
2
votes
1answer
28 views

Bigger headline numbers without changing the height of the headline

I have made the section numbers in the headlines appear in the margin with this code \newlength\mylen \setlength\mylen{\dimexpr\oddsidemargin+7mm+\hoffset\relax} \titleformat{\section} ...
3
votes
1answer
47 views

Subsection not aligned with header subsection when using clearpage before subsection

I have implemented a custom subsection like this: \renewcommand\thesubsection{Question \arabic{section}.\arabic{subsection}} And I would like to clear the page before each subsection so I added ...
3
votes
2answers
123 views

titlesec is not properly working with koma script

I am new to latex and I am using titlesec for formatting the chapter headings with titlesec. \usepackage{titlesec} \titleformat{\chapter}[display] {\bfseries\huge} ...
3
votes
2answers
86 views

Superscripts + custom title spacing adding extra space between lines?

When I have superscripts in body text that there is some extra blank space between that line and the line above it. How do I make it stop doing that? Lowering the superscripts, for example, or making ...
1
vote
1answer
85 views

How do i get a linebreak in a tikz / titlesec chapter style for a long chapter name

i use a modified chapter style adapted from http://texblog.net/latex-archive/layout/fancy-chapter-tikz/ i tried to get a line break for a long chapter name with the varwidth package based on ...
2
votes
2answers
63 views

section prefixes in TOC

I'd like to give some section special "labels" to be printed in their titles and in the table of contents. My document describes several "axes", each of them containing one or more "themes". The ...
0
votes
1answer
81 views

titlesec: left margin alignment of run-in custom headers

I've used titlesec to define headers in my custom .sty file. See the code at the end of this post, and especially the runin shape spec for paragraph. For various reasons, I want numbered level 4 ...
1
vote
2answers
73 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
113 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
56 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: ...
4
votes
1answer
80 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 ...
5
votes
2answers
88 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
87 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}% ...
2
votes
1answer
57 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
133 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
1answer
87 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
62 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
52 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
44 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} ...
1
vote
3answers
154 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
66 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 ...