Some programs I’ve written, and some writing on code that might be generally useful.
tex2sym.m is a function for converting a string with LaTeX like markup into corresponding symbol designators for gnuplot. Note that if you use double quotes octave will eat your backslashes. In double quoted strings octave interprets ‘\’ as the escape character, and so it needs to be escaped itself with a backslash, like this: “\\”.
octave:1> tex2sym('\nabla \cdot E = \rho / \epsilon_0')
ans = {/Symbol \321} {/Symbol \327} E = {/Symbol r} / {/Symbol e}_0
tex_out.m is a function that takes a matrix, and a string, name, and outputs the matrix to a texfile name.tex which is suitable to include in a LaTeX file with the command \input{name.tex}, in the math environment.
octave:1>tex_out(magic(3), "magic")
Output is written to the file magic.tex:
\begin{array}{ccc}
\mathtt{8.000} & \mathtt{1.000} & \mathtt{6.000} \\
\mathtt{3.000} & \mathtt{5.000} & \mathtt{7.000} \\
\mathtt{4.000} & \mathtt{9.000} & \mathtt{2.000} \\
\end{array}
The style I made to typeset my resume. Feel free to email me if you like the style, and want help making it work, or making modifications. I just figured out how to store “data” (strings) in \def statements, and I’m slowly figuring out how to use that data in macros and environments, much like the \author{Jonathan C. Shea} statement LaTeX users should be familiar with. This system should be much cleaner and more intuitive than the “many arguments” technique I used previously, but it is still a work in progress. It is likely to remain as much until after my thesis is done, but not longer than until I’m applying for jobs.
Great tips on pdfs and science with TeX
Sometimes LaTeX stabs you in the back. I don’t pretend to understand why it does this. Sometimes you can convince it to work by deleting your .tmp and .aux file, and then doing your pdftex, bibtex, pdftex, pdftex dance, or whatever variant you make use of.
The native date-time format for IDL is Julian Day
Numer. Julian Day Number is the amount of time in days since January 1, 4713 B.C.E., and is represented as a double precession float in IDL. Noon on New Years day in 2007 is JDN 2454102.0. I recommend you convert all date-times you’ll be working with in IDL to the native JDN format as soon as they are imported. If you have a function that wants a different date format, for example cxform, then write a wrapper for it so that you can continue to use JDN. Also, always call julday(Month,Day,Year,Hour,Minute,Second) with all 6 arguments (note also the bizarre order). When called with 3 arguments julday(Month,Day,Year) returns the same value as julday(Month,Day,Year,12,0,0), which is midnight of day after the day you were likely thinking of.
When using the FSC_Color() in David Fannings wonderful color management library to make PostScript files, be sure to declare Set_Plot, 'PS' before loading colors.
Coyote’s Guide to IDL Programming
CXFORM: Geocentric coordinate transformations
I use these great software applications every day, and I recommend that you do too.
See here for my copyright statement.