Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pandoc MD to PDF , full size horizontal rule

I'm using pandoc (on windows with miktex)

with markdown i create a horizontal rule, save that as my source.md

---

(or even an hr tag instead)

but when I convert to PDF the horizontal rule is a tiny little line in the middle of the page, centered.

How do I get it to create one from margin to margin like it does when I convert it to HTML?

Edit:

I tried a CSS styled DIV tag that creates a rule but it is completely ignored during a pdf output.

like image 993
Chris Valentine Avatar asked Sep 04 '14 04:09

Chris Valentine


People also ask

Can pandoc convert from PDF?

You can't. You can try opening the PDF in Word or Google Docs and saving in a format from which pandoc can convert directly.

Can pandoc convert HTML to Markdown?

Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx.


1 Answers

As pointed above, you can redefine the \rule command in your custom LaTeX template to ignore the first argument:

\let\OldRule\rule
\renewcommand{\rule}[2]{\OldRule{\linewidth}{#2}}
like image 191
dotpao Avatar answered Dec 09 '22 15:12

dotpao