Presentation, Article and Notes in one run using Beamer

Still using Powerpoint for your presentation? Consider using LaTeX with the Beamer package.
Tom Rutherford taught me how to build an efficient stream for a presentation or lecture:
  1. generate the presentation with beamer,
  2. generate the presentation as an article and
  3. clean up all the stuff
All this in one batch file. The presentation is projected on the big screen and the article is used for preparation and for notes, I use during my prepartation (I have a printout of the article next to my laptop during the presentation)
The batch (build.bat) file looks like this:
@echo off
pdflatex beamer
pdflatex beamer
pdflatex print
pdflatex print
del *.toc
del *.log
del *.out
del *.nav
del *.snm
del *.vrb
del *.synctex
del *.aux
cd auto
del *.*
rd auto /Q
and after finishing my slides, I just run it from my shell or my explorer.
The latex commands are run twice, so if there are citations, bibtex is run. I give a serie of lectures and for every lecture I have three files:
  1. lecture.tex:    all the slides to be presented
  2. beamer.tex:   the preamble for generating the lecture as beamer presentation
  3. print.tex:        the preamlbe for generating the lecture as article.
Beamer tex looks like this:
It gets the lecture.tex file as input and grabs the style.tex file for “styling” my presentation.
I added the following features.
Setting a directory for all my figures and for my style file:
I use import, so I can set a directory for all my figures (instead of having them in the same direcotry as my tex files). The directory is set in the lecture.tex file:

The style file resides in its own directory, so I do not have to replicate it and changes are easy done in just one file.
Comments not showing in my presentation, but in my article:
I use the package comment to add notes to my presentation. Beamer allows you to make notes, that will be shown as a parallel slide, so you can have your presentation projected and the other half on your notebook monitor (split screen). This seems to work fine on a Mac or under Linux, but is almost impossible on a Windows machine (there is ony very basis and not very satisfactorysolution called presenter-pdf). I just use the comment package that allows you to add notes that are printed in my article version of my presentation but do not show up in my beamer presentation. In beamer.tex I give the commend to not show the comments:
In print.tex I add the lines to include the comments:
A comment in the lecture.tex follows an \end{frame} command and could look like this:
In the article version, the comments are red and start with a bold “NOTES” above them, so I can concentrate on them, when I am presenting.
Size of graphics
I use the width option for included graphics, so figures also fit if the format of my paper in beamer (landscape) is changed to portrait (article). Example:  [width=0.8\textwidth].
Here you see the presentation:
And here the article format (in the right margin, you see the number of the lecture as well as the slide number).

Disable the insert key

I just got my new Lenovo notebook (T430s). Compared with the previous version of this laptop, one important change is the keyboard. Lenovo now favors the chiclet or island style “Precision” keyboard. No page up and down in the upper right corner and the delete key in the upper most right corner next to the insert key.
I never use the insert key and often hit it accidentally.
I looked for ways to disable the insert-key (I can’t remember I have ever used it in the past years). I found the following (taken from ):
Almost anyone who has used a wordprocessor has accidentally hit the Insert key and overwritten when they thought they were editing. This article describes a simple way to disable the Insert key on your keyboard.
Whenever you press a key, a windows message is created, which contains a key code that uniquely identifies the key pressed. Programmes (like Microsoft Word) look for keypress messages and take actions based on the key code in the message. By mapping the insert key press event to null, windows send a message containing null for the key code when the Insert key is pressed. Programmes receiving the message, therefore, do not perform the action associated with an insert key press event, freeing you from having to worry about overwriting things again.
  1. Go to Start → Run → regedit
  2. Go to HKLM\System\CurrentControlSet\Control\Keyboard Layout
  3. Right-click on the right half of the screen and choose New → Binary Value
  4. Name the new Value Scancode Map
  5. Enter 000000000000000002000000000052E000000000
  6. Close regedit
  7. Reboot.
Optional: you can take the Insert key off of your keyboard when done.
If you do this with Windows7 regedit, you have to enter the hex value in rows of 8 bytes, like this:
EDIT correction for the address
Value Data:0
0000    00 00 00 00 00 00 00 000
0008    02 00 00 00 00 00 52 E00
0010    00 00 00 00

Microsoft Office language packs for free

I have a German version of Office 2010 professional, but often, I wish I had the English version. If I am reading a book on Excel Pivot Tables in English it is not difficult, but a nuisance, to find the correct commands in the German version. Sometimes, I teach in English somewhere abroad, and then it also would be nice to have English commands in Excel, Word, etc. Or if I show something to a collegue, who has the English version installed, it is nice to use the same version.
Microsoft sells language packs (they are not expensive), but you can also download them for free. Here is a link I can now even use the Dutch version of Office, when I try to explain my mother (81 years old), how to do something in Outlook…

Outlining in Gams-Mode: Org-Mode for Gams

The new version of Gams-mode has a new feature that I like very much. It allows you to use an outline-mode in your gams files. It is called org-mode, which is a major mode in Emacs.
You can outline your Gams file using sections, subsections, etc. You define sections using the following notation:
or for subsections
       *@@, *@@@, etc.
Let us have a look at the file org-minor-mode.gms. This file can be found in your gams-mode directory. This file contains all the help for gams-mode. All the help topics have a section title that starts with *@.
Here is an overview of the contents of this file:
This is great! Now, instead of scrolling or searching, you can just cycle through the different display possibilities using Shift-Tab (org-global-cycle), or if you want to see or hide the content of a certain section, hit Tab (org-cycle).
Here, I used Tab to show the subsections of the section “Process handling”
And if I hit Tab again on the first subsection, it shows the contents :

Todo's from Everywhere

I use Emacs for taking notes and project management using Remember-Mode and Org-Mode (see my blog entries Capturing and More. However, if I am working in Excel or reading a pdf , More and I want to make a note or I suddenly have a thought about a feature that I want to add to my model, I have to jump to Emacs,hit some keys, enter the note or the task and navigate back to the program I was working in.
Not much of a hassle, but inefficient as it really interrupts my work flow too much.
No problem, if you use some macro scripting tool (for example winautomation or autohotkey) it is rather easy.
Here is the macro in Winautomation:
In step 1 the macro saves the location of the active window (for example Excel). In the next step it jumps to Emacs, followed by sending the keys C-c r  which asks me for a template:
I then choose the template (for example t for ToDo) and enter the information. I quit with C-c C-c and my entry is saved. Then I hit Ctrl-g (which is the Emacs command for “break” and in this case does nothing and if I change my mind and don’t want to save the note or tasks it stops the remember mode). This keystroke combination is used as a trigger for the Winautomation macro to return to the macro. In the last step the focus jumps back to the program I was working with.
The macro is started when I hit the hokey “Ctrl-Shift+F11”, which I defined in Winautomation.
As I have the professional version of Winautomation, I can generate an executable and send it to you. Just mail me at renger(at)
The only thing you have to do, is add a keyboard trigger like Win+…
For this you can use free programs like winkey (on Win32)  or HotkeyBind (I did not test these programs).