I'm looking to insert a \hrulefill line with a shadow. Something that looks like this:

Help would be much appreciated.

Done in red to accentuate the effect. Obviously, the rule thicknesses, depths, etc. are set in the definition and can be altered.

\documentclass{article}
\vrule height 1pt depth 0pt width 1pt\cr%
\textcolor{red}{\vrule height 0pt depth 1pt width 1pt}}%
}\hskip\fill\kern0pt%
}
\usepackage{xcolor}
\begin{document}

\end{document}


ZOOM:

• How can I just do a horizontal line without having to add anything in front of it? Something like \hrulefill. If I just use \shadowfill, I end up with a "Leaders not followed by proper glue" error. – Chung Ren Khoo Oct 3 '18 at 15:22
• @ChungRenKhoo Sorry about that. I needed to add a \leavevmode at the beginning of the macro. See edit. – Steven B. Segletes Oct 3 '18 at 15:26
• I tried using it as a custom footer via \renewcommand{\footrule}{\shadowfill} but it doesn't show anything at all. Is there a fix around this? (This is for the fancyhdr package) – Chung Ren Khoo Oct 3 '18 at 15:49
• @ChungRenKhoo Perhaps \renewcommand{\footrule}{\makebox[\textwidth]{\shadowfill}}. I don't have a particular example to work with, but my guess is that the footer doesn't have a prescribed width to work with so you have to tell \shadowfill how long a width it should fill. – Steven B. Segletes Oct 3 '18 at 16:34

\documentclass{article}
\usepackage{tikz}