[Goodies-commits] r5335 - in thunar-thumbnailers/trunk: . mime tex-thumbnailer

Erlend Davidson erland at xfce.org
Mon Sep 1 13:50:42 CEST 2008


Author: erland
Date: 2008-09-01 11:50:42 +0000 (Mon, 01 Sep 2008)
New Revision: 5335

Modified:
   thunar-thumbnailers/trunk/ChangeLog
   thunar-thumbnailers/trunk/mime/Makefile.am
   thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer
   thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer.desktop.in
Log:
Fixed TEX thumbnailer (now uses pdflatex).


Modified: thunar-thumbnailers/trunk/ChangeLog
===================================================================
--- thunar-thumbnailers/trunk/ChangeLog	2008-09-01 03:24:09 UTC (rev 5334)
+++ thunar-thumbnailers/trunk/ChangeLog	2008-09-01 11:50:42 UTC (rev 5335)
@@ -1,3 +1,8 @@
+2008-09-01	Erlend Davidson <Erlend.Davidson at gmail.com>
+
+	* Fixed the TEX thumbnailer, now uses pdflatex
+          (Thanks Marcus Habermehl for the heads-up on this bug)
+
 2008-08-05	Erlend Davidson <Erlend.Davidson at gmail.com>
 
 	* Fixed the EPS thumbnailer, so that the thumbnails are never transparent.

Modified: thunar-thumbnailers/trunk/mime/Makefile.am
===================================================================
--- thunar-thumbnailers/trunk/mime/Makefile.am	2008-09-01 03:24:09 UTC (rev 5334)
+++ thunar-thumbnailers/trunk/mime/Makefile.am	2008-09-01 11:50:42 UTC (rev 5335)
@@ -2,7 +2,9 @@
 
 mimedir = $(datadir)/mime
 mimepackdir = $(mimedir)/packages
-mimepack_DATA=thunar-thumbnailers.xml
+if !DISABLE_UPDATE_MIME_DATABASE
+    mimepack_DATA=thunar-thumbnailers.xml
+endif
 
 EXTRA_DIST =								\
 	$(mimepack_DATA)

Modified: thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer
===================================================================
--- thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer	2008-09-01 03:24:09 UTC (rev 5334)
+++ thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer	2008-09-01 11:50:42 UTC (rev 5335)
@@ -26,11 +26,10 @@
 ofile=$2
 size=$3
 
+# the output file will be called ${file}.pdf where ${file}=`basename $ifile .tex`
 file=`basename "${ifile}" .tex`
 mkdir "/tmp/${file}"
-tmpfile="/tmp/${file}/${file}.dvi"
-# the output file will be called ${file}.dvi where ${file}=`basename $ifile .tex`
-file=`basename "${ifile}" .tex`
+tmpfile="/tmp/${file}/${file}.pdf"
 
 # check we have \begin{document} and \end{document}
 C1=`grep -c "begin{document}" "${ifile}"`
@@ -46,13 +45,17 @@
     exit 1
 fi
 
-latex -interaction=nonstopmode -output-directory=/tmp/${file} "$ifile"
+pdflatex -interaction=nonstopmode -output-directory=/tmp/${file} "$ifile"
 
 if [ ! -f ${tmpfile} ]; then
+    echo "** pdflatex has not made the PDF file."
+    echo "** Is pdflatex installed?"
     exit 1
 fi
 
-convert "dvi:${tmpfile}[0]" -scale "$sizex$size" "png:${ofile}"
+convert "pdf:${tmpfile}[0]" -scale "$sizex$size" "png:${ofile}"
 
 # clean up temporary files
 rm -r /tmp/${file}
+
+exit 0

Modified: thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer.desktop.in
===================================================================
--- thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer.desktop.in	2008-09-01 03:24:09 UTC (rev 5334)
+++ thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer.desktop.in	2008-09-01 11:50:42 UTC (rev 5335)
@@ -3,6 +3,6 @@
 Encoding=UTF-8
 Type=X-Thumbnailer
 Name=TEX Thumbnailer
-TryExec=latex
+TryExec=pdflatex
 MimeType=text/x-tex;
 X-Thumbnailer-Exec=@libexecdir@/tex-thumbnailer %i %o %s




More information about the Goodies-commits mailing list