4

I am using the following fancy styles for chapter headings

\documentclass[12pt]{report}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage[hidelinks]{hyperref}
\usepackage[%
            left=1.46in,%
            right=0.98in,%
            top=0.98in,%
            bottom=0.98in%
            ]{geometry}%
\usepackage{setspace}
\usepackage{titlesec}
\usepackage{fourier}
\usepackage{titletoc}

\makeatletter
\newcommand{\thechapterwords}
{\thechapter}
\def\thickhrulefill{\leavevmode \leaders \hrule height 0.6ex \hfill \kern \z@}
\def\@makechapterhead#1{%
  %\vspace*{50\p@}%
  \vspace*{10\p@}%
  {\parindent \z@ \centering \reset@font
        \thickhrulefill\quad
        \scshape \@chapapp{} \thechapterwords 
        \quad \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \LARGE \bfseries \decofourleft \hspace{0.1cm} #1 \hspace{0.1cm} \decofourright \par\nobreak 
        \par
        \vspace*{10\p@}%
        \hrule
    %\vskip 40\p@
    \vskip 40\p@
  }}
\def\@makeschapterhead#1{%
  %\vspace*{50\p@}%
  \vspace*{10\p@}%
  {\parindent \z@ \centering \reset@font
        \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Large #1\par\nobreak
        \par
        \vspace*{10\p@}%
        \hrule
    %\vskip 40\p@
    \vskip 40\p@
  }}

These work fine on \chapter{...}. How can I apply this styling for table of contents heading and bibliography and references headings as well? This is the code I have.

\tableofcontents
\addtocontents{toc}{~\hfill\textbf{Page}\par}

... chapters

\renewcommand\bibname{Bibliography and References}
\bibliographystyle{plain}
\bibliography{references}

Thanks a lot for any help. I'm still new to Latex and I've been looking all over.

Below are screenshots of what the titles look like. Of course I dont want table of contents/ bibliography to have chapter {chapter no.}

This is what chapter headings look like This is what the table of contents look like

2
  • In future, please post complete code rather than a mere fragment. That is a small, compilable document showing the issue. Note, for example, that it matters which class and packages you are using to get \decofourright etc.
    – cfr
    Commented May 16, 2014 at 2:40
  • @cfr thanks for your suggestion. I am going to edit the question and include the packages and document class for other users seeing this post.
    – Bernice
    Commented May 16, 2014 at 14:02

1 Answer 1

4

You have to add the line

\LARGE \bfseries \decofourleft \hspace{0.1cm} #1 \hspace{0.1cm}\decofourright\par\nobreak

in place of \Large #1\par\nobreak in the definitin of \@makeschapterhead. Also not that there is no space in between \hspace{0.1cm}\decofourright

\documentclass[10pt,a4paper]{report}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm,showframe]{geometry}  %% remove showframe
\usepackage{fourier-orns}

\makeatletter
\newcommand{\thechapterwords}
{\thechapter}
\def\thickhrulefill{\leavevmode \leaders \hrule height 0.6ex \hfill \kern \z@}
\def\@makechapterhead#1{%
  %\vspace*{50\p@}%
  \vspace*{10\p@}%
  {\parindent \z@ \centering \reset@font
        \thickhrulefill\quad
        \scshape \@chapapp{} \thechapterwords
        \quad \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \LARGE \bfseries \decofourleft \hspace{0.1cm} #1 \hspace{0.1cm}\decofourright\par\nobreak
        \par
        \vspace*{10\p@}%
        \hrule
    %\vskip 40\p@
    \vskip 40\p@
  }}
\def\@makeschapterhead#1{%
  %\vspace*{50\p@}%
  \vspace*{10\p@}%
  {\parindent \z@ \centering \reset@font
        \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \LARGE \bfseries \decofourleft \hspace{0.1cm} #1 \hspace{0.1cm}\decofourright \par\nobreak
        \par
        \vspace*{10\p@}%
        \hrule
    %\vskip 40\p@
    \vskip 40\p@
  }}

\makeatother


\begin{document}
\tableofcontents
\addtocontents{toc}{~\hfill\textbf{Page}\par}
\chapter{Introduction}
\nocite{*}
\chapter*{Introduction}
\renewcommand\bibname{Bibliography and References}
\bibliographystyle{plain}
\bibliography{xampl}
\end{document}

enter image description here

enter image description here

1
  • Thanks for your answer @Harish Kumar, it worked perfectly :) I didn't notice that there are two definitions of the same style for different types of headings.
    – Bernice
    Commented May 16, 2014 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .