Wednesday, May 30, 2007

Google Gear

I installed Google Gear. It seems working right with Google Reader. I would really like to see this to be used with Gmail and Google Calender.

LaTeX and PDFLaTeX

Last time I wrote the following to detect whether latex or pdflatex is used to compile a source, but I noticed today this will confuse the latex commend in Cygwin. The latex commend in Cygwin is a symbolic link to pdflatex and this makes pdflatex to produce a pdf file instead of a xdvi file even though you call latex.


\ifx\pdftexversion\undefined
\usepackage[dvips]{hyperref}
\else
\usepackage[pdftex]{hyperref}
\fi

After searching webs, the following works fine.

\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex]{hyperref}
\else
\usepackage[dvips]{hyperref}
\fi

Tuesday, May 29, 2007

Google Maps Street View

This service will be useful when I look for an apartment or something.

For example, this is the apartment I stayed last summer.

Monday, May 28, 2007

Shogun

I was invited by my friends and played a board game, Shogun.

Sunday, May 27, 2007

Sushi Party

We had a sushi party. Another Japanese ordered fresh fish from somewhere and he made sushi. It was fun. I brought pre-cooked sukiyaki.

Friday, May 25, 2007

Cafe Django

This week's lunch was at Cafe Django. I had today's special, peasant momo. I have had momo multiple times at a Tibetan restaurant, but today's momos were huge.

Friday, May 18, 2007

Bombay House

We had lunch at Bombay House again. It's a Indiana style buffet. We've covered pretty much all restaurants within walking distance from the university.

Sunday, May 13, 2007

Pépé le Moko

Today's movie was Pépé le Moko directed by Julien Duvivier.

Saturday, May 12, 2007

Baseball

Probably it's my first time to play baseball even tough I have played softball when I was in an elementary school.

Friday, May 11, 2007

Chopstick Helpers

Today's lunch was at Noodles & Company.

I found something interesting today. They are called chopstick helpers. It's best described if I say that they turn chopsticks to tongs. Honestly, with a chopstick helper, I cannot use chopsticks at all.

Thursday, May 10, 2007

Latex Tips

I was playing around with the URL formating with Latex today and found the following.

\url{http://example.com} in the url package displays URLs inserting line breaks properly. But, the same \url{} doesn't insert line breaks if you use the hyperref package with the dvips option (hyperref is a useful package to create hyperlinks in PDF), but works fine with the pdftex option.

So, I started to use pdflatex to create PDF instead of the old-style latex-dvips-ps2pdf combination. pdflatex doesn't support EPS files, so I converted all EPS files to PDF using epstopdf.

But, I still want to use latex and xdvi for quick modification. It's because xdvi refreshes the updated dvi file automatically. I can just keep xdvi open showing some specific page. Every time I compile the TeX file, I can see the modified result right away. I don't need to reopen the file and move to the specific page. So, I did the following to make the LaTeX file compilable both with latex and pdflatex.

First, I load the hyperref package with the proper option detecting how the file is compiled.


\ifx\pdftexversion\undefined
\usepackage[dvips]{hyperref}
\else
\usepackage[pdftex]{hyperref}
\fi

Then, I removed file extensions, like \includegraphics{foo}, so that includegraphics finds foo.eps or {foo.pdf or foo.png} depending on how I compile it.

Wednesday, May 09, 2007

cygstart.exe

I have been using the following script to open files using Windows applications, but today I got to know about cygstart.exe, which does exactly my script does. How long has it been there?


#! /bin/sh
/cygdrive/c/Meadow/bin/fiber "`cygpath -w $1`"

Monday, May 07, 2007

Extra Battery for my Note PC

Because of the recall of ThinkPad batteries, I received a new battery today. I have been using the original battery for almost a year, so it's a good timing to switch to a new one (as you know, batteries wear out).

Saturday, May 05, 2007

Badminton

I feel like I finally did some exercise after really long time.

Friday, May 04, 2007

Laughing Planet Cafe

Today's lunch was a burrito at Laughing Planet Cafe.