View Single Post
Old 08-13-2023, 02:07 AM   #1
jms1
Junior Member
jms1 began at the beginning.
 
jms1's Avatar
 
Posts: 5
Karma: 10
Join Date: Aug 2023
Device: reMarkable 2, Kobo Libra 2, kindle oasis, kindle 3/keyboard, nook
Disable H1 page breaks when converting Markdown to PDF

I'm trying to use the "ebook-convert" command to convert markdown files to PDF. I've got most of the details figured out, however something is forcing a page break in front of every H1 element.

Using the command with the output going to a directory instead of a file, shows me the files which would be sent to the PDF output plugin, and in the "stylesheet.css" file I see "page-break-before: always;" in the block for each element which was an "#" line in the input file.

My first thought was to use the "--extra-css" option to add a custom stylesheet containing "h1 { page-break-before : auto ; }", however this doesn't appear to affect anything, either in the output directory, or in the generated PDF. In fact, I don't see this new line anywhere in the output directory at all.

How can I disable the automatic page breaks before every H1 element?

If it helps, under https://jms1.pub/reMarkable2/, "introduction.md" is a copy of the markdown file I'm trying to convert, and "introduction.pdf" (produced by Marked 2) is more or less what I'm trying to get "ebook-convert" to produce.
jms1 is offline   Reply With Quote