5 votes

Make a specific style for chapters using titlesec

Here is my solution. In the .cls file, I keep the xcolor package. It isn't needed as tikz provide access to colors, but so, we can use global option like divpsnames in the document class for accessing ...
quark67's user avatar
  • 4,136
5 votes

Print the range of chapters for the current part on the part's title page

Here is a possible approach, you will need two compilations to get the correct results. \documentclass{book} \usepackage{titlesec} \titleformat{\part}[display] {\centering\huge} {\partname~\thepart} {...
Udi Fogiel's user avatar
  • 3,534
5 votes

Problem with Figure counter in the 0th chapter in book class

Originally book.cls defines \thefigure as: \renewcommand \thefigure {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure} which means, that the chapter counter is only shown, if the chapter ...
cabohah's user avatar
  • 9,173
4 votes
Accepted

Chapter insists on beginning on the left side

With some simplifications of your code. % !TeX TS-program = lualatex \documentclass[11pt, twoside]{scrbook} %\usepackage{titlesec} % to be loaded by classicthesis \usepackage{titling} \usepackage[...
Simon Dispa's user avatar
  • 38.6k
4 votes
Accepted

Customize chapter title in context

Updated with simpler solution We use MetaFun since we want the number to grow with the content. This time without layers, and the good thing is that we then do not have to compensate for the vertical ...
mickep's user avatar
  • 8,445
4 votes
Accepted

How to make page numbering appear on all pages

You should set up the fancy style in the preamble. \RequirePackage{fix-cm}% for scalable CM fonts \documentclass[english, 12pt]{report} \usepackage{color} \usepackage{lettrine} \usepackage[normalem]{...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Print the range of chapters for the current part on the part's title page

The following code inserts appropriate \labels with every \part and at the end of the document, then retrieves them to build the chapter range. It assumes numberic (\arabic) chapter numbering, and ...
Werner's user avatar
  • 598k
4 votes
Accepted

Changing the first argument of l@chapter

The chapter number is printed in the \@chapter command, not in the \l@chapter command. So you need to patch both commands to do what you want without using one of the TOC packages: \documentclass{...
Alan Munn's user avatar
  • 215k
4 votes

How to customize chapter?

I really advise against scaling fonts with \scalebox. My suggestion would be: use a modern font encoding use a full scalable font, there are several options for Computer Modern select the font size ...
Rmano's user avatar
  • 39.4k
3 votes
Accepted

How to Create a Fancy Style of Chapter

This might get you started, at least in a minimal example this works. \documentclass{report} \usepackage[explicit]{titlesec} \usepackage{titletoc} \usepackage{tikz} \colorlet{chaptercolorA}{violet} \...
Skillmon's user avatar
  • 57.7k
3 votes
Accepted

Chapter Style Where All Chapter Numbers Appear Above Chapter Title

Interesting idea. You could do something like this: \documentclass[oneside,11pt,a4paper]{memoir} \usepackage[margin=2.5cm]{geometry} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{...
Jasper Habicht's user avatar
3 votes
Accepted

Make a specific style for chapters using titlesec

Partial response the different spacing on the right and left sides, Overfull \hbox (1.22324pt too wide) I added \titlecontents{section} [0em] {} {} {} {\titlerule*[1pc]{.}\contentspage} I also ...
pascal974's user avatar
  • 3,282
3 votes
Accepted

Koma script: using the fontstyle of chapter and section for a paragraph

The font settings of the chapter (section) title are stored in the font elements dispostion and chapter (section). They can be enabled using \usekomafont{disposition}\usekomafont{chapter} or \...
esdd's user avatar
  • 85k
3 votes
Accepted

Missing chapter numbering in pandoc

You should pass the --number-sections option to pandoc like this: pandoc --metadata-file=temp.yaml --number-sections temp.md -o temp.pdf To experiment replace the target temp.pdf by temp.tex and use -...
user691586's user avatar
  • 1,958
3 votes
Accepted

book and algorithm2e chapter name containing square brackets

It should be \algocf@original@chapter[{#1}][{#2}]{#3} and \algocf@original@chapter[{#1}]{#2} instead of the current \algocf@original@chapter[#1][#2]{#3} and \algocf@original@chapter[#1]{#2}, ...
muzimuzhi Z's user avatar
  • 25.8k
3 votes

Hansen-Style Chapter Heading

You didn't specify, what TeX format you are using. I show you what to do in OpTeX. The printing of the chapter number to the correct place is based to TeX primitive \lower and common macro \rlap, so ...
wipet's user avatar
  • 72.1k
3 votes

Indent chapter title with titlesec

The following is much simpler than egreg's solution. You just have to delete [block]! \documentclass[a4paper]{book} \usepackage{fontspec} \usepackage{titlesec} \newfontfamily{\futura}{Futura} \...
hair-splitter's user avatar
3 votes
Accepted

Curly braces for chapter arguments

It is not clear how you would expect the argument of \chapter to be delimited if not by a }. It would be possible to make the argument end at a blank line (\par) but no standard latex command does ...
David Carlisle's user avatar
3 votes

How to customize chapter?

Try this: \documentclass{book} \usepackage{titlesec} \usepackage{graphicx} % Include this package % Customizing the chapter title format \titleformat{\chapter}[display] {\normalfont\huge\bfseries\...
John Smith's user avatar
2 votes
Accepted

Make \leftmark know stared chapters

\documentclass[11pt,oneside]{report} \usepackage[utf8]{inputenc} \usepackage{fancyhdr} \usepackage{lastpage} \pagestyle{fancy} \fancyhead[R]{\leftmark} \begin{document} \chapter{First} Lorem ...
Ulrike Fischer's user avatar
2 votes
Accepted

How to Selectively Turn Chapter Page Numbers Off in the Table of Contents

You can add a line to the ToC with an empty page number using \contentsline. \documentclass{book} \begin{document} \tableofcontents \newpage \chapter*{CHAPTER 1} ...
Simon Dispa's user avatar
  • 38.6k
2 votes

Move chapter label position upward

titlesec also offers the function \titlespacing \documentclass[a4paper,12pt]{report} \usepackage[margin=2.5cm]{geometry} \usepackage{titlesec} \titleformat{\chapter}% [display]% display, hang, ...
Mane32's user avatar
  • 103
2 votes

Move chapter label position upward

Just use \titleformat{\chapter}[display] {\normalfont\huge\bfseries\vskip -30pt}{\chaptertitlename \thechapter}{20pt}{\Huge} You also need to add \usepackage{titlesc} If you want to move it even more ...
palloc's user avatar
  • 157
2 votes
Accepted

After adding 'Chap' word in toc in report, change color of the entire chap lin in toc?

Update to answer your revised question This no longer adjusts \hypersetup. Instead I redefine \numberline to change the colour of numbered entries in the table of contents when the following ...
David Purton's user avatar
  • 25.6k
2 votes
Accepted

Toc doesn't linebreak within include

\include has nothing to do with the problem. Use \titlecontents, not titlecontents*. The latter is specifically to avoid line breaks between entries. \documentclass[a4paper,12pt]{book} \usepackage{...
egreg's user avatar
  • 1.1m
2 votes
Accepted

Style Chapter Title format

This can be done with the package titlesec. \documentclass{book} \usepackage{titlesec} \titleformat{\chapter}{\bfseries\Large}{Chapitre\quad\thechapter}{0mm}{\newline\hrule\vspace*{.5\baselineskip}\...
Vincent's user avatar
  • 19.9k
2 votes
Accepted

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

You can use the titletoc package to format table of contents entries and remove the numbering using the \titlecontents macro. The \titlecontents macro is described on pages 15 and 16 of the titletoc ...
David Purton's user avatar
  • 25.6k
2 votes

Undefined Control sequence while using \chapter command

After a bit of research i found out that chapter command is only available in Book (or report) documentclass. i was trying it in article class.
Syed Ahmed's user avatar
2 votes
Accepted

Customize number chapter size in ConTeXt

It is not perfectly clear to me how you want it to look, but you can try this (see some comments in the code): \definehspace[oneem][-.125 em] \starttexdefinition MyNumberChapterCommand #1 \tfe #1 ...
mickep's user avatar
  • 8,445
2 votes
Accepted

Changing the style of unnumbered chapter to chapter

You need to create a \@makeschapterhead (version of \@makechapterhead for the star-chapter command, note the "s" between "make" and "chapter"). I have adjusted the width ...
quark67's user avatar
  • 4,136

Only top scored, non community-wiki answers of a minimum length are eligible