Skip to content

LaTeX-ing again

January 2, 2010
tags: ,

Here I am, sitting indoors during a snowstorm, blundering my way through my raytracing script.  Ah, Snell’s law and optics.  What fun!  Anyhow, I realized that it was the perfect opportunity to practice some LaTeX skills.  I’ll be able to describe the theory of what I’m doing in my script.  Not that it’s anything complicated, but it’s enough for me to be able to practice some TeX-style math notation.  Sweet.

Here’s what I’ve got so far, using Emacs.  Easy!  No math yet though.

\title{Raytrace script - how it works}
\author{M. Weirathmueller}
\date{1 January 2010}

This document is meant to accompany the my script, in an attempt to describe the theory behind what it's doing.

The main idea is to read two sound speed profiles, and to compare depths computed by a multibeam echosounder for these profiles.



(incidentally – I just discovered that WordPress source code posting supports LaTeX – fun!)

It was also the first time I’d ever compiled a LaTeX file from the command line. I know, I know, it’s no big deal. But it was new for me!

Created my PDF like this:

pdflatex raytrace.tex

Then looked at it in my PDF viewer like this:

gnome-open raytrace.pdf

gnome-open just opens the file with the default program for that extension. Also – I added an alias to my .bashrc file so that just typing “g file.pdf” works like “gnome-open file.pdf”.

2 Comments leave one →
  1. psykotedy permalink
    January 8, 2010 10:05 am

    This is a total n00b question, but is there a particular document that you would recommend to get off the ground with (La)TeX?

  2. michellejw permalink*
    January 8, 2010 10:19 am

    Well, it sort of depends on what you want to do. If you just want a document that will run through LaTeX and produce a PDF file, you can just copy the text of the LaTeX file above into a text document. If you run it either through the command line, or through a LaTeX editor program, you should get some output (this is satisfying and also encouraging). You can then play around with changing content, and adding things like figures, equations, tables, etc. Have a look at the documentation here:
    It should help you get started. Good luck!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: