Archive for the 'Life' Category

Phishing Terms of Agreement?

I’ve been recieving spam via Live Messenger and have mostly ignored them to-date. Feeling adventurous today, I decided to click and view one of these sites and noticed that they had a Terms of Use agreement. It’s actually quite a humourous read if you’re interested, so take a look below.

Continue reading ‘Phishing Terms of Agreement?’

DHS Can Detain Your Laptop for No Reason

The United States’ Department of Homeland Security now has the power to detain a traveler’s laptop indefinitely at the border, without any cause for suspicion. This is frightening, especially since all of my work and personal life is stored inside this machine. Not to mention that I use Linux, which might set off a cyber-terrorist alert, since it is the OS of hackers… apparently.

Beamer, PDFTeX and XeTeX

I’ve recently started using the beamer class to create slides for my presentation. Up till now, I’ve been using powerdot, and found it more than sufficient. I initially thought beamer to be far more complex than necessary. However, one feature convinced me to switch: PDFTeX and XeTeX support.

Both PDFTeX and XeTeX create a PDF directly from the LaTeX source. XeTeX is built on PDFTeX, and is of particular interest since it has added support for TrueType and OpenType fonts. For beamer presentations, this was great, since it opens up a huge selection of fonts for use in presentations. To change the default font in the document with XeTeX, use the fontspec package. The xunicode package provides additional mapping between LaTeX accents and the selected font. A third package, xltxtra provides some fixes relating to fonts.

\documentclass[xetex,mathserif,serif]{beamer}
 
\usepackage{fontspec}
\usepackage{xunicode} %Unicode extras!
\usepackage{xltxtra}  %Fixes
\setmainfont{Calibri}
\setmonofont[Scale=0.86]{Andale Mono}

Of course, you should replace Calibri and Andale Mono with a font of your choice.

Another nice package to use with PDFTeX, is the microtype package, which provides better font output. Enable the package with this line:

\usepackage[final,expansion=true,protrusion=true,spacing=true,kerning=true]{microtype}

XeTeX and PGF / TiKZ

PGF / TiKZ is a TeX library for drawing graphics using the PDFTeX and XeTeX drivers. However, you may encounter the following error message when attempting to compile a presentation with PGF / TiKZ pictures in your Beamer slides:

Package pgf Warning: Your graphic driver pgfsys-dvipdfm.def does not supported marking the current position.

Unfortunately, the included TiKZ library in the TeXLive 2007 distribution does not support XeTeX. This causes cross-picture coordinates to break, which can be used to draw arrows between various TiKZ pictures in a Beamer frame.

While we wait for TeXLive 2008, you can install the new version of PGF from the CTAN which adds support for the XeTeX driver. Simply download the package, and copy the files to your local ~/texmf/tex/ directory and execute texhash to update the TeX listings.

XeTeX and Wide Pages

Although I haven’t had much time to investigate the issue, but it seems that the pgfpages package that is used with beamer, is not entirely compatible with XeTeX. In particular, the commands:

\usepackage{pgfpages}
\setbeameroption{show notes on second screen}        %beamer
\pgfpagesuselayout{two screens with optional second} %pgfpages

is enough to have pdflatex generate notes to the right of the slide, but on xelatex it doesn’t have any effect. This post by Tomáš Janoušek to the XeTeX mailing list noted that the problem was due to a bug in the pgfpages package. Adding the following snippet fixes the probblem:

\renewcommand\pgfsetupphysicalpagesizes{%
    \pdfpagewidth\pgfphysicalwidth\pdfpageheight\pgfphysicalheight%
}

Eternal Sunshine of the Spotless Mind

Eternal Sunshine of the Spotless Mind is one weird movie. It’s one of those movies that get you thinking. It’s also one of those movies that doesn’t really make sense until the end. There’s just so much detail packed into it. Definitely recommended if you’re into strange artsy movies with a touch of sci-fi and romance.