#!/bin/bash set -e if [ "$#" -ne 2 ]; then echo "Usage: `basename $0` COLOR LATEXSRC" echo echo "with COLOR being either a single color for text on transparent background or 'color1 on color2'" exit 1 fi color=$1 input=$2 fg="${color% on *}" bg="${color##* on }" outpdf="/tmp/latexpic.pdf" outpng="/tmp/latexpic.png" cat <