Software & Manuals

How to Typeset Equations in LaTeX (New Version 3.2!)

LaTeX is a very powerful tool for typesetting mathematical expressions. However, when looking at a typical document one often finds that mathematical equations that are too long to fit on one line or that consist of several equations in one block are often only poorly typeset in spite of the power of LaTeX.

This short introduction tries to show how a nice typesetting is done easily and efficiently. It includes an introduction to the less known, but very powerful tool "IEEEeqnarray".

Download:

More information about IEEEtran can be found on Michael Shell's website. An easy-to-read and very informative manual about LaTeX is The Not So Short Introduction to LaTeX2e by Tobias Oetiker.


addrbook: Address-Management with Perl and LaTeX (New Version 6.5!)

Most available address-management tools have either too many or too few features for me. I have therefore started writing a small (partially LaTeX-based) Perl-script that takes care of my addresses: I keep an ASCII-file with the necessary information (name, address, telephone, email, birthday, remarks). The script then generates (via LaTeX) a printable version that I can carry with me. The advantages are obvious:

  • in a common address booklet with hand-written entries space is always too limited in some parts of the alphabet, while in other parts most entries are empty...;
  • if I lose my address-book, I just print it out again;
  • I don't need any computer, battery or what-so-ever to check addresses, however,
  • if I am online, I can search for addresses electronically;
  • I have added a lot of small additional features like
    • automatic alphabetical ordering
    • sub-groups of people (e.g., friends, business relations, emergency numbers, etc.)
    • listing of birthdates
    • an automatic birthday reminder e-mail
    • a web-interface for online search of your addresses! This can be included into your homepage as shown for example here.
    • The most recent feature is a calendar reminder system: either birthdates or general calendar entries (from a different data-file that contains calendar entries instead of address entries) will be sent by e-mail at the corresponding day as reminder!
Here you can have a look at

System Requirements: Any Unix-flavored system or Mac OS X with working Perl and LaTeX. For usage as (birthday or general) reminder system and for electronic search of entries (including the web-based version) no LaTeX is needed.

Download:

The program is freeware, but I would be very happy if you let me know () in case you consider using it.

If you want to be informed about updates, please send me an email, I will put you on my mailing list (don't worry, you won't get many emails if you do so!).


Link to my personal address book (password needed)


afptunnel: Secure AFP-Connections (Apple File Protocol) via SSH Tunnel

System Requirements: Apple computer running Mac OS X 10.4 or 10.5 (both tested) or 10.3 (not tested, but I'm pretty sure it works as well).

Problem: You are using your laptop (or another computer) away from home and would like to access your files at home. Apple offers the convenient AFP connection ("Connect to Server..." or command-K). However, if you don't have the Mac OS X Server version there is no way to make this connection secure, i.e., everything that is transmitted over the Internet is clear-text, including your login and password! Furthermore, you have to open your computer at home to the world which includes a guest-access. While the guest-access is restricted, of course, you still might feel uncomfortable with it, particularly if you are sure that you actually don't need it.

Solution: Open a SSH connection to your home computer (the remote computer) and then pipe your standard AFP connection through this SSH tunnel. Unfortunately, the commands to do so are very UNIX-like and cryptic. I have therefore written a small shell-script that will do everything for you. You only need to follow the following steps:

  • Start the terminal and type "afptunnel"
  • Provide your password when prompted
  • The normal "Connect to Server..."-dialog appears: log in as usual
  • The connection you establish is both secure and compressed, i.e., you even save bandwidth!
  • When you have finished, unmount your files by clicking on the eject button or by dragging it to the trash
  • Press enter in the terminal to disconnect the SSH tunnel.

Installation:

  • Download afptunnel (version 2.2, December 2008) and decompress it.
  • Put it anywhere you like, e.g., into ~/bin/, and make sure that the executable bits are set ("chmod a+x ~/bin/afptunnel")
  • Edit the file "afptunnel" and change the value of the variable "TARGET_HOST" to match the IP-address of your home computer
  • On your remote computer (at home) open the System Preferences:
    • Sharing->activate Personal File Sharing
    • Sharing->activate Remote Login
  • If you want to disable the guest-access (and any other access that does not use the secure SSH connection), you need to setup your firewall to block Port 548. This way the "Personal File Sharing" Service is blocked from outside and only available within your computer. Unfortunately, you cannot edit the OS X built-in firewall to do exactly this while Personal File Sharing is active. You need another interface to the firewall. A possible solution is the shareware tool Flying Buttress. A standard setting would be, e.g., about as follows:
    • Outgoing: Allow
    • Incoming: Deny
    • Remote Login (SSH): Allow TCP from Internet (any Port) to MyComputer (Port 22)
    With such a setup you actually block everything apart from SSH.
    Another possibility is to manage the firewall manually as described in Exploring the Mac OS X Firewall.

For Advanced Users: For more options of afptunnel type "afptunnel -h".


mailtunnel: Sending Mails If You Don't Have an SMTP Server

System Requirements: Any UNIX-like system like Mac OS X.

Problem: You are using your laptop abroad and would like to send some email. Usually you then get into problems because you either

  • don't know the SMTP server of the net-access you are using,
  • there is no SMTP server on the net-access you are using, or
  • you don't trust the SMTP server of the net-access you are using.

Solution: Open a SSH connection to your home computer (the remote computer) and then relay your mails via your home computer to your usual SMTP server at home. This way your mails look like being sent from home, your mails are securely sent through the unknown net-access you are using, and your mails are even compressed in case your net-access is slow! You only need to follow the following steps:

  • Start the terminal and type "mailtunnel"
  • Provide your password when prompted
  • Tell your mail-program to use "localhost" at port 1025 as SMTP server
  • When you have finished, quit your mail program and press enter in the terminal to disconnect the SSH tunnel.

Installation:

  • Download mailtunnel (version 1.3, December 2008) and decompress it.
  • Put it anywhere you like, e.g., into ~/bin/, and make sure that the executable bits are set ("chmod a+x ~/bin/mailtunnel")
  • Edit the file "mailtunnel" and change the value of the variable "TARGET_HOST" to match the IP-address of your home computer and the value of the variable "SMTP_HOST" to match the IP-address of your usual SMTP server at home
  • On your remote computer (at home) open the System Preferences->Sharing->activate Remote Login

For Advanced Users: For more options of mailtunnel type "mailtunnel -h".


GnuPG: A Mini How-To

I have finally updated my PGP-Page to the safer and nicer implementation of Gnu! I hope it is useful...
GnuPG for daily use: a mini How-To


Various Useful Shell-Scripts

Installation: To install any of these scripts, download the script, decompress it, and put it anywhere you like, e.g., into ~/bin/. Then make sure that the executable flags are set (chmod a+x script-name).

Usage: Simply type the name of the script into a terminal.

timer: A Simple Stopwatch in the Terminal

I sometimes need to have a simple stopwatch or timer (version 3.1, November 2008) handy, so I wrote this small Perl-script. Maybe someone else might find it useful, too...
Requirements: Your perl-system needs to have the package perl-package Term::ReadKey installed.

watchdog

The script watchdog (version 1.1, October 2008) regularly checks a file and informs by email if the file has been modified. This is done either once, or continuously until the file is renamed or deleted.

stuffzeros New Version!

When exporting photos from iPhoto, the numbering system is not UNIX-like: they are called photo-1.jpg, photo-2.jpg, ..., photo-10.jpg, etc. This way the numbering is not in alphabetical order which can cause problems with other programs. The script stuffzeros (version 3.2, June 2009) automatically corrects this. It will add zeros in front of the numbers so that the files afterwards are named photo-01.jpg, photo-02.jpg, ..., photo-10.jpg, etc.

suffixadd

The script suffixadd (version 2.1, October 2008) adds a suffix to all files starting with a particular string.

multicopy

The script multicopy (version 2.1, October 2008) copies all files starting with a certain string to a new file with a new name, preserving the original ending of the filename.

multimove

The script multimove (version 2.1, October 2008) renames all files starting with a certain string, preserving the original ending of the filename.

mp3move New Version!

The script mp3move (version 4.1, April 2009) is a script that I wrote when I needed to arrange the files on a MP3-CD: the script renames all files in the current diretory as follows: firstly a given number of letters is removed from the filename starting at a given position (e.g., removing an old counting), then a new consecutive numbering is added in place of the removed letters. The numbering starts at a given point and has a fixed number of positions.

psnupsmart

The script psnupsmart (version 1.0, March 2004) rearranges the pages of a postscript-file: two pages are put onto one page in such a way that the odd page numbers are on the right hand side like in an open book.
Requirements: This script requires psnup and psselect to be installed on your system.


-||-   _|_ _|_     /    __|__   Stefan M. Moser
[-]     --__|__   /__\    /__   Associate Professor at National Chiao
_|_     -- --|-    _     /  /   Tung University (NCTU), Hsinchu, Taiwan
/ \     []  \|    |_|   / \/    Web: http://moser.cm.nctu.edu.tw/


Last modified: Mon Feb 15 09:16:39 UTC+8 2010