Friday, November 5, 2010

Allow me to recommend AUCTeX, preview-latex, and Vincent Goulet's Emacs for OS X Modified

I am wanting to start typesetting my articles in LaTeX rather than using Pages+Endnote+Mathtype or, worse, Word. I don't like the LaTeX writing process of write, run LaTeX, run LaTeX again a couple of times to get the equation numbering correct, convert the dvi to a pdf, open the pdf, find a typo in an equation, cry, go to the bathroom, make a cup of tea, write some more. AUCTeX is a package for Emacs that makes it easier to write LaTeX with handy keyboard shortcuts and syntax highlighting, for example. Most notably, AUCTeX comes bundled with a tool, preview-latex, which presents rendered math equations in-line.

This requires a GUI-enabled Emacs. On the Mac, Cocoa Emacs is the most current. Vincent Goulet has prepared a special build of Cocoa Emacs, Emacs for OS X Modified, which includes AUCTeX as well as ESS and psvn if you're interested in those, too.

I don't know if this is a common problem, but for my installation, preview-latex didn't work properly until I disabled TeX-PDF-mode by C-c C-t C-p or adding (TeX-PDF-mode nil) to my .emacs file. I got the idea from this mailing list discussion.

Monday, May 31, 2010

Allow me to recommend Cyberduck

Price: Free

Cyberduck is a reliable, easy-to-use FTP, SFTP, S3, etc. browser for OSX. And you get a cute rubber duckie in your dock! I used to use Fugu, and I find Cyberduck to be much more pleasant.

Sunday, May 23, 2010

Buzz

Check out my Buzz profile.

Thursday, May 20, 2010

Most confusing chart of the day

The most confusing chart of the day award goes to:
Ide Orientation development in thermotropic liquid 2004.pdf (page 4 of 6)
Uploaded with plasq's Skitch!

from Ide and Ophir. Orientation development in thermotropic liquid crystal polymers. Polymer Engineering and Science (2004) vol. 23 (5) pp. 261-265. Depicted are three values (tensile modulus, tensile strength, and area reduction) for five datapoints. Three scales appear on two y-axes. I think that this plot means that the tensile modulus for the extrudate decreases with increasing shear rate; I'm not sure why I should care about the other two variables because they don't look like they change very much, but it's hard to tell, because they are also on a smaller visual scale than the tensile modulus.

Thursday, May 13, 2010

Pages' proofreading

In Episode 5 of the Mac Power Users podcast, Word Processing and Writing, David and Katie point out the proofreading feature in Pages. Like in Word, and in all native Mac programs, misspelled words have red underlines. Word also has a grammar check, the green squiggly underline, which I've grown accustomed to ignoring; it consistently has worse grammar than I do. Today, as I was writing an article, I looked for Pages' green proofreading marks, and it made some suggestions:
  • in terms of: Wordy in certain contexts. Consider simplifying with 'with', 'for', or 'of'.
  • "this same": Redundant expression. Consider deleting 'same'.
  • "for the purpose of": Wordy expression. Simplify by replacing with 'to' and an infinitive verb.
  • relative to: Wordy expression. Consider rephrasing with a more precise preposition.
  • "in general": Stock phrase. Use sparingly.
I pasted my troublesome phrases into Word. It didn't catch any of these. Pages' proofreading is one of the most thoughtful features I've seen in software.

Wednesday, May 12, 2010

Chrome download bar interface fail

I love Chrome, but it annoys me in one small, pedantic way: the download bar. Whenever a file is downloaded, a bar pops up at the bottom of the screen. The only way to close the bar is to click on a tiny button on it. There's no keyboard shortcut. There's no way to disable it. There's no way to make it disappear once a download is completed. I googled for a solution.

The top hit for "Chrome download bar" is "Removing the download bar?". Ouch.

Monday, May 10, 2010

Allow me to recommend TextExpander and Dropbox

I'm fond of TextExpander; some people rave about it. I think it's handy, I can type "ttel" and TextExpander turns that into my phone number; I have other snippets for my websites, email addresses, and I've imported some libraries with HTML tags and autocorrections for common typos. It's handy.

I have a byzantine, quintuple-redundant backup system, with a Time Machine backup in my lab, a clone of my hard drive at home, two daily Flash stick backups, and a Dropbox backup. Dropbox gives me 2 GB of storage for free; there are paid plans for more space, but I don't worry about that, I just use Dropbox to back up my most important files and settings. Dropbox is an application you can install on all of the computers you use, and it will sync a folder across the cloud, so you have access to all of your stuff everywhere. I just use it as an extra backup.

Anyway, today, I noticed that my TextExpander snippets had disappeared, I don't know what happened. I went to dropbox.com, found my TextExpander settings, clicked Previous Versions, picked a working copy of my settings from a couple of days ago, clicked Restore, and immediately TextExpander was working again. TextExpander is a handy program that gets bonus points for having an open way of storing its settings, so that it's easy to back up and throw around. I'm shocked by how well Dropbox's version control worked.

Tuesday, April 13, 2010

iWork Numbers Automator Actions to import text

I love iWork, especially Numbers; good golly, does Office suck on the Mac. iWork isn't up to speed, yet; notably, Numbers is horrible at importing text and formatting it into spreadsheet cells in a sensible way. Here are some OS X services that I made with Automator that are helpful for me.

As near as I can tell, the only way for Numbers to import plaintext table data is as a CSV file. The file needs to be comma-delimited, and ending in a .csv extension. I often want to grab data from the terminal, though. The Import CSV Text To Numbers Service takes selected comma delimited text and pops open a new Numbers document with it. The Import Whitespace Text To Numbers Service does the same, with whitespace delimited text. You can install these services by extracting them from the .zip files and moving them to your ~/Library/Services directory.

Note 1: For both of these Services, a scratch file is generated. A dialog box will pop up, asking to delete the scratch file. Only click OK once the file has finished loading.
Note 2: These Services operate on blocks of text, not text files; you can open a file and select the text you want imported to Numbers, that works fine.
Pedantic note on Import Whitespace Text To Numbers: This works via the sed command
sed -E 's/^[[:space:]]+//;s/[[:space:]]+/,/g'
which actually takes all blocks of whitespace and converts them to commas. The file is then saved as a .csv, and is opened by Numbers. This means that any commas in the source text will be treated as delimiters, as well.

Import CSV Text To Numbers
Import Whitespace Text To Numbers

Wednesday, January 20, 2010

control-z bg

I guess I've been writing simulations for half my life. I was eleven or twelve when I first started meddling with QBASIC. My dad would bring a laptop home from work, an old notebook with a monochrome screen and a trackball. Since it was a work computer, we weren't allowed to install any games on it, but it had QBASIC, so I figured I could write my own. It turns out that writing computer games isn't as fun as playing them, but I started programming, anyway; it's fun!

When I was sixteen, I started working at a particle accelerator lab with the Army Research Lab. It wasn't a huge Fermilab kind of thing, our accelerator was a small, linear thing. We'd shoot ion beams at materials to see what would happen. I wrote a little QBASIC program to help design ion beam sweep patterns that would leave even coatings.

Later, my boss wanted me to analyze some data from a simulation. I spent the summer learning C so that I could write code that would do all sorts of things with the data. It was my first time using Unix; I was using an old SGI box.

Unix is paralyzingly unintuitive, and this machine didn't have a neat desktop environment installed. It was running X and some sort of window manager, but not much else. I had to work mostly from the command line. A command line is a sort of typewriter way of interacting with the computer; you type a command and hit enter, and the computer types something, giving you the information you asked for, for example, and then you can type again. When you start a program that runs in a window, I was using an application called nedit, the computer locks the command line. I couldn't type anything else! I felt panicked! My boss taught me: hit control-z to interrupt the program. That stops the program, so you then use the command bg (for background) to start the process up again.

This is the sort of thing that most people never need to know, but that Unix users have to do every day; at the time, it seemed like I was doing really fancy geeky stuff.

My boss introduced me to other things, Unix and Mozilla (that was before it was Firefox).

In grad school, I've done computational research; I use fancy numerical methods to study how fluids interact with membranes on the micro-scale. I've written code to run on clusters of computers, I've re-worked a couple of things in the code that solve partial differential equations.

Today, I installed a program, VisIt; it makes pictures of simulation data. I mostly use programs I can start up by typing a few things, and leave them running on a server; I download the data and look at it with Matlab. VisIt popped up a little window. I hit control-z bg.
Blog Widget by LinkWithin