Contact info

Office
MS 356
Phone
(403) 220-7599
Email
Office Hours
By appointment only

Publications, Conference Papers, and Other Such Stuff

Schedule

(Schedule currently disabled.)

LaTeX Snippets

Disable double-spaced arrays in while using ucalgthes or doublespace.sty.

\makeatletter
\let\@oldarray\@array
\def\@array[#1]#2{%
   \def\arraystretch{0.5}%
   \@oldarray[#1]{#2}}
\makeatother

Number theorems and corollaries as, e.g., Theorem 1, Corollary 1.1, Corollary 1.2, Theorem 2, Corollary 2.1. (There's probably a better way.)

\newcounter{temp}
\def\savecounter#1{\newcounter{#1}\setcounter{#1}{\cattheorem}}
\def\changetheoremcounter#1{\setcounter{temp}{\cattheorem}\setcounter{theorem}{\
csname the#1\endcsname}}
\def\restoretheoremcounter{\setcounter{theorem}{\thetemp}}

\def\bcc#1{\changetheoremcounter{#1}\begin{corollary}}
\def\ecc{\end{corollary}\restoretheoremcounter}

Cardinals.

\newcommand{\genericcardinal}[2]{\ensuremath{{#1}^{\textrm{#2}}}}
\newcommand{\nnd}[1]{\genericcardinal{#1}{nd}}
\newcommand{\nth}[1]{\genericcardinal{#1}{th}}
\newcommand{\nrd}[1]{\genericcardinal{#1}{rd}}
\newcommand{\nst}[1]{\genericcardinal{#1}{st}}

Auto-indexed to-do list. Run makeindex -s <style-file> -o <file>.int <file>.idt after BiBTeX pass.

\usepackage{color}
\newcommand{\todo}[1]{\index[todo]{#1}\marginpar{\color{red} To-do: #1}}
\newindex{todo}{idt}{int}{List of Things To Do}

\begin{document}
\printindex[todo]

Including source code in LaTeX. It's a heavily modified version of algorithmic.sty.

Style file and example

Typesetting continued fractions. (Output)

\newcommand{\phantomcfrac}[1]{\genfrac{}{}{0pt}{0}{}{#1}}

\phi_0 = q_0    +   \cfrac{1}{q_1
                +   \cfrac{1}{
             \ddots \phantomcfrac{q_{i-1}
                +   \cfrac{1}{q_i
                +   \cfrac{1}{\phi_{i+1}} }}}}

Removing the page numbers on slides when using the Prosper document class. There doesn't seem to be any way to do this (it's a requested feature, though), so use the following patch to prosper.cls. By default the page numbering is on, but to turn it off, just add noslidenumbers to the list of options you give to the \documentclass command, i.e.

\documentclass[noslidenumbers,whatever-else-you-have-here]{prosper}

If you need to automatically number the lines in a document, try the lineno.sty (off-site link). To use, just add the following to the top of your LaTeX file:

\usepackage{lineno}
% Running line numbers
\linenumbers
% Same, but number that reset on every page
\pagewiselinenumbers
% Number only every 5th line
\modulolinenumbers[5]

In a Beamer document, you can have alternatingly colored table rows. Makes reading a table a little easier. (Output) (Example borrowed from here.)

\documentclass[xcolor={pdftex,dvipsnames,table}]{beamer}
...
\begin{center}
\rowcolors{1}{RoyalBlue!20}{RoyalBlue!5}
\begin{tabular}{...}
...
\end{tabular}
\end{center}

kthxbye.

Alan Silvester

Ph.D. Candidate

Office webcam

Thumbnail

Links