Notes on a Conversation with Donald Knuth

Donald Knuth chatting at UBC
Donald Knuth chatting at UBC

So I had the privilege of seeing Donald Knuth speak at UBC a few days ago. I was excited to see one of the eccentric Computing Science legends in real life.

The talk was in an interesting format. Knuth was in front of a relatively small theater, and simply answered any questions that were presented to him from the crowd. It was thus a spread of different questions and topics presented to him.

I took a few notes during the talk and I summarize the topics and Knuth’s responses here.

Knuth on writing:

  • translate to have less jargon
  • pays people to find errors in his books
  • write to have errors, that is, be precise and falsifiable (e.g. “13% improvement”, where this 13% can be verified)
  • have the history of discoveries with references
  • write about things that will be important 50 years from now
  • –> e.g. methods that are useful for many different applications
  • –> e.g. data structures, satisfiability problems

Continue reading “Notes on a Conversation with Donald Knuth”

How to change the size of a LaTeX equation in wordpress

Here’s how to change the size of a LaTeX equation in WordPress

First of all, here’s how you write an equation in LaTeX. Directly in your wordpress blog editor, under the “Text” tab, simply type in the following…
$latex x^2$

This will give you an equation that looks like this:

As it looks small and ugly, you might ask yourself, “self, how can I make the latex equation larger in my WordPress blog?”.
Continue reading “How to change the size of a LaTeX equation in wordpress”

How to use the Springer LNCS LaTeX template

Here’s how to use the \( \LaTeX \) template from Springer for a Computer Science conference publication. The template and relevant files are found at this page: Information for Authors of Computer Science Publications

I remember this being pretty confusing the first time I looked at how to do this. The necessary files are in different zip packages and there’s no minimally working example. So here’s a simple example on how to compile your first \( \LaTeX \) document for Springer’s LNCS publications.
Continue reading “How to use the Springer LNCS LaTeX template”

LaTeX – how to programmatically change the path of your figures

Scenario: You want to programmatically define where your figures are in your latex document without going through and manually editing all your paths. You have a folder called "figs" that contains all your figures, but this folder might move.

Here’s how to programmatically change the path of where your images are located

Or more specifically programmatically change where the "figs" folder is located

The basic idea: You can define a variable in latex that stores the path to your images and then include this variable when you set your image path.
Continue reading “LaTeX – how to programmatically change the path of your figures”

LaTeX – how to add a new reference to the BibTeX

How to add a BibTeX entry to LaTeX

This assumes,

  1. you already have a BibTeX file linked to your .tex file
  2. you are using Texmaker (if you’re not, you probably should be)

It seems to me you must go through a series of arcane steps to be able to add a reference to your BibTeX bibliography and get it to work in your \LaTeX file.

Here’s the steps and their order that have worked for me. I have included my a few comments that hopefully help to give you a sense what is going on.

Continue reading “LaTeX – how to add a new reference to the BibTeX”

LaTeX – Detexify ~ a shout out

Here’s how to easily find symbols in LaTeX.

Okay the most handiness (is that really a word?) little web app that I’ve come across since starting work in $\LaTeX$ is this little tool found here.

$\text{detextify}^2$ has seriously saved me hours of my life.

This beautiful app lets you draw any symbol into a box, then it will return the corresponding $\LaTeX$ command. So freakin’ handy! And it works. That obscure symbol you saw in some paper $\zeta$, and you can’t think of the Greek name of the top of your head? Simple! Just draw it in and bam, $\text{detextify}^2$ throws the command back (\zeta in case you are wondering).

I use this all the time when I’m writing anything sort of equations in LaTeX. A definite must know about.

Hope this saves you countless sleepless nights.

LaTeX – bold vectors and arrow vectors

Lately I’m writing a lot of papers in \LaTeX and every once and a while something comes up that drives me crazy trying to figure out.

Here’s how to easily switch between a bold vector \boldsymbol{x}  and an arrow vector \vec{x}  .

% Minimal latex example:
% Shows how to switch between bold and arrow vectors.
% Specifies the type of document you have.
% Used for the boldsymbol.
% Comment this out to represent vectors with an arrow on top.
% Uncomment this to represent vectors as bold symbols.
% Start of the document.
% Your content.
My lovely vector: $\vec{x}$
% End of the document.

Continue reading “LaTeX – bold vectors and arrow vectors”