Text FormattingDouble Section Title Effect -- not wanted

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Double Section Title Effect -- not wanted

Post by thedoctor818 »

Hullo all. I was reworking an old document to get what I wanted re: headers, and am liking what I am using now with fancyhr; however, I am now getting what I can only describe as a 'shadowed' section title in each section, i.t. every time I have a section header, below it and to the left it is repeated with a smaller font...

Here is the initial code from the preamble, and the beginning of where I start to have problems (which is honestly from the beginning of the doc, but I have left out the toc command). Any help is appreciated.

Code: Select all

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage[left=2.05cm,right=2.10cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage{amsmath,amssymb,color,fancyhdr,framed,titlesec}
\setlength{\headheight}{15pt}

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\rightmark{#1}{}}

\fancyhf{}
\fancyhead[LE,RO]{\slshape \rightmark}
\fancyhead[LO,RE]{\slshape \leftmark}
\fancyfoot[C]{\thepage}

\title{AN ORTHODOX RULE OF PRAYER.}
\author{Father Thomas Moore, Michael Dykes}
\date{\today}
\begin{document}
\maketitle

\part{SUNDAY PRAYERS.}
\chapter{SATURDAY EVENING PRAYERS.}
\crub{Towards evening, we stand before the holy icons (having lit a candle and maybe some incense), with reverence and fear of God; we gather our thoughts, make the Sign of the Cross, and say:}

In the Name of the Father, and of the Son, and of the Holy Spirit. Amen.

\begin{framed}
\crub{From St. Thomas Sunday until Ascension, instead of \textbf{O God, cleanse me, a sinner \ldots we say:}}
\textrm{Christ is risen from the dead, trampling down death by death, and upon those in the tombs bestowing life. \crub{(thrice)}}

\crub{During any Vigil-rank Festal Period [(see Appendix A) - including your and your Temple's Patronal Feast Day], we begin our prayers by praying the Festal Troparia (again, see Appendix A).}

\crub{Then, in either case, we immediately pray the Trisagion Prayers as below:}
\end{framed}

\crub{Afterwards, we collect our thoughts, and make seven prostrations (or metanoias), saying:}

\section{THE SEVEN--BOW BEGINNING.}
O God, be merciful to me, a sinner. 

\end{document}
After the section headed "The Seven--Bow Beginning" all consecutive sections display the same result. Pleas forgive me if I have displayed too little or too much code as it has been a while since I have done this. Thanks again.
-Michael D

Recommended reading 2024:

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

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

thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Double Section Title Effect -- not wanted

Post by thedoctor818 »

I forgot the following bit of code. It is right below the fancy hdr matrerial. Here it is, and I think this is where the problem is at:

Code: Select all

%Formatting to Center the Chapter, Section, and Subsection Titles % 
\titleformat{\chapter}[display]
 {\normalfont\huge\bfseries\centering}{}{20pt}{\Huge}
\titlespacing*{\chapter}
 {0pt}{50pt}{40pt}

\titleformat{\section}
 {\normalfont\Large\bfseries\centering}{}{1em}{}
\titlespacing*{\section}
 {0pt}{3.5ex plus 1.0ex minus 0.2ex}{2.3ex plus 0.2ex}
 
\titleformat{\subsection}
 {\normalfont\large\bfseries\centering}{}{1em}{}
\titlespacing*{\subsection}
 {0pt}{3.25ex plus 1.0ex minus 0.2ex}{1.5ex plus 0.2ex}
%End of the Preamble % % % % % % % % % % % % % % % % % % % % % % % 
Thanks, and my apologies for leaving that out.
-Michael D
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Double Section Title Effect -- not wanted

Post by localghost »

No solution, just a hint. You don't need fancyhdr when loading titlesec, because the latter one also manages page styles. Refer to the package manual for details.

And centering each heading level individually is not necessary because the titlesec package offers a corresponding option. See Section 2.1 of the package manual.

Please check your examples for functionality before posting. Your code is not compilable because the command \crub is not defined.


Thorsten
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Double Section Title Effect -- not wanted

Post by thedoctor818 »

My apologies Thornsten for leaving out the code for \crub, here it is:

Code: Select all

\newcommand{\crub}[1]{%
\begin{center}
\textcolor{red}{\textbf{\small #1}}%
\end{center}
}
Still I am a bit confused though. If I try to delete \fancyhdr, and the following code, then I get the messagfe:

Code: Select all

Color undefined RED
So I am not sure what to do...
-Michael D
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Double Section Title Effect -- not wanted

Post by localghost »

Define the color "RED".
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Re: Double Section Title Effect -- not wanted

Post by thedoctor818 »

I must apologize again for my ignorance, but how exactly do I define the color red? Thanks again.
-Michael D
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Double Section Title Effect -- not wanted

Post by thedoctor818 »

I must apologize again for my ignorance, but how exactly do I define the color red? Thanks again.

All I know is that when I delete fancyhdr from the preamble, as well as the following:

Code: Select all

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\rightmark{#1}{}}

\fancyhf{}
\fancyhead[LE,RO]{\slshape \rightmark}
\fancyhead[LO,RE]{\slshape \leftmark}
\fancyfoot[C]{\thepage}
then I get the error message: "Undefined color 'RED' " at line 246. At this line, however, all I call is a subsection header, and having done so earlier in the document (and having no problems before) I am really at a loss for what to do. Thanks for your patience with me.
-Michael D
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Double Section Title Effect -- not wanted

Post by Stefan Kottwitz »

Hi Michael,
thedoctor818 wrote:how exactly do I define the color red?
you could load the color package, or the more complex xcolor package. To be able to use a lot of predefined color names, you could use a package option. For example:

Code: Select all

\usepackage[svgnames]{xcolor}
Stefan
LaTeX.org admin
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Double Section Title Effect -- not wanted

Post by thedoctor818 »

Hullo Stefan,

I do have the package

Code: Select all

\usepackage{color}
loaded, and that's why I am so confused here. I tried the specific package option, but then I got the error:

"xcolor error undefined color RED"

and still I am confused. Thanks for all your help here.
-Michael D
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Double Section Title Effect -- not wanted

Post by Stefan Kottwitz »

I see! Since you use red, but you get an error for RED, there can be an undesired uppercasing. For example, fancyhdr uses uppercase headers headers by default. I suggest switching to normal letter in the headers, in my opinion writing all uppercase is ugly. Remove a \MakeUppercase or use \nouppercase in the fancyhdr heading commands.

Stefan
LaTeX.org admin
Post Reply