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.

  • Welcome to Tex.Se! Which border are you looking for? Please provide the Minimal Working Example (MWE)? – Mishra S Aug 23 '17 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. – Peter Wilson Aug 23 '17 at 18:14
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

  • But my page numbers are gone now. – Vivek Sharma Aug 23 '17 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 Aug 23 '17 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.