Changing font color in chapter titles and glossary heading

1,261 views
Skip to first unread message

Tim Kozusko

unread,
Oct 7, 2012, 7:12:32 PM10/7/12
to tufte...@googlegroups.com
Hello, I am using Tufte LaTeX for a couple projects, and love the format. However, I would like to change the color of the text for chapter titles and the glossary heading to spice the pages up a bit. I thought I was getting to understand LaTeX but using \titleformat*{\chapter}{\color{nicered}} in the preamble throws all manner of errors if the Table of Contents is active. Obviously I'm doing it wrong. What is the best way to accomplish this?
Thanks for your time,
Tim

Dan T. Abell

unread,
Oct 7, 2012, 11:19:19 PM10/7/12
to tufte...@googlegroups.com
Hello, Tim:

I could go on at length about Tufte's choice of color (or lack
thereof) and about why you might wish to avoid "spicing up the
titles" and instead use color to focus the reader's attention
on more significant content. But I won't ... :-|

I can reproduce your problem, but I'm not sure what's going
on here. The documentation for the titlesec/titletoc packages
suggests that your \titleformat* command should work.

Kevin will likely comment here, but you might consider using
the full (i.e., unstarred) \titleformat command. For example,
something along the lines of ...

\newcommand{\chapterlabel}{\textcolor{gray}{\thechapter}}%
\titleformat{\chapter}[display]
{\begin{fullwidth}\raggedright}% format applied to label+text
{\Huge\chapterlabel}% label
{-2\baselineskip}% separation between label and title body
{\vspace{2\baselineskip}\vspace{1ex}\huge\color{nicered}}% before the title body
[\end{fullwidth}\vspace{1ex}]% after the title body

Cheers,
-Dan
> --
> You received this message because you are subscribed to the Google Groups "tufte-latex" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/tufte-latex/-/jZXjMjazrOoJ.
> To post to this group, send email to tufte...@googlegroups.com.
> To unsubscribe from this group, send email to tufte-latex...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tufte-latex?hl=en.

--
Dan T. Abell :: dabell at txcorp dot com :: 303.444.2452
Tech-X Corp., 5621 Arapahoe Ave, Ste A, Boulder CO 80303
http://www.txcorp.com :: 303.748.6894/c 303.448.7756/fx


Tim Kozusko

unread,
Oct 8, 2012, 9:08:55 AM10/8/12
to tufte...@googlegroups.com
Hi Dan,
Thanks very much for your reply - it works like a charm; I appreciate your help.  I'm glad to see it wasn't something completely obvious I was doing wrong. I've reached a point where I probably need to come to grips with the nuts and bolts of how this program works - or just stick to defaults. I do find I'm learning from reading through the questions and  wanders here, but code doesn't come naturally to me - I'm a much better ecologist than I am a programmer.

Your point about the color is well taken. Black chapter headings are good enough for Tufte, they probably should be good enough for me. The "nice red" (really more of a almost pastel-brick color) was to make the title stand out against the aerial photo on the cover, and I got attached to it.

Tim Kozusko

unread,
Oct 8, 2012, 9:09:55 AM10/8/12
to tufte...@googlegroups.com
wanders = answers (I type like an ecologist too)

David Garbutt

unread,
Oct 8, 2012, 9:25:58 AM10/8/12
to tufte...@googlegroups.com, tufte...@googlegroups.com
Hmm  indeed - seems like an holistic answer!

Sent from my iPhone 4
--
You received this message because you are subscribed to the Google Groups "tufte-latex" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tufte-latex/-/_E6t5EaWwo4J.

Dan T. Abell

unread,
Oct 8, 2012, 10:29:50 AM10/8/12
to tufte...@googlegroups.com

On 8 Oct 2012, at 07:08, Tim Kozusko wrote:

> Your point about the color is well taken. Black chapter headings are good enough for Tufte, they probably should be good enough for me. The "nice red" (really more of a almost pastel-brick color) was to make the title stand out against the aerial photo on the cover, and I got attached to it.

Red on the cover ... to make the title stand out from a
photo ... and not a neon, in-your-face red ... I say go
for it!

-Dan
Reply all
Reply to author
Forward
0 new messages