From ddc125a57d054ff2a36756d0d12481dfeca7755d Mon Sep 17 00:00:00 2001 From: gutmet Date: Wed, 25 Nov 2020 13:39:14 +0100 Subject: [PATCH] allow choice of background --- latexpic | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/latexpic b/latexpic index 970828e..d0076f2 100755 --- a/latexpic +++ b/latexpic @@ -2,9 +2,20 @@ 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" @@ -19,12 +30,16 @@ cat <