

In addition, the syntax is rendered while editing to clearly show the expected result. The WYSIWYG-esque editor allows users who may be less experienced with Markdown to use familiar toolbar buttons and shortcuts. # Get the filename (and path) without the extensionįilename_without_ext=`rev <<< "$.pdf"Īfter some chmod +x md2pdf and having copied it to /usr/local/bin this allows me to simply write:Īnd it'll generate a file called -markdown-editor - A simple, beautiful, and embeddable JavaScript Markdown editorĪ drop-in JavaScript textarea replacement for writing beautiful and understandable Markdown. # If second argument is undefined then name the output file the same as the input file Great! But I’m not using pandoc regularly so in order to make it a little easier to remember I wrote a small bash script that I’ve named md2pdf:Įcho "You need to specify the markdown file" $ pandoc -o out.pdf osx-pdf-from-markdown.markdown Now you should be able to run pandoc from the command-line and generate pdfs like this: $ ln -s /Library/TeX/Root/bin/x86_64-darwin/pdflatex /usr/local/bin/pdflatex Here are the instructions in its entirety: When it’s time to create a symlink the gist instructs us to do sudo ln -s /usr/texbin/pdflatex /usr/local/bin/ but instead I had to do ln -s /Library/TeX/Root/bin/x86_64-darwin/pdflatex /usr/local/bin/pdflatex.When it says that you should do brew tap phinze/cask I simply ignored this step and went directly to brew cask install mactex.These are the two things that I had to do differently:

The problem was that everything didn’t quite work for me (I later found out that a fix was written in the comment but I didn’t know at the time).

A quick tour on google and you’ll find this excellent gist that describes more or less how to get it working. So after a few of these incidences I settled the matter and decided to investigate if there was an easy way to just generate a pdf file from markdown from the command-line in MacOSX. But on several occasions I’ve had the need to share what I’ve written with a non technical person and handing off markdown to them seems a bit so-so. I tend to use markdown almost unconsciously when taking notes or expressing thoughts or ideas in a text editor.
