1

I am making an article document and want to give two sided border in some pages ( top and bottom of the pages). \hrule doesn't work in the \chapter pages. Please help.

2
  • Welcome to Tex.Se! Which border are you looking for? Please provide the Minimal Working Example (MWE)?
    – M S
    Commented Aug 23, 2017 at 8:35
  • As the article class does not provide the \chapter macro there are no \chapter pages. Perhaps you should look at the reported errors for your document before coming here. Commented Aug 23, 2017 at 18:14

1 Answer 1

0

You can adapt this solution to suit your needs:

\documentclass{book}

\usepackage{lipsum}

\usepackage{fancyhdr}

\fancyhf{}
\cfoot{\thepage}
\renewcommand{\headrulewidth}{2.0mm}
\renewcommand{\footrulewidth}{2.0mm}

\begin{document}

% Bordered pages start here
\chapter{This Chapter with Top and Bottom Borders}
\thispagestyle{fancy}
\pagestyle{fancy}

\section{Bordered Pages}

\lipsum[1-10]

\clearpage

% Un-bordered pages start here

\pagestyle{plain}
\section{Un-Bordered Pages}

\lipsum[11-20]

\clearpage

% Bordered pages start here
\pagestyle{fancy}
\section{Bordered Pages Again}
\lipsum[21-30]

\end{document}

enter image description here enter image description here enter image description here enter image description here

2
  • But my page numbers are gone now. Commented Aug 23, 2017 at 9:10
  • @VivekSharma That is because you did not tell us where you whether and where you want the page numbers. See the updated solution. And I will stress on the point, adapt. Please see the documentation of fancyhdr for the tweaking options.
    – Masroor
    Commented Aug 23, 2017 at 9:49

You must log in to answer this question.

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