Using spot-color in LaTeX for print-post-processing

I like to use LaTeX to produce nice looking PDF files for printing. So far that has worked pretty well, but in a recent project I ran into issues, so I want to document the solution here. In some printing jobs, there is post-processing involved e.g. when cutting stickers, when putting gold-foil over certain parts of the design or when embossing. In that case, the files need to follow a certain scheme that this areas can be correctly recognized.

In my use-case, the cut-contour lines of a sheet of stickers needed to be given as a separate colour with a certain name. All solutions that I found, where tailored towards proprietary PDF creators like the Adobe Suite or something in this direction. Even harder, if you search for the german words „Volltonfarbe“ in combination with „Latex“ (or even „LaTeX“), you will end up with results offering to buy latex based paint which is not very helpful. „Volltonfarbe“ in this context translates to „spot-color“ and it is very well possible to use spot colors in a LaTeX document.


Security 101 – Security through Obscurity

This article is the second post on security terms explained in easy, every-day-life examples. The first post can be found here.

We meet our friends Alice and Bob again, who send each other letters and Eve, who doesn’t like what they have. Eve therefore tries to have a look in their letters, trying to find out secrets about Alice and or Bob to gain advantage she can use against them.

Let’s imagine following scenario: Bob has bought a new lock to his mailbox. This lock is advertised as the ultimate smart lock, with machine learning, blockchain and AI and has a simple button that recognises the user. Unfortunately Bob ordered the lock on (reference for readers from the future: back in 2021, this was an internet shopping platform for cheap stuff, with often surprisingly bad outcome). The lock arrives and exactly as the description states, consists of only one single black button instead of a keyhole. Bob installs the lock and is very happy. Each day, he simply presses the button and the mailbox opens.


Figment – Not just a kid’s game

I had some free time yesterday and saw a new game on the free Stadia Pro section, so I gave it a try. And boy was I surprised. The game is called Figment and takes place in the mind of a person, where you stroll trough different areas of the brain. The protagonist is a clumsy little something who would rather enjoy a cold drink than being controlled by you. Together with an overly optimistic bird, the duo has to chase down a sinister enemy, solving riddles on the way.


Security 101 – Man in the middle attack

This post is the first in a short series of articles about essential concepts in IT security to explain common security flaws in simple, everyday-life terms. This idea developed during an online presentation about IT security in the medical sector.


A man in the middle (MITM) scenario happens, when an unexpected party becomes part of an exchange between to individuals or entities. Let us imagine two friends somewhere in the world are good friends and are writing each other letters from time to time. To make things easier, we will name the two people Alice and Bob, which is a very common choice in information security. When Alice sends a letter to Bob, Bob can read this letter and respond to it by writing his own letter back to Alice. At some point, a malicious third party becomes interested in the communication between Alice and Bob. Let’s stick to common naming and call that malicious party „Eve“ (from eavesdropping). Eve is interested in the communication between Alice and Bob because she hopes to find information that she can use either to gain a personal advantage or to inflict harm on Alice or Bob. Eve decides to wait in front of the house of Bob every morning until the postman arrives and steal the letters from Bob’s mailbox. To stay undetected, she opens the letters (probably using hot steam), reads them, reseals the envelope and puts the letter back into Bob’s mailbox. This scenario works well for letters Bob receives from Alice, but is quite hard for letters Bob sends to Alice. In order to have all information on the exchange, Eve would also need access to the mail Bob sends out to Alice.


Saving 3D Tiff stacks in Python

Reading and writing image data is a recurring task, and I was wondering, why reading and writing image sequences that are saved in one single *.tiff file are not a standard function in the imaging libraries I regularly use (such as OpenCV, libtiff, Pillow etc.).

Reading 3D tiff files is easy, e.g. with OpenCV

import cv2

res_tuple = cv2.imreadmulti(path_to_file, flags = cv2.IMREAD_UNCHANGED)

will do the job. However, when trying to save the resulting array back to a file, it will fail. A working filesave for 3D tiff stacks could e.g. look like this:

from skimage.external import tifffile as tif
import numpy as np

image = np.ones((100,10,10), dtype=np.uint16)
tif.imsave('test.tif', image)

Of course the tifffile library will do that as well, however, I find it more convenient to have only scikit-image installed and let it call the tifffile as external library.

Getting Started with Python + Anaconda + Spyder

In the last few years I have done quite some programming work with Python and started to love both the Anaconda distribution (I might do another blog-post on that topic) and the Spyder IDE. If you are very new to Python and programming, this might be a little overkill, but it will be a very clean basis to start with and no drama, once there is the need to update or upgrade. So follow these steps if you want to get a first quick-start into Python with using the Spyder IDE and Anaconda.