Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to use Markdown as a substitute for LaTex in my documents which do not have Mathematical formulee.

I assume that the number of rows in one A4 is 80.

Problem: to not to have two H1 headings in the same page

If the problem occurs, rows should be added to the beginning of the second H1 such that it starts at the new page.

The program should

  • calculate the number of rows before the second H1
  • divide that number by 80 and take the remainder
  • add enters as much as the remainder to the beginning of the second H1

How can you calculate the number of rows in a document where there is no pictures?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

There is a perl script here that puts a page break comment before each H1 heading (except the first). The page break comment is then processed when the output is passed through html2ps. This may not be precisely the solution you need but it may lead you in the right direction.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.