I use the free software AutoHotkey (AHK) for automation of many things. One of those things is generating headings for my project file. I developed a simple AHK-script that asks me for the project name, the topic and then inserts the heading with additional information like my name, my E-mail address and a keyword for subversion.
The script is quite simple and I have adopted it for headings for several project files (tex, R and gams). The only difference being the characters used to comment out a line.
Here is the script
Emacs has a nice new mode called electric-operator developed by David Spepherd. It helps when you write code by formatting all operators in a predefined way. For example, in R it adds spaces around the operator signs, when you write 1+1, this is automatically converted into 1 + 1.
You can define your own way of formatting for other modes. For gams-mode you add the following to your .emacs fileLisp
A good practice in modeling is to place information related to the project your are working on, the subject, the data and your personal information like E-mail address at the top of your file. In Emacs you can define skeleton functions that will prompt for the information and put it in the file. Below is an example for a file with as comment symbol “**: (the $Id: $ is for my version control system, that automatically will add the information on the last commit in this line).
Below you see how to make a function using skeleton. As I don’t … Read the rest “Using file templates in Emacs”
In an earlier post I wrote on how to use R to produce all kind of figures and tables for a LaTeX paper. This time, I will show, how to automate this process even more.
My work flow consists of a batch file, that runs my model, sends the results to R, produces my tables and figures and sends these to my paper: If I change my model, I just have to run this batch file, and the results in my paper are automatically adjusted. One smaller problem is that I often write in my text on a specific value … Read the rest “Automating writing LaTeX papers even further”
I have written about using org-mode in gams-mode in an earlier post. Gams-mode lets you structure your gams file using headings and subheadings. These headings can be (partially) collapsed. The structure of your file could look like this:
You can now cycle through the structure using Shift-Tab. Tab opens a section:
This is a great help in complex files.
Gams-mode has another great outline feature for the listing file. Instead of putting a normal comment with a “*” in front, one writes a display statement that starts with a “@” (see the code above). We now see a nice heading … Read the rest “Using org-mode in outline-mode”