Skip to content

papermill/pandocco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pandocco

simple PDF output for docco

Just an example script and templates.

  • docco + plain-markdown template
  • pandoc + pandocco latex template

How does it work?

The example script checks out some git repos. Some are for the needed tempate, some are just example content.

  1. Covert the source code to markdown (docco)

    • docco converts your source code by seperating the code (the programm) from the comments
      • code is outputed in HTML <pre> elements (plus syntax higlighting etc)
      • the comments are seperated, the comment markers (like # and //) are removed and run through a markdown to HTML converter
    • since docco originally generates HTML (already converting the markdown), I made a very minimal template which outputs just plain markdown.
      • the code is just put into ``` "code fences", which are supported by pandoc (and github!)
      • the comments just have their marker removed and are otherwise untouched (since markdown conversion is handled by pandoc)
  2. Convert the generated markdown to PDF

    • pandoc can output to not just HTML, but also LaTeX and directly to PDF (you'll still need a LaTeX installation, for the minimum ask your package manager for pdflatex.)
    • there are lots of options and flags, you can use the example script as a starting point

examples:

Screenshot


docco.pdf screenshot


bonus:

About

docco+pandoc LaTeX output to PDF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages