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

learn more… | top users | synonyms

6
votes
1answer
136 views

Centring a heading, including the numbering

I've got a problem that should be simple to fix. I'm using the fontspec to layout my chapter headings like so %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode ...
3
votes
2answers
573 views

How to have an amsart-like subsection style

If you use the amsart class, then it puts a period after the subsection title, but not if there is no title. For example, if I write \subsection{Title} Blah1 \subsection{} Blah2 Then amsart ...
7
votes
2answers
1k views

How to make horizontal lines thicker?

I am customizing the section module following the tutorial here http://blog.scribtex.com/how-to-write-a-latex-class-file-and-design-yo How do I make the [\titlerule] % Inserts a ...
2
votes
0answers
820 views

Explanation of code using \titleformat [closed]

I am writing a project in latex and to make my output pdf look more fancy i am using a "Fancy chapter headings with TikZ" code found here http://texblog.net/latex-archive/layout/fancy-chapter-tikz/ ...
6
votes
2answers
387 views

Suppress headers when page contains a section title using titlesec

I'm writing a book with titlesec and try to suppress headers containing the section name, when the section starts at the top of the respective page. Given that all my sections start on a new page I ...
5
votes
1answer
569 views

Positioning the beginning of table of content (toc) to the top of the page

I managed with great help from here to shift the beginning of the chapter titles to the top of the page, but it doesn't affect the table of content. Why is that? And how could I do that? I don't ...
2
votes
2answers
1k views

Can't shift/position \chapter with titlesec?

Somehow I my attempt to change the placement of \chapter seems not to work. I would like to that my chaptertitle begins right at the top of the page. Do I need to change the plain pagestyle? ...
6
votes
2answers
429 views

Impossible to have a Tikz fading in a titlesec header?

I want to put a TikZ figure with a fading effect (which I reproduced in the body of the document as illustration) in the page header, which I set with the package titlesec. The following MWE seems to ...
2
votes
1answer
1k views

amsart and titlesec - title font won't change

Ok, I am very new to LaTeX. I am using a default template. I have been trying to figure out how to change the font sizes and other formatting. Reading forums convinced me to try titlesec. All titlesec ...
9
votes
2answers
649 views

Section should automatically start new page if the whole section does not fit on current page

I would like my sections to start on a new page if they do not fit on the current page. In other words: if a section fits on the current page print it, if it does not fit start printing it on the ...
4
votes
1answer
145 views

Setting vertical spacing between different document elements at the same time

I have the following problem. Let's define three types of document elements: Titles, Paragraphs and Longtables. The problem is to setup vertical spaces between them independently. For example, let's ...
2
votes
1answer
437 views

Modifying toc & bib titles

I would like to \flushright the toc's and bibliography's title, but the font size and spaces above and below should be the same as for regular chapters. Here is what I did: \documentclass{report} ...
5
votes
2answers
339 views

How to import additional code into class file

I was inspired by the article "Fancy chapter headings with TikZ" (Stefan Kottwitz many thx) and I have created the whole fancy sectioning. But what I need to do now is to import this whole code for ...
5
votes
1answer
657 views

Format title: section number flush left and title centered?

How can I format with the titlesec package that I get somethine like this (this is a twocolumn document): I do not know how to get the number to the left and the title in the center is this ...
11
votes
1answer
5k views

Obtaining the default section spacing into the \titlespacing* parameters

I'm using the book class. I want to modify the spacing before and after my sections using the \titlespacing* command. However, before I do that, I want to let its parameters be such that they ...
5
votes
2answers
4k views

How can I hide the chapter headings number on LaTeX and change the spacing?

I'm writing my Thesis but I have run into some layout troubles, I'm using the standard book document class, which results in my Chapters headings in the form of: Chapter # Name of my chapter ...
16
votes
2answers
720 views

How to extract the value from a pgfkeys style element

Lets say I have defined some style: \tikzset{mystyle/.style={inner xsep=2pt, outer xsep=10pt}} Given the name of the style: How can I later get the (possibly overriden) value of one of its element, ...
1
vote
2answers
663 views

Use sections “inline”

How can I get the startpoints for my sections (see top part of MWE) as one inline text, similar to what can be done with the bottom part of my MWE? I need the sections since my title marks etc work ...
2
votes
1answer
9k views

Vertical space before section title with titlesec

I was trying to eliminate the vertical space before and after the title of a section by using the titlesec package and the command \titlespacing*{\section}{0pt}{0pt}{0pt}, but it works only in ...
8
votes
1answer
1k views

Strange behaviour of titlesec, with colored titlerule

With the following MWE, i get the Section title underlined in black : \documentclass[12pt]{article} \usepackage[explicit]{titlesec} \usepackage[dvipsnames]{xcolor} \titleformat{\section}% ...
7
votes
4answers
3k views

Giving headlines a background color spanning across the entire typearea

I posted this at stackoverflow and got redirected here. This does indeed look like a better place to ask. I would like to decorate my headlines (section, subsection, etc.) by adding a background ...
7
votes
1answer
651 views

How to prevent a page break between section title and colored rule?

I use \usepackage[explicit]{titlesec} to customize the design of my sections, subsections... In particular, i have : \titleformat{\section}% {\large\sffamily\bfseries}% {My Section \arabic{section} ...
4
votes
1answer
3k views

\titleformat{name=\section} in documentclass

I defined a documentclass in which I redefine a heading format with (using the package titlesec): \titleformat{name=\section} This works. But if I move this \titleformat{name=\section} to a ...
3
votes
1answer
619 views

Center body and left margin in page

I'm using the titlesec package to put section titles to the left of their body, but I'd like for the entire page to appear centered. That is, I'd like for the space from the far left of the page to ...
1
vote
1answer
414 views

is it possible to fake the amsart class format?

I often use the amsart documentclass. I like it because it is very compact (it also seems to be an industry standard in my area). What I don't like about it is that I'm not able to use kpfonts or ...
4
votes
1answer
472 views

\addvspace after a titlesec heading

So, I'm trying to make an environment that is always padded above and below by a certain vertical space, no more and no less (unless the previous or following elements require even more space). My ...
10
votes
1answer
253 views

Strange behaviour of \renewpagestyle from the titlesec package

The following code uses the pagestyles option and \renewpagestyle from the titlesec package to redefine the plain style: \documentclass{book} \usepackage[paperheight=12cm]{geometry} ...
9
votes
1answer
577 views

Temporarily modifying the chapter headings' layout

I would like to modify the layout of some "special" chapters in my document, but afterwards reset to the layout I used before, i.e. \documentclass{report} \usepackage{titlesec} \begin{document} ...
1
vote
1answer
251 views

Conflict between the packages titlesec and marginnote

In the following code, the use of the package titlesec modifies dramatically the formatting based on the package marginnote. The package titlesec is needed so as to use this. Is there one possibility ...
22
votes
2answers
2k views

Incompatibilities between KOMA-Script and titlesec

This is a complementary question to About memoir and titlesec incompatibility. The titlesec manual states (p. 2) that the package [...] works with the standard classes and with many others, ...
4
votes
1answer
535 views

Current section title macro using titlesec

I have a macro that contains the title for the current section, however when using the titlesec package, it no longer works for \section and \subsection. I know titlesec redefines the functions I'm ...
3
votes
1answer
3k views

Usage of titlesec package when numbering sections

This question evolved from my earlier question posted here. It turnt out that what I gave as the MWE actually worked, so I investigated a bit and found the real problem. I have a document in which I ...
18
votes
1answer
805 views

About memoir and titlesec incompatibility

In page 2 of the titlesec documentation, Javier Bezos writes titlesec works with the standard classes and with many others, including the AMS ones, and it runs smoothly with hyperref. ...
8
votes
1answer
3k views

Adding section number after section title with titlesec package

I am having difficulty adding the section number after the section title. Normally the order is section number followed by section title. I want it to be the opposite. I am looking for what I should ...
4
votes
2answers
580 views

insert code before chapter title

I would like to insert some code before the chapter title appears. I have defined: \newcommand{\toptitle}[2]{\itshape #1 \hfill #2 \par} Then, if I am writing for example: \begin{document} ...
7
votes
2answers
1k views

Section titles, hyphenation, manual line breaks - and how to avoid them

I have several section titles in my document that are getting hyphenated, which is quite ugly. I am now looking for some way to avoid the hyphenation, which is is somewhat related to this question, ...
5
votes
1answer
1k views

titlesec: Vertical space that I don't want

Again me, still trying to emulate a very specific layout... I used the titlesec package to define chapter and section titles, and am very pleased with the outcome... except of some ponts' worth of ...
1
vote
0answers
137 views

Subsection language problem [closed]

I work with LaTeX on Windows XP (MiKTeX 2.8, LEd 0.53) and I use Polish fonts that has several unusual letters like "ą, ż, ć" etc. I work in book mode and the problem is that I don't get Polish ...
2
votes
1answer
200 views

Firsttitlemarks does not appear consistently in header

I am using this code for my header marks, but as you can see it misses the very first mark for the subsection which should be the first verse. % definition of the page style with required headers ...
11
votes
2answers
298 views

Fix indent for section title

I like to recreate the layout of an official template, in order to get rid of Word. Because the template is from the government, I must recreate it 1:1. In the end, the document should look like ...
9
votes
3answers
3k views

Underline and center headings

For a paper I have to make my LaTeX document guideline conforming. Many of you will already guess now that this means dirty work by violating virtually all possible typography standards. My biggest ...
2
votes
1answer
188 views

titlesec: toptitlemarks and bottitlemarks broken when \section not called explicitly

This question is linked to my previous chapter-and-verse-in-header question I am trying to produce a Bible text where the Chapter and Verse references appear in the header of each page. As can be ...
4
votes
2answers
399 views

Chapters and verses of current page in header

This question is linked to my other titlesec question Does any one know how to add the current segment location at the top of any particular page. What I need is the reference at the top of a ...
4
votes
1answer
382 views

Funny-ness with titlesec and section labels (“missing \begin{document}”)

Having a problem somewhat akin to "How to put section number into the right side of section title in LaTeX" (and neither of the two answers there floating my boat), I was tinkering with titlesec, and ...
0
votes
1answer
1k views

How to change the section font to specific size by using \titleformat?

I want to set the section font to the specific size and type. But using \titleformat can only give few standard types, like Large, large... \titleformat*{\section}{\LARGE\headingfont} ...
3
votes
1answer
1k views

Suppress page number from Chapter side titlesec

I'm struggling with removing/suppressing the page number from pages with chapter headings. When using \usepackage[pagestyles]{titlesec} and \newpagestyle{mystylep}{ \setfoot{}{}{}} the page ...
1
vote
2answers
1k views

Customizing Table of Contents Formatting

For the most part, the default formatting for the ToC, LoF, and LoT is fine. But I need to add an extra line (university's requirements for my thesis) between each numbered entry. In order to do this, ...
1
vote
1answer
270 views

Help understanding/debugging spacing around headings (and other places)

I am trying to get my headings set up to meet my university's thesis formatting requirement. I'm using the titlesec package because it has the ability to suppress the spacing before the second heading ...
10
votes
3answers
1k views

Customize headers without fancyhdr

I have strange, old book chapter to rewrite in LaTeX. The most iritating thing is the header. On odd pages the header should consist of the section name etc. But the problem is that if the page starts ...
2
votes
3answers
3k views

How to change the style of “Contents” heading?

Help me, please to make the style of "Contents" heading to be as \chapter{Le choix du thème}. Also I would like to put all headings a little bit higher and to fix the hyperref for "Contents" in pdf ...