# The world according to Robin

A techno-related blog with tips and tricks, and the occasional rave about… anything!

## Add images or text to a pdf

A common situation is the need to add/overlay images, text, or whatever to an existing pdf called original.pdf, for example your signature. In Linux, this is quite simple by using a technique where you stamp one pdf onto another. I will use Ubuntu to demonstrate:

1. Create a pdf called stamp.pdf with the stuff you want to add, for example using LibreOffice Writer and exporting to pdf. Try to position your graphics approximately in the correct positions for overlaying the original pdf. You must have the same orientation (landscape/portrait) in both documents. The combined pdf will be called new.pdf.
2. Install pdftk:
sudo apt-get install pdftk
3. Run the following command:
pdftk original.pdf stamp stamp.pdf output new.pdf
4. Repeat from Step 1 with different positions of your signature, text, whatever until you are happy.

## Veusz: Scientific plots and graphs

I have tried various tools for making scientific plots and graphs in my papers and have almost exclusively used Matlab, mainly because of its capabilities of exporting to eps for integration in LaTeX. Recently, I was challenged with a large dataset contained in a LibreOffice Calc spreadsheet. I wanted to be able to plot various interactions in the data and easy generate several plots from the same dataset. The software package Veusz (pronounced “views”) came to the rescue: http://home.gna.org/veusz/

The programme is written in python, is crossplatform, and uses PyQt and numpy to make its plots. The main features I enjoyed when creating the figures for my paper were:

• Export to numerous formats, including pdf, eps, svg, etc.
• Dataset creation and, importantly, manipulation (statistics such as min, max, avg, etc.)
• Easy import from spreadsheets by first exporting to CSV and then importing to Veusz
• Nice tree structure for sorting and handling several figures at the same time
• Full control and tailoring of colours, symbols, sizes, axes, etc.
• Everything is stored in a single human-readable text file containing the generated python code (Veusz is basically just a frontend to a list of python commands)

I am very inclined to use this programme for future scientific plots and graphs.

See the website for screenshots and example plots.

## Tool for generating LaTeX tables

Tables in LaTeX can be difficult to work with, given that LaTeX code is usually treated in an ordinary text editor without spreadsheet capabilities. One solution I have found to be very helpful, is this online LaTeX table generator: http://www.tablesgenerator.com/latex_tables.

You can edit a table directly in your browser, copy and paste from a spreadsheet such as LibreOffice Calc, or import text files in CSV format. The tool allows you to add a caption and label, centering or scaling the table, add borders and grid, use the booktabs package (recommended), and select the alignment of columns.

After making your choices, the tool will generate a nicely formatted table code for you to paste into your LaTeX document or save it for later use.

## Write, edit, and publish WordPress blog posts from an Android device

To enable writing, editing, and publishing WordPress blog posts from an Android device,  just install the WordPress app from Google Play.

You can read more here: WordPress for Android blog

Screenshot:

Posted from WordPress for Android

## Cannot add hyperlinks or change between Visual and Text in WordPress blog editor

After an upgrade to WordPress 3.5, I could not add hyperlinks when writing a blog post, nor could a change to the Text editor from the Visual editor. It turns out that my theme, Arjuna X, somehow breaks this functionality. To fix it, see this blog post:

http://wordpress.org/support/topic/arjuna-x-breaks-wordpress-35/page/2?replies=44#post-3708545

## Font/theme/window decoration problems after installing multiple Ubuntu desktop environments

After installing Ubuntu, Kubuntu, Edubuntu, etc. in parallel on my laptop, my Opera browser started misbehaving when logged in using the Ubuntu desktop environment. There was a problem with rendering, including the closing of tabs leaving ghostly after-images, etc.However, it worked fine when using the KDE Plasma environment in Kubuntu. It took me a long time to work out how to fix it. Basically, the problem is related to conflicts between gtk and kde applications, and the correct theme must be set in the desktop environment. I found the solution on this website:

http://www.gefoo.org/generalfoo/2012/03/25/gtk-using-ugly-theme-in-kde-4-8-1-on-ubuntu-11-10-oneiric/

I ran the following commands to install the gtk-theme-switch application and changed the theme to the Ubuntu 13.04 default theme, Adwaita. Suddenly, my Opera browser was working fine again!

sudo apt-get install gtk-theme-switch gtk2-engines-oxygen
gtk-theme-switch

## A letter from Ola Bauer

In final year of high school at Fagerlia vgs. AF I did my Norwegian final project on my favourite author, the Norwegian novelist and playwright Ola Bauer. During my research, I wrote him a letter asking him numerous questions to which he replied by the letter shown below. Of course I called him up and we had a very long and interesting talk.

Unfortunately, Bauer got cancer the following spring and died one and a half year later, only 55 years old.

## Teaching teaching and understanding understanding

While taking a course on engineering didactics, I came across an interesting movie which illustrates John Biggs’ model about constructive alignment in education. In constructive alignment, we start with the outcomes we intend students to learn, and align teaching and assessment to those outcomes. The movie (19 mins) has been split into three parts on YouTube:

You can read more about John Biggs on Wikipedia or at his homepage.

## Speed dial entries lost after Opera upgrade

After upgrading to Opera 11.11, I found that all my speed dial entries were gone. Opera Link was enabled and working fine but the speed dial entries were not syncing.

Whilst this problem apparently can occur after upgrading Opera, it can also happen if you (accidentally) delete the speeddial.ini file.

Solution:

Open opera:config#OperaSync and set both

to 0 (zero). Then click Save and restart Opera.

## Correct phasor angle symbol in LaTeX

The default phasor angle symbol in LaTeX is obtained by

\angle F(z)


which produces

However, to get the bottom leg of the angle symbol to underline the entire quantity you want to take the angle of, you must enable the steinmetz package in the preamble:

 \usepackage{steinmetz}

You can then use the  \phase command to get correct usage of the phasor angle symbol:


\text{Phasor angle } \phase{F(z)} \\