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

Code, edit and compile here:
\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:
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Code, edit and compile here:
\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}}%
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-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

Code, edit and compile here:
\newenvironment{crub}{ % new environment instead of command
\begin{trivlist}
\centering
\bfseries
\color{red}
\item\relax
}{\end{trivlist}}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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