Text Formatting ⇒ centering a chapter title
-
- Posts: 92
- Joined: Fri Apr 24, 2009 8:02 pm
Re: centering a chapter title
Now when I try the code, I get the error that I am missing \begin{document}???
-Michael D
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: centering a chapter title
What is the current code you are using that's raising the error?
Stefan
Stefan
LaTeX.org admin
-
- Posts: 92
- Joined: Fri Apr 24, 2009 8:02 pm
centering a chapter title
Now, I can get this code #1 below to work:
However, when I try to add back my packages as in Code #2, below; I get the error: File ended while scanning use of \@argdef???
Here is that code:
Any help would be appreaciated.
-MD
Code: Select all
\documentclass[12pt,letterpaper,twoside,openany]{book}
\usepackage[pagestyles]{titlesec}
\usepackage[left=0.50in,right=0.45in,top=0.50in,bottom=0.50in]{geometry}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{}{20pt}{\Huge}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
\newpagestyle{mystyle}{\sethead{}{}{}\setfoot{}{\thepage}{}}
\pagestyle{mystyle}
\begin{document}
%\maketitle
\tableofcontents
\chapter{WEEKDAY EVENING PRAYERS.}
In the Name of the Father, and of the Son, and of the Holy Spirit. Amen.
more text...
etc
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{\centering\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
\titleformat{\section}[display]
{\normalfont\Large\bfseries\centering}{}{20pt}{\Large}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
\appendix
\chapter{ON THE SIGN OF THE PRECIOUS AND LIFE-GIVING CROSS.}
\section{text}
\subsection*{text}
more text...
etc
\end{document}
However, when I try to add back my packages as in Code #2, below; I get the error: File ended while scanning use of \@argdef???
Here is that code:
Code: Select all
\documentclass[12pt,letterpaper,twoside,openany]{book}
\usepackage[pagestyles]{titlesec}
\usepackage[left=0.50in,right=0.45in,top=0.50in,bottom=0.50in]{geometry}
\usepackage{liturg}
\usepackage{framed}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{}{20pt}{\Huge}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
\newpagestyle{mystyle}{\sethead{}{}{}\setfoot{}{\thepage}{}}
\pagestyle{mystyle}
\begin{document}
%\maketitle
\tableofcontents
\chapter{WEEKDAY EVENING PRAYERS.}
In the Name of the Father, and of the Son, and of the Holy Spirit. Amen.
more text...
etc
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{\centering\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
\titleformat{\section}[display]
{\normalfont\Large\bfseries\centering}{}{20pt}{\Large}
\titlespacing*{\chapter}
{0pt}{50pt}{40pt}
\appendix
\chapter{ON THE SIGN OF THE PRECIOUS AND LIFE-GIVING CROSS.}
\section{text}
\subsection*{text}
more text...
etc
\end{document}
-MD
-Michael D
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: centering a chapter title
The second code works for me without problems. Could you post your .log file for that code as attachment here?
Stefan
Stefan
LaTeX.org admin
-
- Posts: 92
- Joined: Fri Apr 24, 2009 8:02 pm