Coder Social home page Coder Social logo

jerieljan / posaune-pandoc-theme Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 173 KB

A pandoc stylesheet that gives your Markdown files a nice and fresh look that's friendly for a single webpage and in PDF.

License: Apache License 2.0

Shell 19.49% CSS 80.51%
pandoc stylesheets basictex markdown markdown-to-html markdown-to-pdf

posaune-pandoc-theme's Introduction

Posaune

A pandoc stylesheet that gives your Markdown files a nice and fresh look that's friendly for a single webpage and in PDF.

Requirements

  • The stylesheet uses Roboto Condensed font as its primary font.
  • pandoc is used to generate other document formats
  • PDF engines are used to generate PDF.
  • tex
  • wkhtml2pdf

Usage

Using the build script (HTML and PDF)

  • Copy build.sh and theme.css to the same directory where your Markdown files are located
  • Run build.sh to generate HTML and PDF for all .md files in the directory.

Manually via pandoc

Just like how the build script generates pages, you can always generate HTML and PDF output manually through the terminal using pandoc.

See the examples below:

HTML

pandoc -f markdown --css theme.css --to=html5 <input-file.md> -o <output-file.html> --self-contained

Basic PDF

  • With a PDF engine installed (e.g., BasicTeX)...
pandoc -f markdown --to=pdf <input-file.md> -o <output-file.pdf>

Styled PDF

  • With wkhtmltopdf PDF engine installed, along with a generated HTML file:
    wkhtmltopdf --dpi [preferred-dpi] [--disable-smart-shrinking] "output-file.html" "output-file.pdf"

Some additional notes

  • You may want to use "300" or "500" for the preferred DPI. This is needed because some high-resolution displays can affect how wkhtmltopdf generates its PDFs.
  • Other builds of wkhtmltopdf (MacOS) may strip CSS data with smart-shrinking on. See if it works out for you.
  • pandoc and wkhtmltopdf may vary across Linux distros / MacOS. For example, MacOS can opt for BasicTeX instead of the entre TeX package, and Arch Linux may prefer wkhtmltopdf-static in AUR to match a version of QT that it needs. Your mileage may vary.

Issues?

You can always file an issue at GitHub. I'm not available all the time though, so it may take a while for me to handle them, sorry about that.

Feel free to submit pull requests though.

Credits

The original stylesheet was based off on killercup/pandoc.css.

posaune-pandoc-theme's People

Contributors

jerieljan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

posaune-pandoc-theme's Issues

Post a screenshot

This is a CSS theme after all, right? I'd like to see how it looks without installing all the requirements and running it locally

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.