How to use custom colours in LaTeX

I will post short minimum working examples (MWEs) of minimal LaTeX documents, showing a certain feature in action. Though the well-maintained LaTeX Wikibook is a much more extensive resource than a collection of such examples could ever be, they show directly compilable examples compared to isolated snippets.

I start simple: custom text colours, using different colour models. Shown here are RGB (0-255) and HTML (00-FF) style definitions. The text shows two different ways to access them. Bonus: these colours can be used in TikZ as well.

latex-xcolors

\documentclass{article}
\usepackage{xcolor}
\definecolor{cool}{RGB}{0, 110, 220}
\definecolor{heat}{RGB}{240, 120, 40}
\definecolor{pink}{HTML}{FF00FF}
\begin{document}
I am some \textcolor{heat}{really hot}, 
though \textcolor{cool}{also cold} text.
{\color{pink}Bright colors} are discouraged.
\end{document}

Stikked – a self-hosted open source alternative to Pastebin

stikked-create-new-paste-screenshot

Ever wanted to share or loosely collaborate on a document, but did not feel save enough to put it on a public text hosting service like Pastebin?

Thanks to Ben McRedmond and Claude Hole, there is Stikked. It is a small text pasting script. It needs a webserver with PHP 5 and a MySQL database. Installation is manual, but easy and well documented. Continue reading “Stikked – a self-hosted open source alternative to Pastebin”

How to convert video to MPEG 422 HD format for import in Lightworks Free

The best freely available video editing software for Windows is Lightworks (version 11.0.1). While it is free (as in beer), it has very restricted selection of import video formats at the moment. My camera (Canon EOS D550) delivers H.264 encoded MOV files, which—without other software—would require a 50 €/year codec license if you want to import them directly. Fortunately, I found a way to import my videos… Continue reading “How to convert video to MPEG 422 HD format for import in Lightworks Free”

Optimise nonlinear functions using Matlab or Octave

Contour plot of a test function. In the middle its minimum is shown. White triangles are spread throughout the picture, denoting the locations of the initial simplices.

For my diploma thesis I needed an easy-to-use optimisation algorithm which could minimise a given function. I had access to Matlab, but surprisingly, none of the supplied optimisation functions seemed to satisfy my needs: I wanted to globally minimise a non-linear function within boundaries without using gradients.

So I did a little research and found a Globalized Nelder-Mead method (PDF), which is a tuned version of the good old downhill simplex algorithm. Then I implemented it as a Matlab function. By the way: the function also works fine with Octave. Continue reading “Optimise nonlinear functions using Matlab or Octave”

Mathematical Formulas in Microsoft Word

Formula typesetting can be a tedious work in most typewriter software. Word (here: Version 2003) is no excuse. When you are — like me — forced to use this software for writing technical reports containing formulas, then this tip might be useful for you. The “typical” way of writing formulas is creating formula objects which can be edited by a double click on them. However, as soon as a document contains many of those objects, their handling becomes uncomfortable because they don’t behave like their surrounding text.

But there is another, almost perfectly hidden feature which allows to typeset easy formulas as real text which respects text formatting styles: Equation fields. Continue reading “Mathematical Formulas in Microsoft Word”

How to use custom-made Themes under Windows XP/Vista/7

Deskmodding is the art or the act of customizing the appearance of the graphical user interface. Usually this is done on the level of the operating system, but there are also single applications that allow to modify their appearance by so-called skins. For the operating system Windows it is not possible to easily change the default appearance as the selection of themes that can be selected is limited to a handful of designs like the classic Windows interface, Luna for Windows XP and Aero since Vista. Windows Media Center Edition brought a revamped version of Luna which became very popular.

But apart from those designs, Windows does not permit to select user-made themes. This is due to a check in the file uxtheme.dll in the system32 folder. There are dozens of downloads of patches that promise to replace the file with a patched version that permits so select whatever style one prefers. But it is easy to download the wrong patch or even get a virus on one’s computer this way. But there is an alternative: UxStyle. Continue reading “How to use custom-made Themes under Windows XP/Vista/7”

Using Funambol to sync Thunderbird(s) and Windows Mobile phone

This is an article explaining how to synchronise one calendar (+tasks) and one address book of two PCs with Thunderbird (Lightning plugin for calendar) and a Windows Mobile phone. It is based on the open source synchronisation server Funambol and needs one of the computers to act as a server. The advantage to other solutions I tried (like FinchSync or the Addressbooks Synchroniser add-on) is that it covers all synchronisations even between different device types.

One disadvantage of my how-to is that the data which is synchronised is transmitted without encryption. However, it is possible to somehow use SSL encryption for the data transfer, but so far I am afraid of the effort to reconfigure all again now that it works. Another disadvantage concerns the fact that currently only one calendar and one address book can be synchronised. While this restriction does not bother me now, it might render this solution useless for you. Continue reading “Using Funambol to sync Thunderbird(s) and Windows Mobile phone”