This is a post in a series of posts about using pandoc to convert between markdown, latex, word, and pdf. It should stand on its own, but you may want to go though the posts sequentially.
Intro OK, you have installed pandoc to convert your markdown or latex file to docx and sent it off to your adviser for comments. Now they send that file back, with comments in the word document and changes made using Word’s “track changes” feature.
This is a post in a series of posts about using pandoc to convert between r/markdown, latex, word, and pdf. It should stand on its own, but you may want to go though the posts sequentially.
Even though word processors are stupid, MS Word’s ubiquity means that occasionally I have to convert a latex or markdown document to a docx file for a colleague who insists on using Word’s “comments” feature or for submission to a journal that doesn’t accept pdfs (though thankfully, the vast majority do today).
I’m all the time asked something along the lines of “Hey, you taught me markdown/latex, but my adviser wants to give me comments in Word. How can I make that happen?”
The answer, unfortunately, is a little complicated. The best way to do this is to use pandoc, an absolutely wonderful program that converts between all kinds of markup formats (including between markdown, latex, and docx documents).1 Pandoc is very powerful, but a little overwhelming, especially if you aren’t used to working with command line applications.
A few people have told me that my previous blog post has really helped them out. I’ve also noticed that my own website occasionally gets cloned. I’ve done quite a bit with my website, though, so it’s not quite as “clean” as I’d like it to be, were I showing someone how to get their own site set up.
To that end, I created a github pages academic starter kit repository on github that you can fork and clone to get started with your own website as quickly as possible.
UPDATE - 12 May 2016 - I have created a github repository that is designed so that you can fork it and get started with your own website as quickly as possible.
When you go on the academic job market nowadays, it’s definitely the expectation that you have a personal website that you keep relatively up-to-date. Since this is by no means a painless process, this post is intended to be an guide on how to get started with your own website.
Combining code and the document that you’re writing is called “literate programming”. It’s one of the best practices associated with reproducible research, which is a hot topic in political science and other disciplines. This post isn’t about why you should do this, it’s just about how to do it.
I’m going to talk about how to combine R code with markdown via rmarkdown and LaTeX via knitr. There are other ways of doing this (such as org-mode in emacs), so this isn’t supposed to be a comprehensive guide to all of the ways of doing this.
Having a super powerful text editor can make your life much easier. There are quite a few out there, but there’s only that can do it all: Emacs.
In this post, I’ll outline how to get started with emacs. There are plenty of tutorials out there, but I’d say that the best way to learn is just to jump in. Thus, I will not spend a whole lot of time describing what M-x does (the answer is everything).
I hope that my last post convinced everyone that they need to use at least some kind of version control. Near the end of that post, I noted that git (and Github) are geared towards plain text files. In this post, I hope to convince you that plain text is your friend. If you’re coming from word processing land (like Microsoft Word or similar), then there can be a bit of a learning curve.