Wednesday, December 19, 2007

Q. That or Which?

When do you use the word 'that' or 'which'?  

A.  Well, we use "that" when we want to restrict our subject to some smaller subset, by using the descriptive phrase that follows that. Hence:
Please pick up the clothes that you dropped off at the dry cleaners yesterday.
I don't just want you to pick up any old clothes; I want you to pick up the ones you dropped off yesterday. No other clothes will do. Hence, I use the restrictive "that" to tell you exactly what clothes I want you to pick up.

Compare this with the correct unrestrictive usage of "which":
When I was a junior in college I drove a lime-green 1977 chevy, which I bought with the pittance I earned in my summer job with Greenpeace.
The clause following "which" doesn't tell us information we have to have in order to know which car it is. Even if we don't know that you spent your summer haranguing people to wear hemp shoes, we would still know exactly what car we're talking about: your car, the unfortunately colored American gas-guzzler that leaks oil and parallel parks about as well as the Love Boat. The information provided by our descriptive clause is interesting, but not necessary for us to identify its subject.



Tuesday, December 18, 2007

Q. How do I get address line search shortcuts to work in Safari?

For example:  In Firefox I can type "wiki xenon" and it will open the wikipedia page for Xenon.
A.  Install Sogudi

Download a Sogudi that is compatible with Safari 3 here:

Installation for Leopard (from here)

  1. Delete $HOME/Library/InputManagers/Sogudi if it exists.
  2. Delete /Library/InputManagers/Sogudi if it exists.
  3. Expand the "tgz" file above.
  4. Drag the "Sogudi" folder into /Library/InputManagers
  5. Use Terminal to:
    1. sudo chown -R root:admin /Library/InputManagers
    2. sudo chmod -R go-w /Library/InputManagers
  6. Restart Safari

Monday, December 17, 2007

Symbols in Excel for Mac?

Q.  How do you add symbols in Excel:Mac?

A.  This has since changed in Office 2011 for Mac.. read the comments below!

Monday, July 2, 2007

Q. What is the easiest way to get started with Latex on a Apple Mac? 

A.  Mactex

Monday, May 14, 2007

HDF5 for Mac

Q. How do I get HDF5 Viewer 2.3 to open HDF files created
on a PC?

A. I had to download a special version of the program for INTEL macs.

Monday, April 9, 2007

Matlab and Macs

Q. I'm running Matlab on my Apple MacBook laptop running OS X 10.4.9. Question: How do I get F9 to "evaluate selection" in Matlab instead of being an expose button?

A. In the keyboard shortcuts section delete F9 as being part of expose. Cuz how often do you use it really anway?? :)

Tuesday, January 23, 2007

Nomencl

Q. Make my nomenclatures work damnit!

A. ok ok.. so i've been focusing on this for the better part of a week. But i found an easier solution that doesn't require applescript or shell scripts to do it. In the folder ~/library/texshop/engines I copied the tetex engine and renamed it nomenclature.engine with the following text inside it:

#!/bin/sh

bfname=$(dirname "$1")/"`basename "$1" .tex`"
makeindex "$bfname".nlo -s ~/library/texmf/tex/nomencl/nomencl.ist -o "$bfname".nls


The exact directory location of nomencl.ist is required since i manually installed my own updated version of nomencl.ist

Now I typset it Latex-Nomenclature-Latex and everything works beautifully!


Or change the last line to:

makeindex "$bfname".nlo -s nomencl.ist -o "$bfname".nls

if you have an updated copy of nomencl.

Monday, January 22, 2007

Shell Scripts

Q. Shell scripts.. Simultaneously when I was learning Applescripts, i've learned shell scripts. This is what I know so far
A.

  1. ls - directory listing
  2. cd .. - same as windows but with a space before the double dots
  3. man - gives the manual for any command ex: man ls
  4. clear -
  5. top - shows what programs are running
  6. [ ] means anything optional
  7. ./file - this runs the file in the current directory instead of something in the path
  8. chmod +x file - makes the file an executable
  9. vi - is some sort of editor with a complex set of commands

Applescript

Q. Ok soo.. I wanted to change directories using the Do Shell Script command in Applescript. The problem was that the directory had a space in it "Thumbdrive 2". (On a side note, why is there a "Thumbdrive", and a "Thumbdrive 1" in my /volumes folder when I only have one actual Thumbdrive plugged in?)
Anyway.. Here's how to do it

A.
  1. do shell script "cd " & quoted form of "/Volumes/THUMBDRIVE 2" & ";ls"
  2. do shell script "cd \"/Volumes/THUMBDRIVE 2\" ;ls"
The ls was just to use the ; command

Monday, January 8, 2007

Nomencl.sty

Question: How do you implement the nomencl.sty package in Latex using the front end for macs called TexShop?

Answer:
Well its not that easy.
  1. First of all you have include two packages in the preamble "\usepackage{nomencl}" and "\usepackage{makeidx}".
  2. Then you have to include the command "\makenomenclature" in your preamble.
    1. This is only true for the newest version of nomencl.ins If you have an older version it will likely want you to use \makeglossary
  3. Use \printnomenclature where you want it printed in the body (generally under the abstract)
  4. \nomenclature{$N$}{This is is the number N} is an example of a line for each item.
  5. Then Typset the document using LaTex
  6. This will create a file called .nlo
  7. In terminal (unfortunately) type:
    1. makeindex Journal\ Paper\ 2006.nlo -s ~/library/texmf/tex/nomencl/nomencl.ist -o Journal\ Paper\ 2006.nls
    2. Clearly this command was for my "Journal Paper 2006.tex" file
    3. furthermore, you must first navigate to the folder containing the .tex file, or include its path in the command
  8. Then go back and typset your document again using Latex