Smoother conversion for directories of markdowns to pdfs.
PowerShell Shell Batchfile TeX
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE.txt
README.md
m4p.ps1
m4p.sh
m4ps.ps1
m4ps.sh
md4pdf-iih.tex
md4pdf.bat
md4pdf.ps1
md4pdf.sh

README.md

md4pdf

For markdown files containing up to four level of heading, here are three small resources for smoother conversion to pdf using Pandoc calling XeLaTeX.

Requirements

Windows 7 at least, with LaTeX, Pandoc and SumatraPDF installed.

Vim modeline

If you want it to be hidden in the pdf, then do something like this:

---
[//]: # ( vim: set fdm=expr:)

Does the cartography workshop where Christopher Columbus lived in Lisbon still exist?

(- which I use with my vimfiles\ftplugin\markdown.vim).


titles.tex

A LaTeX pre-configuration file for Pandoc, included by way of explanation of the 4th-level markdown heading snag that I have resolved here by pushing headings up a LaTeX level, and tidying up the top one (now Chapter).

md4pdf.bat

Windows Batch file for converting a markdown file to pdf, using the pre-formatting gathered in titles.tex and with the file's basename fed through as the replacement for the "Contents" header in the pdf's table of contents.

md4pdf.ps1

PowerShell Script for recursively converting all as yet unconverted or recently changed markdown files in a directory, as per md4pdf.bat.