Text FormattingHelp with coloring headings/paragraphs

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
homer
Posts: 13
Joined: Fri Feb 23, 2007 3:47 pm

Help with coloring headings/paragraphs

Post by homer »

Hi! Hope I am in the right fora.

I'm using this code found at: http://www.maths.adelaide.edu.au/anthon ... loats.html

Code: Select all

\let\LaTeX@startsection\@startsection 
\renewcommand{\@startsection}[6]{\LaTeX@startsection%
{#1}{#2}{#3}{#4}{#5}{\color{name_of_the_color}\raggedright #6}} 
It works really good for setting colors to my headings. The thing is I don't want the color to be set at paragraphs. Can somebody please help me sort things out and explain how I can modify this little code to suite my commands?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Help with coloring headings/paragraphs

Post by localghost »

Forget that code and use the titlesec package for standard classes. Other classes like KOMA Script and memoir have built-in features.


Thorsten
homer
Posts: 13
Joined: Fri Feb 23, 2007 3:47 pm

Help with coloring headings/paragraphs

Post by homer »

Thanks for your answer. I'm trying to learn these new features. Is there a way to use a sty-file to configure header and footers?

I want this in my sty file:

Code: Select all

%% Format Header
\newpagestyle{myps}[\small\sffamily\slshape]{
  \headrule
  \sethead{test}{\sectiontitle}{\usepage}} 


And want to use it in my tex file like this:

Code: Select all

\pagestyle{settings/myps}
Is it possible? I bet it is. But i can't figure it out.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Help with coloring headings/paragraphs

Post by localghost »

This is very confusing. At first let's clarify if we are talking about headers or headings. Describe exactly what you want to do and present recent efforts in form of a minimal working example (MWE).
homer
Posts: 13
Joined: Fri Feb 23, 2007 3:47 pm

Re: Help with coloring headings/paragraphs

Post by homer »

Yes I couldn't agree more. When I read it today it IS very confusing ;) . I will close this issue cause the main problem is solved. And I'll start a new thread with my new issue and with a MWE.

/H
Post Reply