Often you generate a graph using Gnuplot or something, and export it as an eps. This eps is then included in your LaTeX document and processed using psfrag and pdflatex (see my other post). A fine method, however, journals generally like you to include the final figure as a pdf graphic. I have written a script that does exactly this, it takes your PSfrag commands, and the eps figure, and turns it into a pdf figure.

This blog post is a guide to the script, and explains both how to use it and how it works.

Overview
There are a few stages to the process, first the script constructs a LaTeX file. Then the script processes this LaTeX file, with all the replacements applied. Then it extracts the pdf figure as the output. Finally it cleans up all the temporary files created.Continue reading →

Like this:

The problem here is that you have an m3u playlist with your favourite songs in it. You want to put all the songs on your latest mp3 player. However, some of them are in the wrong formats and they are scattered all over your computer. You need some way of easily collecting them all together in one folder, with the playlist order preserved all in mp3 format.

This guide will explain how to write and use a bash script that helps you to do this. Continue reading →

Like this:

Normally when using ssh you need to type a long command into the command line, then type your remote user’s password.

This post is about how to set it up so that you don’t need to do all of this. First we’ll set up an ssh keypair, then we’ll set up the server to accept this key. We’ll then create an alias to quickly log in to the server.

Before doing the steps below, make sure you are logged in to the local machine with the user that you want to be able to access the remote machine. It is also helpful if the local machine has a sensible hostname set.

Like this:

When using scp or cp, special characters can break the file path. You get around this by escaping the special character.

Using cp you can use the normal method of escaping special characters, which is preceding it with a backslash. For example, a path with a space could be copied using:

cp photo.jpg My\ Pictures/photo.jpg

The remote path in scp doesn’t work escaping using this method. You need to escape the special characters using a double backslash. Using the same example, the My Photos folder would have its space escaped using:

scp photo.jpg "user@remotehost:/home/user/My\\ Photos/photo.jpg"

The double quotes are also important, the whole path with the special characters must be enclosed with double quotes.

Like this:

Why Use Dvorak?
We are talking about the Dvorak keyboard layout. However, there is no point in installing a different keyboard layout if you are not going to use it. If you have already made up your mind and want to get straight on with installing feel free to skip to the relevant section. The standard reasons cited for using Dvorak are:

Dvorak was designed with speed in mind.

Qwerty was designed to slow typists down to avoid collisions.

You get less RSI using Dvorak.

As far as I can tell, it is an urban legend that Qwerty was designed to slow typists. Dvorak was definitely designed however with the idea of minimising finger motion when typing English text. There have been studies done on this (potentially biased as it is a site for the Dvorak keyboard, but it looks fair). The most commonly used letters are all on the home row.

Like this:

Hello and welcome to my blog.
This is mostly how-to articles on Linux, LaTeX and other computer topics. I use Arch Linux with the KDE desktop daily, and use LaTeX for any documents I need to write. Along the way I have picked up many things about how to use them effectively. It will also include anything else that I am interested in or want to comment about.

I hope you find my posts useful.
However, all advice given anywhere on this blog is provided without any warranty. It is eminently sensible to verify everything before making changes to your computer.