MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.45k stars 1.09k forks source link

Page Numbering with Macdown #enchancement #547

Open redconnection opened 8 years ago

redconnection commented 8 years ago

Hi,

I'm really missing the option of numbering pages in Macdown. I understand that markdown has no concept of page numbers, however, it would be great to have it via:

  1. PDF rendering engine if supports adding numbered pages
  2. Possibility of adding a footer div to use with custom CSS.

Thanks

jkulesza commented 8 years ago

I disagree with this enhancement request. Markdown is intended to be a lightweight affair, both in terms of handling and output. If you require "document" features, I would propose exploring other technologies (e.g., LaTeX, IPython and its notebooks, Mathematica notebooks).

I'm very excited to see how active the development is behind MacDown. However, I'm becoming concerned with feature bloat.

redconnection commented 8 years ago

Truth is, if webkit would support "css3-page" properly, we wouldn't even have this conversation. However, looking at the age of this request (filed in 2007) i doubt that we will see this done.

I digress, will use inline HTML. It sort of defeats the purpose of having content a styling separated though.

Appreciate any better ideas.

uranusjr commented 8 years ago

Honestly there really isn’t anything practical I can do to support this. The best solution would be CSS, but as of 2016 no support is coming anywhere. Other solutions would be extremely hacky at best. This really is a very fundamental problem is HTML, and inherently Markdown.

For now I recommend using one of the following solutions:

  1. Learn LaTeX.
  2. If plain LaTeX is too difficult and/or too tedious to learn, restructuredText is a good alternative that is similar to Markdown. It supports page numbering, headers, and footers. You can generate a PDF either with rst2pdf or Pandoc.
  3. Pandoc actually supports Markdown, so if you already have a Markdown document, you can first convert it to restructureText or LaTeX, add page numbering with minimal modification, and then outputs PDF.

I’m leaving this open to track possible future development in the CSS spec and WebKit implementation, but nothing will happen in MacDown before those are in place.

Jmuccigr commented 8 years ago

Is it not possible to have the page numbers added in the printing? Several apps do that.

uranusjr commented 8 years ago

Not with pure CSS. It is possible to add page numbers to printed documents (and PDF if you use the OS X printing system), but it would not be a pretty affair, and is (as @jkulesza mentioned) not quite in-line with a lightweight Markdown editor.

Jmuccigr commented 8 years ago

I don't see the problem with letting the print process add the page numbers (however that works). I use Macdown for some lightweight editing needs (like lecture notes) and being able to have page numbers would be great, no matter how bad they look.

RoyiAvital commented 8 years ago

+1

cupnoodle commented 6 years ago

My Apologies if this sounds off topic, feel free to remove this comment if it is.

Hi guys, I have wrote assignments, reports using MacDown and enjoyed using it, I have also faced the same problem of not having page numbers option.

I really wanted the page number feature for PDF export (page number is a requirement for assignment) hence I made a macOS app for adding page numbers / text watermark on the exported PDF files.

You can download it here https://pdfpagenumber.com/ , hope this helps!