Text FormattingDouble Section Title Effect -- not wanted

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Double Section Title Effect -- not wanted

Post by localghost »

To cut this story short, I submit a cleaned up sample code that should correspond to your document settings.

Code: Select all

\documentclass[12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage[center,pagestyles,uppercase]{titlesec}  % needs recent version of »titlesec«
\usepackage{xcolor}
\usepackage{framed}

\geometry{
  left=2.05cm,
  right=2.10cm,
  top=2.45cm,
  bottom=2.5cm,
  headheight=15pt,
  includeheadfoot
}

\newpagestyle{main}{
  \headrule
  \sethead[\slshape\chaptertitle][][]{}{}{\slshape\chaptertitle}
  \setfoot[][\thepage][]{}{\thepage}{}
}
\pagestyle{main}

\newenvironment{crub}{   % new environment instead of command
  \begin{trivlist}
    \centering
    \color{red}
    \item\relax
}{\end{trivlist}}

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

\begin{document}
  \maketitle

  \part{Sunday Prayers}
    \chapter{Saturday Evening Prayers.}
      \begin{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:
      \end{crub}
      In the Name of the Father, and of the Son, and of the Holy Spirit. Amen.

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

        \begin{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).
        \end{crub}
        \begin{crub}
          Then, in either case, we immediately pray the Trisagion Prayers as below:
        \end{crub}
      \end{framed}

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

      \section{The Seven--Bow Beginning.}
        O God, be merciful to me, a sinner.
\end{document}

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 »

Thanks so much, I really like what this does to simplify the coding. But, I have several other 'special' coding 'short-cuts' and am not completely certain as to how to convert them into environments. I shall list them, and then list my attempts to convert them into environments, but when I tried to convert the \rub, I ended up with a blank doc. Thanks again.

Code: Select all

\newcommand\stich[1]{%
\textcolor{red}{S.  }#1%
}

\newcommand\response[1]{%
\textcolor{red}{R.  }#1%
}

\newcommand{\psalmheading}[1]{%
\begin{center}
\noindent\textcolor{red}{\textbf{\large #1}}%
\end{center}
}

\newcommand{\prayerheading}[1]{%
\begin{center}
\noindent\textcolor{black}{\textbf{\large #1}}%
\end{center}
}


\newcommand{\hourheading}[1]{%
\begin{center}
\noindent\textcolor{black}{\textbf{\large #1}}%
\end{center}
}


\newcommand{\lessonheading}[1]{%
\begin{center}
\noindent\normalsize\textcolor{red}{#1}
\end{center}
}

\newcommand{\rub}[1]{%
\textcolor{red}{\textbf{\small #1}}%
}

\newcommand{\brub}[1]{%
\textcolor{black}{\textbf{\small #1}}%
}

\newcommand{\crub}[1]{%
\begin{center}
\textcolor{red}{\textbf{\small #1}}%
\end{center}
}


\newcommand{\cbrub}[1]{%
\begin{center}
\textcolor{red}{\textbf{\small #1}}%
}
-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 »

The commands that shall format a heading can be left untouched since their arguments presumably will be quite short and without line breaks.

All other commands which might form paragraphs (though with centered lines), thus need line breaks can be redefined analog to the way I did. The final decision is up to you.
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Re: Double Section Title Effect -- not wanted

Post by thedoctor818 »

Just one more 'quick' question. How do I add a bold type formatting to the environment you provided for \crub? Thanks so much!!!
-Michael D
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Double Section Title Effect -- not wanted

Post by thedoctor818 »

I have tried something like this, but I am honestly not sure what to do here or where else to go for help on this:

Code: Select all

\newenvironment{crub}{   % new environment instead of command
  \begin{trivlist}
    \centering
    \bfseries
    \color{red}
    \item\relax
}{\end{trivlist}}
Thanks again.
-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 »

Your code looks OK. Did you test it? What do you have to loose? Your machine won't explode.
Post Reply