I wanted to create a horizontal rule that stretches the full width of a pdf, and also works in my HTML files that are knitted from R Markdown. I followed outlined here, shown below, which worked very well.
A problem with the solution is that it creates a giant block of 'white space' between the heading and horizontal rule. How do I eliminate, or reduce the size, of this 'white space'?
Here is the method I used. Firstly, a tex file
is made called header.tex
, containing:
\let\oldrule=\rule
\renewcommand{\rule}[1]{\oldrule{\linewidth}}
Then in the Rmd
file put:
---
output:
pdf_document:
includes:
in_header: header.tex
---
And this is the result: