December 2009 Archives
Sat, 12 Dec 2009 @ 22:17:28
latex letter paper
As a user, to configure LaTeX to default to letter paper size (instead of A4), run the command:
# texconfig paper letter
Paper size can also be respecified during the DVI to PDF conversion, if not using pdfLaTeX:
# latex mydoc.tex && latex mydoc.tex # dvipdfmx -p letter mydoc.dvi
This is useful for third-party document classes, such as
acm_proc_article-sp.cls, which do not have a letterpaper option, but are
intended for letter paper size.
Sun, 06 Dec 2009 @ 20:56:26
searchable ligatures
While working on my resume, which is authored in LaTeX, I noticed an interesting problem: every word that contained the characters 'ff', 'fi', or 'ffi' was not searchable. The document was human-readable on the screen, but for some reason Adobe Acrobat Reader was unable to properly copy-and-paste or search these letters. Additionally, the Linux command `pdftotext' converted the PDF to plain text that was not pure ASCII. After discussing the problem on freenode with a few more experienced LaTeX users, I discovered what is probably a lesser-known typography feature: ligatures.
Ligatures are single characters (glyphs) that represent the combination of two or more characters in a more aesthetically pleasing fashion for printing of documentation. LaTeX and other typesetting software make these substitutions automatically. In this case, the 'f' character is positioned closer to the following character if the following character is 'f' or 'i', making a single glyph from two.
Normally a PDF using ligatures still has an internal font encoding that permits searching and copying of the text without the ligatures. For some yet unknown reason my distribution of TeXLive creates PDFs whose ligatures are encoding compatible with open source programs, such as Evince, but pose problems with Adobe products.
The solution was to use the lmodern LaTeX package with pdfLaTeX, substituting
fonts in the PDF. Unfortunately, this can more than double the PDF size.
\usepackage{lmodern}
Sat, 05 Dec 2009 @ 01:35:19
upgrading ubuntu kernel
New kernels for the ubuntu distribution are available from kernel-ppa. At the moment, kernel 2.6.32 provides some Intel graphics driver enhancements over the default 2.6.31 kernel shipped with Ubuntu 9.10.
To install, download ubuntu kernel 2.6.32 for your architecture (i386 or amd64), and then run dpkg:
dpkg -i linux*2.6.32*.deb
Update. 05 Dec 2009 @ 20:19. It appears that the "improved" Intel graphics driver does not properly resume from suspend. That is unfortunate.
