1

I'm looking to change the way the footer line looks for fancyhdr to something like this :

\usepackage{xcolor}

\newcommand\shadowfill{%
\leavevmode\leaders\hbox{\ooalign{%
              \vrule height 4pt depth 0pt width 1pt\cr%
\textcolor{gray}{\vrule height 1pt depth 1pt width 1pt}}%
}\hskip\fill\kern0pt%
}

I've tried

\renewcommand{\footrule}{\shadowfill}

but I end up with no line at all.

Not sure if I'm going about this the right way.

Edit:

Currently it looks like this

enter image description here

but I would like the solid line to be replaced with this line

enter image description here

  • The \footrule should add vertical material, not start a paragraph. Can you add an approximate representation of how your footrule should appear? – egreg Oct 03 '18 at 16:02

1 Answers1

1

HEADER

\documentclass{article}
\usepackage{lipsum}% just to generate filler text for the example
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[L]{Left}
\fancyhead[R]{Right}
\fancyhead[C]{Center}


\renewcommand\headrule{\vskip-0.7\baselineskip\makebox[\textwidth]{\shadowfill}}
\newcommand\shadowfill{%
  \leavevmode\leaders\hbox{\ooalign{%
                  \vrule height 1pt depth 0pt width 1pt\cr%
  \textcolor{red}{\vrule height 0pt depth 1pt width 1pt}}%
  }\hskip\fill\kern0pt%
}
\usepackage{xcolor}
\begin{document}

\section{Test Section}
\subsection{Test Subsection}
\lipsum[1-20]

\end{document}

enter image description here

FOOTER

\documentclass{article}
\usepackage{lipsum}% just to generate filler text for the example
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot[L]{Left}
\fancyfoot[R]{Right}
\fancyfoot[C]{Center}


\renewcommand\footrule{\makebox[\textwidth]{\shadowfill}\\[-.2\baselineskip]}
\newcommand\shadowfill{%
  \leavevmode\leaders\hbox{\ooalign{%
                  \vrule height 1pt depth 0pt width 1pt\cr%
  \textcolor{red}{\vrule height 0pt depth 1pt width 1pt}}%
  }\hskip\fill\kern0pt%
}
\usepackage{xcolor}
\begin{document}

\section{Test Section}
\subsection{Test Subsection}
\lipsum[1-20]

\end{document}

enter image description here