General ⇒ Color-Headlines
Color-Headlines
hi there,
I want to change the color of my headlines. Are there any packages or do I have to renew some commands?
Hope you could me.
Aurora
I want to change the color of my headlines. Are there any packages or do I have to renew some commands?
Hope you could me.
Aurora
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Color-Headlines
I mean things like \chapter, \section ... and the headline of the tabe of contents.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Color-Headlines
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- pumpkinegan
- Posts: 91
- Joined: Thu May 03, 2007 10:29 pm
Color-Headlines
Slightly modify the default \titleformat command with the color package:
Code: Select all
\usepackage{color}
\usepackage{titlesec}
\definecolor{webgreen}{rgb}{0,0.75,0}
\definecolor{webred}{rgb}{0.75,0,0}
\titleformat{\chapter}[display]
{\color{webred}\normalfont\huge\bfseries}{\chaptertitlename\
\thechapter}{20pt}{\Huge}
\titleformat{\section}
{\color{webgreen}\normalfont\Large\bfseries}{\thesection}{1em}{}
\begin{document}
\chapter{A chapter}
\section{A section}
\blindtext
Re: Color-Headlines
Thank you very very much.
It works like expected.
The only thing is that the headlines now needs more space than before.
Is there an option where I can set the vertical padding of the headlines?
It works like expected.
The only thing is that the headlines now needs more space than before.
Is there an option where I can set the vertical padding of the headlines?
Color-Headlines
Yes, there is. Read the documentation of the packages that localghost suggested.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Color-Headlines
Hi,
There is a related topic called "Color-headlines" but i changed the title because it was not describing the issue properly (to my taste).
The issue is: how to get the section, subsection, subsubsection and paragraph headings to be blue.
One of the solutions what was suggested was to use the titletoc package. My problem is that I use minitoc to get a toc at each chapter, and it's incompatible with titlesec/titletoc packages...
On the web, someone suggested to have a .sty file with a fancy latex command containing @ and #6 etc.
Is there a more straightforward solution ?
I use TexnicCenter on Windows.
Thanks,
Marie.
There is a related topic called "Color-headlines" but i changed the title because it was not describing the issue properly (to my taste).
The issue is: how to get the section, subsection, subsubsection and paragraph headings to be blue.
One of the solutions what was suggested was to use the titletoc package. My problem is that I use minitoc to get a toc at each chapter, and it's incompatible with titlesec/titletoc packages...
On the web, someone suggested to have a .sty file with a fancy latex command containing @ and #6 etc.
Is there a more straightforward solution ?
I use TexnicCenter on Windows.
Thanks,
Marie.
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
Color-Headlines
Hi Marie,
in my opinion it would be better to open a new topic instead of capturing an very old topic.
But now we are here.
If you use KOMA-Script the solution could be very simple, just one line:
But if not then my first idea would the fancy thing you mentioned. I think with @ and #6 you mean \@startsection. You don't need a sty file, you could redefine it in your preamble.
Stefan
in my opinion it would be better to open a new topic instead of capturing an very old topic.
But now we are here.

If you use KOMA-Script the solution could be very simple, just one line:
Code: Select all
\addtokomafont{sectioning}{\color{blue}}
Stefan
LaTeX.org admin