--- a/contrib/tex2eps.sh
+++ b/contrib/tex2eps.sh
@@ -13,7 +13,7 @@
 # temporary filename (without .eps suffix)
 tmp=$1
 
-echo '\nopagenumbers' > $tmp.tex
+printf '\\nopagenumbers\n' > $tmp.tex
 cat >> $tmp.tex
 echo '\end' >> $tmp.tex
 tex $tmp.tex > /dev/null 2> /dev/null
