Giter Club home page Giter Club logo

Comments (6)

wlupton avatar wlupton commented on July 20, 2024

commonmark_x doesn't support the raw_tex extension for CommonMark input, so (with commonmark_x) it's parsed as a Para, not as a RawBlock (and I guess the filter doesn't recognise this as a page break).

You could set the pagebreak.break-on.form-feed option to allow literal ^L paragraphs to trigger page breaks (see the README).

from pagebreak.

Disonantemus avatar Disonantemus commented on July 20, 2024

Thanks 4 the quick answer!

I did search for raw_tex in every markdown variant that pandoc has:

$ pandoc --list-extensions=markdown | grep raw_tex
+raw_tex
$ pandoc --list-extensions=markdown_mmd | grep raw_tex
-raw_tex
$ pandoc --list-extensions=markdown_phpextra | grep raw_tex
-raw_tex
$ pandoc --list-extensions=markdown_strict | grep raw_tex
-raw_tex

This other ones didn't show any output:

$ pandoc --list-extensions=commonmark | grep raw_tex
$ pandoc --list-extensions=gfm | grep raw_tex
$ pandoc --list-extensions=commonmark_x | grep raw_tex

I get from all of this:

  • -f markdown is the only one enabled by default.
  • Is possible to enable it with +raw_tex in some.
  • Makes sense because -f markdown has a lot more +extensions, and if I need other one that is disabled, just need to enable it.
  • Last 3 are not supported, I understand that commonmark and gfm are not supported, but commonmark_x don't makes sense to me.
  • I will try your suggestion with pagebreak.break-on.form-feed, my .mds are rather small and don't think performance is an issue for now.
  • Maybe is a good idea to add some of this "markdown variant" compatibility info in the README.

My last resort is to create my own shell script to process ms output and replace \newline to (raw break page ms):

`.bp`{=ms}

then gropdf, to get final pdf. But is just too specific, and I need to change it if I want another output format.

from pagebreak.

wlupton avatar wlupton commented on July 20, 2024

If you go to the extension in the manual and hover over the ± you can see which formats support the extension (I guess this refers to the reader?).

Maybe is a good idea to add some of this "markdown variant" compatibility info in the README.

Yes. A pull request would be welcome!

My last resort is to create my own shell script

I think it would be reasonable to have an option that allows a paragraph consisting only of \newpage. This wouldn't depend on supporting the raw_tex extension, and is actually a variant of the pagebreak.break-on.form-feed option. A pull request for this would be welcome too!

from pagebreak.

Disonantemus avatar Disonantemus commented on July 20, 2024

If you go to the extension in the manual and hover over the ± you can see which formats support the extension (I guess this refers to the reader?).

I went to your link and I didn't see the symbol, because your previous answer, now I did click this one in the same topic and yes, you're right. And I did learn that markdown_github (deprecated) can use it.

Maybe is a good idea to add some of this "markdown variant" compatibility info in the README.

Yes. A pull request would be welcome!

I'm no programmer and did this account just to make Issues 4 software that I like 2 use. Maybe later I'm gonna try to do that, because I previously never did a PR, and English is not my 1st language, but to edit README.md should be easy. Maybe I did a PR now, I'm not sure ...

My last resort is to create my own shell script

I think it would be reasonable to have an option that allows a paragraph consisting only of \newpage. This wouldn't depend on supporting the raw_tex extension, and is actually a variant of the pagebreak.break-on.form-feed option. A pull request for this would be welcome too!

If I can get working my shell script, I can leave it here.

from pagebreak.

wlupton avatar wlupton commented on July 20, 2024

PR #5 updated README.md.

from pagebreak.

wlupton avatar wlupton commented on July 20, 2024

Issue #6 proposes adding an option that allows a paragraph consisting only of \newpage (even if not parsed as raw TeX) to indicate a page break.

from pagebreak.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.