Created
June 17, 2013 13:28
-
-
Save berezovskyi/5796858 to your computer and use it in GitHub Desktop.
Pandoc pdf export script for Windows which merges all markdown scripts in a subdirectory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
setlocal EnableDelayedExpansion | |
rem © 2013 Andrew Berezovskiy | |
rem Pandoc pdf export script | |
rem Merges all markdown scripts in a subdirectory | |
rem Requires PT Serif font family. See http://www.paratype.com/public/ | |
for /f "delims=" %%a IN ('dir /A:-D /B %1') do ( | |
SET FILE_LIST=!FILE_LIST!"%1/%%~a" | |
SET "FILE_LIST=!FILE_LIST! " | |
) | |
pandoc %FILE_LIST%-o %2^ | |
--latex-engine=xelatex^ | |
-V mainfont="PT Serif"^ | |
-V geometry="top=1.5cm, bottom=1.5cm, right=1.5cm, left=2.5cm, footskip=0.7cm"^ | |
-V fontsize="12pt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
pdfall md-dir merge.pdf
where
md-dir
is the subdirectory with all MD files of current working directory.merge.pdf
will be placed in CWD.