-
Notifications
You must be signed in to change notification settings - Fork 11
Working with Pandoc
Pandoc is a free software, released by John MacFarlane under the GNU General Public License, that converts files from one markup format into another. Pandoc supports conversions between a tremendous variety of formats, including markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, TWiki markup, OPML, Emacs Org-Mode, Txt2Tags, Microsoft Word docx, EPUB, and Haddock markup:
Pandoc-supported Conversions:
For more information, check out the pandoc project website.
Installing pandoc is straightforward:
Windows
Windows users can utilize a package installer, available from pandoc’s download page. To produce PDF output, you’ll also need to install LaTeX. Pandoc recommends MiKTeX.
Mac OS X
Mac OSX users can also install pandoc via a package installer from pandoc’s download page. If you later want to uninstall the package, you can do so by downloading this script and running it from your terminal with perl uninstall-pandoc.pl
.
For PDF output, you’ll also need LaTeX. Because a full MacTeX installation takes more than a gigabyte of disk space, Pandoc recommends installing BasicTeX (64M), and using the tlmgr
tool to install additional packages as needed. If you get errors warning of fonts not found, try:
tlmgr install collection-fontsrecommended
Linux
For 64-bit Debian and Ubuntu, pandoc provides package installer via their download page. This will install the pandoc and pandoc-citeproc executables and man pages. Users of other Linux flavors can check if installation is possible using your package manager. Pandoc is in the Debian, Ubuntu, Slackware, Arch, Fedora, NiXOS, and gentoo repositories. Note, however, that versions in the repositories are often old. so you may be better off just installing from source. Check out pandoc's installation instructions for details
For PDF output, you’ll need LaTeX. Pandoc recommends installing TeX Live
PLEASE NOTE : This section is intended as a 'quick-and-dirty' CCCS reference for using pandoc to implement a few of the basic conversions that we run most often. The pandoc website provides comprehensive usage instructions and examples, including a great 'Getting Started' page to help users who are not familiar with command line operations to understand how to navigate around your file system and to execute basic pandoc commands. Their 'User's Guide' elaborates detailed usage information and instructions. Please refer to the official pandoc documentation if you wish to run specific (or complicated) conversions that are not addressed here.
Pandoc is a command-line tool; there is no graphical user interface. In other words, to use pandoc, you need to work through a terminal interface [or 'virtual console'].
Deploying the terminal in Windows:
Windows users can use either the classic command prompt or the more modern PowerShell terminal. If you use Windows in desktop mode, you can access the your terminal by typing either cmd
or powershell
into the Start menu's 'search' tool and double click the application icon to run it.
Deploying the terminal in Mac OSX:
On OS X, the 'Terminal' application can be found in /Applications/Utilities
. You can access the terminal via the 'Finder' window, navigating first to 'Applications' and then to 'Utilities'. Once again, double click the 'Terminal' icon to run it.
Deploying the terminal in Linux:
Most Linux users will be comfortable launching the terminal application. For those who are not, accessing your terminal will vary according to your distro. Usually, you can launch it using key command such as ctrl+alt+t
(or something close to it). To find the terminal via your GUI, try clicking the 'start' icon for your distro and entering terminal
into the field.
Working with pandoc is accomplished by entering commands into the terminal. To start, let’s verify that pandoc is installed by issuing the following command:
pandoc --version
and hit enter. You should see a message telling you which version of pandoc is installed, and giving you some additional information.