Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pagebreak in markdown while creating pdf

I am creating a pdf of markdown text file using doxygen (1.8.6). Now I want to get page break at specific stage in markdown file, I used this link.

In the given link they have mentioned to use '>' for line break. But they haven't mentioned about page break. Yes I can use '>' for page break as well but I have to write this symbol 5 or more times on markdown text file and that makes markdown file in weird look. Is there any other ways to get page breaks in markdown files?

like image 409
user2760375 Avatar asked Mar 24 '14 04:03

user2760375


People also ask

How do I insert a page-break in Markdown?

There are three ways to insert a thematic break in Markdown, using three or more asterisks * , hyphens - or underscores _ , possibly with whitespace in between them. They all result in the same HTML (or PDF) output, which can then be used to create page breaks.

How do you write italics in Markdown?

Markdown Text Formatting Bold + Italic Creating bold italic text is simply a matter of using both bold (two asterisks) and italic (one asterisk) at the same time, for a total of three asterisks on either side of the text you want to format at once.

How do you link in Markdown?

Markdown syntax for a hyperlink is square brackets followed by parentheses. The square brackets hold the text, the parentheses hold the link.

What is Markdown PDF?

Node module that converts Markdown files to PDFs. The PDF looks great because it is styled by HTML5 Boilerplate. What? - Yes! Your Markdown is first converted to HTML, then pushed into the HTML5 Boilerplate index.


1 Answers

Since Markdown accepts plain HTML and CSS, simply add this line wherever you want to force page break.

<div style="page-break-after: always;"></div> 

If your Markdown editor have trouble exporting PDF correctly, first try to export as HTML, then open with your browser and print as PDF.

like image 70
tomodian Avatar answered Oct 22 '22 05:10

tomodian