Sander Leemans

Latex: BPMN in Tikz

Drawing with Tikz enables consistently styled models. With this Tikz-library, you can draw BPMN elements easily. It is complete up to the elements covered in the courses I teach.

The tikz-bpmn.sty file, as well as a manual.

Tech: OBS & Launchpad

To improve the looks of a webcam on Zoom, one can use the free Open Broadcaster Software (OBS). Different scenes can be used to show your webcam, desktop or a combination of both, and logo overlays are easy as well.

It takes just a few steps to get started on Ubuntu 20.10:
  1. Install OBS
    sudo apt install obs-studio
  2. Set up some scenes: you can include a webcam (hint: add your webcam to a separate scene and reuse that scene, as a webcam can only be in one scene), screen capture, videos, images, ...
  3. Install OBS-v4l2sink, which creates a virtual webcam. I had to download this plug-in and compile it, but this was not hard using the steps on the plug-in's Github page.
  4. Create a virtual webcam, by running once every boot:
    sudo modprobe v4l2loopback video_nr=10 card_label="OBS Video Source" exclusive_caps
  5. Open OBS and select the menu entry "Tools" > "V4L2 Video Output" and choose "/dev/video10" and for video format "YUY2".
  6. Start Zoom, Skype or .... Many programs check for new webcams only on start-up, so you might have to restart it.
  7. Set up a call and select the webcam "OBS Video Source".
Now, your OBS output will be a webcam in Zoom or Skype, and shown to the others in the call. No more "can you see my screen?" and no more half-working virtual backgrounds where your hair disappears in the background.

To switch between scenes, you can set up hotkeys, however for AUD 60, I managed to get my hands on a Novation Launchpad Mini, which is a 9x9 grid of lit buttons, that works via the Midi protocol over USB. I wanted to use this to switch between scenes in OBS, such that I don't have to manually set global keyboard shortcuts press multiple buttons on my keyboard:

  1. Install OBS-Websocket to allow Websocket connections to OBS (releases are available; for Ubuntu 20.10 you'll need the 4.7 .deb version)
  2. Open OBS and select the menu entry "Tools" > "WebSockets Server Settings" and disable authentication.
  3. Download a Java program that I wrote (source) that glues together OBS and the Launchpad. Start OBS and connect the Launchpad before starting this Java program, and it will keep track of the scenes in OBS, lit up selected buttons on the Launchpad, and if you press that button, OBS will switch to the respective scene.

    The Java program uses an OBS-websocket library for Java, and should be cross platform.

  4. To make the whole set-up easy to start and to shut down, we can use a small bash script:
    sudo modprobe v4l2loopback video_nr=10 card_label="OBS Video Source" exclusive_caps
    			#enable the virtual webcam
    	    obs --scene "Intro" #start OBS with the mentioned scene selected
    	    pkill -f "java -jar OBSLaunchpad.jar" #after closing OBS, kill the Java program
    	    sleep 1 #give the Java program a chance to shut down
    	    #find Launchpad hardware port
    	    DEVICE="Launchpad Mini MIDI 1"
    	    while IFS=' ' read dir dev name; do
    		case "$name" in
    		    $DEVICE ) 
    	    done <<< "$(amidi -l)"    
    	    amidi -p $PORT -S B00000 #turn all LEDs off
    	} & 
    	sleep 1 #give OBS a chance to start the websocket server
    	java -jar OBSLaunchpad.jar #start the Java program
  5. If you want to add functions to the Java program, the Launchpad's developers' reference is a handy resource. Please let me know if you've added some cool extension :)
Ever tried to do this on Windows?

Latex: reduce line breaks in references

If you want to save some serious space and you don't care about readers easily looking up references, you could remove the line breaks from the references as follows:
(adapted from Stackexchange)

Latex: ORCID symbol

Orcid Latex command to include the green symbol. Include in your preamble with \input{orcid.tex}, and use with \orcid{your Orcid id}.

The file.

Latex: QUT exam class

QUT exam Latex class and template. This class can be used to create exams that adhere to the QUT-exam layout requirements.

The manual.

The class file.

Update 03-09-2019: Added randomisation for answers.
Update 12-04-2019: \printPointsA now does not print points twice anymore.

Latex: thesis class

PhD thesis Latex class, used in my thesis at the Eindhoven University of Technology.

The class file.

The pre-amble config file.

The main file.

There's a handy option in the class declaration: if you add the optional option [chapter=X], it will only compile Chapter X. This saves a lot of time while writing.