LaTeX Resources

March 12, 2017

I’ve found myself having to use LaTeX more often in the past couple of semesters. Over time, I discovered (what I think to be) a neat workflow for creating LaTeX documents. Now I find it easier to write a humanities essay with LaTeX than Pages. So, I thought I’d write about the tools and packages that I have found to be useful.

1. ShareLaTeX

If you’re looking to get started with LaTeX or want a quick introduction to LaTeX basics such as how to insert images or manage bibliography, ShareLaTeX’s guides have been simple and accessible.

2. Pandoc

I don’t write in LaTeX, well not exactly. Most of the time, I write in markdown, with some LaTeX inside, and use pandoc to convert that into a pdf file. It’s surprisingly simple to do this. Pandoc allows you to inline LaTeX commands in markdown and include LaTeX formatting options in a YAML metadata block.

---
title: Assignment
author: Stacey Tay
date: Mar 12, 2017
documentclass: article
paper-size: A4
header-includes:
  - \usepackage{amsmath}
  - \usepackage{amsthm}
  - \usepackage{fullpage}
  - \usepackage[utf8]{inputenc}
---

# Part 1

## Question 1

Erm, lorem ipsum.

A template that I use for assignments.

3. Detexify

Super useful if you have to use a math symbol but don’t know the LaTeX command for that symbol. Instead of searching the name of the symbol (assuming you know its name), or looking through a list of mathematical symbols and its corresponding LaTeX command in O(n) time, Dextexify allows you to draw the symbol and returns with a list of matching symbols and commands.

dexterify screenshot

The different triangles in LaTeX.

4. Emacs

This might be useful if you use emacs. Since I use emacs for everything that involves writing something, I had to find a reason an effective way to use emacs when creating LaTeX documents. Besides the usual useful text editing features, I also wanted to be able to preview my work as I typed it out. So, I wrote a save-hook that compiles and updates the resulting pdf on saving the file in emacs. This allows me to edit in emacs and see the updated pdf side-by-side.

(defun s/pandoc-markdown-to-pdf ()
  "Compile pandoc markdown document and update pdf in Preview."
  (shell-command (format-spec "pandoc %s.md -o %s.pdf && open %s.pdf && open -a Emacs.app"
                              (format-spec-make ?s (shell-quote-argument (file-name-base buffer-file-name))))))

(defun s/turn-on-pandoc-markdown-to-pdf-save-hook ()
  "Add s/pandoc-markdown-to-pdf to buffer's after-save-hook."
  (interactive)
  (add-hook 'after-save-hook 's/pandoc-markdown-to-pdf nil t))

You don't need emacs to write LaTeX, but where's the fun in that?

5. Specific Resources for SoC Classes

For when you find yourself taking a logic class or having to do a research project.

Packages for CS3234 Logic and Formal Systems

  • bussproofs—for constructing proof trees, i.e. that logical rules thing with premises and a line separating them from the conclusion at the bottom.
  • natded—for creating JaĹ›kowski-style box proofs.
  • qtree—for drawing tree diagrams.

Other


Stacey Tay

Hi! I’m Stacey. Welcome to my blog. I’m a software engineer with an interest in programming languages and web performance. I also like making 🍵, reading fiction, and discovering random word origins.