Browse Source

Add a script to generate a PDF for Boox

Samuel W. Flint 2 years ago
parent
commit
882d9acfa1
1 changed files with 35 additions and 0 deletions
  1. 35 0
      booxdown

+ 35 - 0
booxdown

@@ -0,0 +1,35 @@
+#!/bin/sh
+
+MDFILE=$1
+PDFFILE=$(basename $MDFILE .md).pdf
+
+FILE=$(mktemp XXXXXXXXXX-${MDFILE})
+
+cat <<EOF >> $FILE
+---
+documentclass: scrartcl
+classoption:
+ - DIV=14
+papersize: a5
+fontsize: 10pt
+mainfont: LucidaBrightOT
+mainFontOptions:
+ - Numbers=OldStyle
+sansfont: LucidaSansOT
+mathFont: LucidaBrightMathOT
+monofont: IBMPlexMono
+monofontoptions:
+ - Scale=MatchLowercase
+ - StylisticSet=3
+csquotes: true
+links-as-notes: true
+highlight-style: monochrome
+citemethod: biblatex
+...
+EOF
+
+cat $MDFILE >> $FILE
+
+pandoc -f markdown -t pdf --pdf-engine='lualatex' -o $PDFFILE $FILE
+
+rm $FILE