Jump to content

Simple LaTeX ⟷ Markdown converter using Pandoc


Recommended Posts

LaTeX ⟷ Markdown Alfred Workflow

Quickly convert Markdown to LaTeX or vice versa from your clipboard with Pandoc.


Description

A simple routine to convert snippets of markdown to LateX from your clipboard or vice versa. The workflow creates either a *.md or *.tex file relative to your input and at the location you choose. The file is converted with Pandoc by calling it from the terminal. The converted file subsequently gets output at the same place. Existing files will be overwritten.

 

Pandoc is key and has to be installed:

$ brew install pandoc


GitHub: 

github.com/zeitlings/alfred-latex-md/raw/master/LaTeX-MD.alfredworkflow (direct download) 

github.com/zeitlings/alfred-latex-md

 

Alternative Method: Clipboard only

An altered version that removes all created files and copies the converted output back to your clipboard:

 

Convert markdown to LateX from your clipboard or vice versa. The workflow creates either a  *.md or *.tex file at your ~/Documents folder. The file will be converted with pandoc by calling it from the Terminal. The contents of the converted file will be copied to your clipboard. Both files will be moved to your trash bin.

 

 

 

GitHub: 

github.com/zeitlings/alfred-latex-md-direct/raw/master/LaTeX-MD-direct.alfredworkflow (direct download) 

github.com/zeitlings/alfred-latex-md-direct

 

_____________

 

The workflow is piggybagging off these two:

https://www.alfredforum.com/topic/459-workflow-create-a-new-text-file-with-clipboard-content/
https://www.alfredforum.com/topic/394-fixed-create-a-new-file-in-the-finder/

 

https://pandoc.org/

 

 

 

Edited by zeitlings
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...