@bergkvist/mdmake

npm script for creating a markdown template: [filename].md + Makefile -> [filename].pdf

Usage no npm install needed!

<script type="module">
  import bergkvistMdmake from 'https://cdn.skypack.dev/@bergkvist/mdmake';
</script>

README

npm script for creating a markdown template: [filename].md + Makefile -> [filename].pdf

Creating a project

[some-folder]$ npx @bergkvist/mdmake [filename]

This will create a Makefile as well as [filename].md in the current folder.

Usage after creation


# Compile [filename].md to [filename].pdf
[some-folder]$ make

# Run make automatically whenever [filename].md changes.
[some-folder]$ make watch

# Preview pdf (with automatic updates) in zathura pdf viewer.
[some-folder]$ make preview

# Open file for editing in gedit
[some-folder]$ make edit

Requirements

  • pandoc with pdf-latex (for compiling from [filename].md -> [filename].pdf)
  • zathura (for opening pdf-preview)
  • entr (for watching file changes)
  • make (for using the make commands)
  • gedit (for using make edit)