1

I am writing a manual for my team at work, and I have some trouble here I want a colored line at bottom of each page so I make a definition for the color then use it in the footer it looks nice but the problem is it remove the page number !!!

please help me in away to keep both the line and page numbers thank you in advance

\documentclass [14pt]  {extarticle}
\usepackage[margin=0.7in]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{array}
\usepackage{wrapfig}
\usepackage{float}
\usepackage {multirow}
\usepackage{hyperref}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{geometry}
\usepackage[font=small]{caption}
\usepackage{gensymb}
\usepackage{pgffor}
\usepackage{xparse}
\usepackage{fancybox}
\usepackage{afterpage}
\usepackage{titlesec}
\setlength{\parindent}{0cm}
\usepackage[titles]{tocloft}
\renewcommand{\cftdot}{}
\usepackage{fancyhdr}
\pagestyle{fancy}

%____________________________________________________________
\fancyhead{} % clear all header fields
\renewcommand{\headrulewidth}{0pt} % no line in header area
%\fancyfoot[C]{\thepage} 
\fancyfoot[C]{\color{cadetblue}\noindent\makebox[\linewidth]{\rule{\paperwidth}{30pt}}}  
%____________________________________________________________

\definecolor{cadetblue}{rgb}{0.37, 0.62, 0.63}

\begin{document}
\begin{titlepage}

%LOGO
\noindent
\begin{minipage}[b]{0.3\textwidth}    
\includegraphics[width=\linewidth]{1}
\end{minipage}
\hfill
\begin{minipage}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{2}
\end{minipage}

\begin{center}
\vfill
{\textbf{\myfont TITLE }}}\\  

\vfill
\end{center}

\begin{flushleft}
AAAAAA Co.\\
SSSSSSSSSS Department\\
\vspace{3mm} 
Created by :\\ 
FFFFFFFF\\
\vspace{3mm}  
Reviewed by :\\ 
AAAAAAA \\
\end{flushleft}

{\color{cadetblue}\noindent\makebox[\linewidth]{\rule{\paperwidth}{18pt}}}
\end{titlepage}
% ----------------------------------------------------------------

\cleardoublepage
\pagenumbering{gobble}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}

\setcounter{page}{1}
\pagenumbering{arabic}

\section{\uppercase {Introduction}}
  • 3
    Welcome to TeX.SE. Please reduce you non-complete example to the minimal version that has this issue and please don't let it die out in the middle of nowhere, i.e. there is no \end{document} etc. –  Apr 11 '17 at 11:55
  • If you want to have the line show up on EVERY page (such as the title page) you can use the everypage package (and tikz). See http://tex.stackexchange.com/questions/353891/how-can-i-draw-a-vertical-line-on-every-page-of-a-document/354058?s=9|0.0459#354058 for example. – John Kormylo Apr 11 '17 at 13:48

1 Answers1

1

Basically you need to put both the line and the page number in the same footer by overlapping two \makebox{\textwidth]s.

I minimized your MWE a bit. Also, I don't understand why the \rule showed up under the baseline, but it does without having to raise it.

\documentclass [14pt]  {extarticle}
\usepackage[margin=0.7in]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{xcolor}

\usepackage{lipsum}% NWE only

%____________________________________________________________
\fancyhead{} % clear all header fields
\renewcommand{\headrulewidth}{0pt} % no line in header area
%\fancyfoot[C]{\thepage} 
\fancyfoot[C]{\rlap{\makebox[\textwidth]{\thepage}}%
\makebox[\textwidth]{\color{cadetblue}\rule{\paperwidth}{\dimexpr 0.7in-\footskip}}}
%____________________________________________________________

\definecolor{cadetblue}{rgb}{0.37, 0.62, 0.63}

\begin{document}

\lipsum[1-8]

\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120