All My Brain Where stuff from my brain lands

March 31, 2008

Using a Makefile to generate Latex documents

Filed under: Software — Tags: , , , — Dennis @ 9:28 am

So, you’re using Latex to compile a paper, article, or book. If you have any type of table of contents, index, or bibliography, you’ve probably noticed that you have to run latex two (or sometimes 3) times to generate the final document. In addition, you probably have to run a conversion program to get your document into its final format (like pdf).

If you’re like me, I was getting tired of typing those commands every time I wanted to view a final copy of my paper. I decided to combine a couple great tools to “make” the job easier!

Makefiles aren’t just for compiling code. You can use them to generate commands that produce any final document. There really isn’t a limit as to what you can produce other than the commands available on your system.

For my current Latex document, I am creating an index.


I’m not going to go into the details of index creation with Latex here. There are good references all over for that [1]. Basically, you just add \index{Some Entry} at each point in your document that you want an item indexed. Then at the end, you include a “\printindex” command at the point you want your index to be output in your document.

After those commands are in place, your “latex mydocument” command produces a mydocument.idx file. You’ll also see a notice that there is no mydocument.ind file. That is because the final index file that is included is not the idx (which is just all of your entries with their page number), but an ind file which is the idx file’s entries, aggregated according to entry, and then combined with the appropriate style information to be printed correctly.

You have to run the following to create your .ind file:

makeindex mydocument

After you make the index, you can run latex again and your \printindex command has an ind file to include. You’re now set with a dvi file that you can convert into another form for publishing.

Now, lets automate all that. The format for a Makefile rule is:


All you have to do is add a rule for each output that you created with the process manually.

Here is a simple Makefile that I am using to create my document. The rules work in reverse order from the way I listed them in this post. I’ve added a rule for each step that I listed for creating my document and index. Don’t forget to name it “Makefile”

mybook.pdf : mybook.dvi
   dvipdf mybook
mybook.dvi : mybook.ind
   latex mybook
mybook.ind : mybook.idx
   makeindex mybook
mybook.idx : *.tex
   latex mybook

Once your Makefile is saved, all you have to do is run “make”. Of course, you might have figures or other resources that need to be included in your prerequisites for your sources, but the general idea ought to be the same for most projects. If you have questions or comments, feel free to leave them here.


February 4, 2008

Managing Gmail Identities with Apple Mail 3.0

Filed under: Software — Tags: , , , , — Dennis @ 7:21 am

A commenter pointed out on my original post about Apple Mail and Gmail that you can manage multiple Gmail identities by separating each email address with a comma. Here are the steps:

  1. If you have already set up your Gmail identities on Gmail, you can go to the next step. You can’t use an alternate address for an identity that you have not confirmed with Gmail. If you haven’t added the identity in Gmail yet, you can click “Settings” from the links at the top of you Gmail account and then choose the “Accounts” tab. After you’ve confirmed the identity with Gmail, you can use it with Apple Mail.
  2. Open Mail preferences and select your Gmail account.
  3. The entry box that says “Email Address” could really be titled “Email Addresses”. Simply enter all your Gmail identities, each separated by a comma, in this box.
  4. When composing a new message, you’ll now have a drop down box for different email addresses.

Just for curiosity’s sake, I tried entering an email address that I hadn’t confirmed with Gmail. The message is still sent but the sender was simply set back to my main Gmail address.

December 7, 2007

How to Manage Gmail labels with Apple Mail and Imap

Filed under: Software — Tags: , , , , — Dennis @ 7:00 am

After I set up Apple Mail to use my Gmail account, I had a couple things I was still having to go to the Gmail web interface for. One of those was managing multiple labels for a particular message. Since that time, I did some experimenting and have figured out how to manage the labels with Apple Mail. I’m pretty sure you could use any mail client that supports IMAP and you’d have the same results.

Here is how you can manage multiple labels for a message: (more…)

November 27, 2007

Configuring Apple Mail 3.0 (Leopard) to use Imap with Gmail

Filed under: Software — Tags: , , , , — Dennis @ 7:20 am

I recently purchased my first iMac. I’ve been having all kinds of fun learning about OS X features as well as playing with the newly certified Unix system (Darwin) that powers the operating system.

Anyhow, I’ve been pleasantly surprised at the level of integration that I was able to achieve with Apple Mail and Gmail with Gmail’s Imap forwarding. With Imap, Gmail exposes folders with the names of the labels you’ve created. You can customize Apple Mail to use the same folders as Gmail for Sent Messages, Drafts, and Spam. (more…)

November 26, 2007

Gentoo and the Next ATI Drivers (Catalyist 7.11)

Filed under: Software — Tags: , , , , , — Dennis @ 10:07 am

As of a couple days ago, ATI released their next drivers for Linux. The drivers were previously announced to be versioned 8.43.x but ATI has converted to a new numbering system that follows the popular YEAR.MONTH notation. The 7.11 drivers therefore accurately represent their release date in November, 2007 and are what would have been 8.43.x.

Anyway, there isn’t a Gentoo ebuild for these drivers and there may never be one. When I checked, there wasn’t even a bug filed to have one created. The 8.42.3 drivers eventually made it into portage as a masked package (~x86) with the consensus that they will never be marked stable. The 7.11 drivers will probably not even make it that far since the list of changes is rather minimal and nobody has posted any benefit to upgrading to them. You can read the Gentoo forum on the subject for more details if you like.

Anyway, it looks like we’ll be waiting for 8.1, or whatever the next release date happens to be, to find out if we finally get a faster AIGLX implementation for

Update: Well, I guess I called that one wrong. This morning my portage update contained an ebuild for ati-driver 8.433, which is the 7.11 driver I talked about in the article. I still don’t think there is much benefit to upgrading though.

November 2, 2007

Installing PgAdmin3 1.8.0 with Gentoo Linux

Filed under: Software — Tags: , , , , — Dennis @ 12:35 pm

Today, my quest for the latest and greatest software has led me to a new release of PgAdmin3. The Gentoo ebuilds for the project are terribly out of date. Before setting out to install the new version of this software, I decided I better figure out why it hasn’t been added to the official Gentoo portage tree.

The new version of PgAdmin requires wxGTK-2.8.*. There is a request for enhancement open already. The reason it hasn’t been closed is that there were a lot of packages that depended on anything greater that wxGTK-2.6 when they were added to portage. Those had to be fixed before a new wxGTK could be added because the newer wxGTK is not compatible. There is also a request for a newer PgAdmin that is marked that it will be resolved later.

Now, moving on to overcoming all this and getting the software right now. (more…)

« Newer PostsOlder Posts »

Powered by WordPress

%d bloggers like this: