--- imgtex-0.20050123.orig/debian/README.Debian
+++ imgtex-0.20050123/debian/README.Debian
@@ -0,0 +1,19 @@
+imgtex for Debian
+-----------------
+
+imgTeX provides yet another math-on-the-web solution, more or less
+similar with mimeTeX, latexrender, textogif, gladtex, etc.
+
+You can display math equations in HTML pages only if you embedded,for example,
+sample-code (in this directory) in your HTML file.
+
+Tips: if you feel vertical position is not nice, try the following style
+<img src="/cgi-bin/imgtex.fcgi?{$ f(x) $}" style="vertical-align:middle" />
+
+Debian specific modifications: We add LaTeX color package in \usepackage
+so now you can use colored mathematical expressions in your web pages.
+You can see real sample of colored equations in sample-code.
+
+Home page of imgTeX (in Japanese) http://www.eaflux.com/imgtex/
+
+ -- Atsuhito KOHDA <kohda@pm.tokushima-u.ac.jp>, Mon Mar 14 14:39:51 2005
--- imgtex-0.20050123.orig/debian/changelog
+++ imgtex-0.20050123/debian/changelog
@@ -0,0 +1,62 @@
+imgtex (0.20050123-8) unstable; urgency=low
+
+ * Removed libapache-mod-fastcgi from Depends. It seemed we are affected
+ with Bug #429094.
+
+ -- Atsuhito KOHDA <kohda@pm.tokushima-u.ac.jp> Thu, 17 Jan 2008 09:44:29 +0900
+
+imgtex (0.20050123-7) unstable; urgency=low
+
+ * Fefined imgtex_fcgi.txt a bit (added LaTeX color package).
+ Now you can use colored mathematical expressions! Updated sample-code
+ to show effects of colored equations.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Wed, 21 Nov 2007 08:18:55 +0900
+
+imgtex (0.20050123-6) unstable; urgency=low
+
+ * Updated imgtex_fcgi.txt (and imgtex_inc_php.txt).
+ * Fixed dependency: changed texlive-latex-base to texlive-latex-extra
+ because we need type1cm.sty
+ * Updated copyright and README.Debian a bit.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Wed, 19 Sep 2007 11:12:30 +0900
+
+imgtex (0.20050123-5) unstable; urgency=low
+
+ * Support texlive and set Depends instead of Recommends now.
+ * Build with pbuilder.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Mon, 09 Jul 2007 10:24:47 +0900
+
+imgtex (0.20050123-4) unstable; urgency=low
+
+ * Updated URL of imgTeX home page.
+ * Added "Recommends: tetex-bin". We really need latex!
+
+ -- Atsuhito KOHDA <kohda@debian.org> Sun, 27 Nov 2005 20:26:01 +0900
+
+imgtex (0.20050123-3) unstable; urgency=low
+
+ * Changed dependency to "libapache2-mod-fastcgi | libapache-mod-fastcgi"
+ (from "libapache2-mod-fastcgi") so now we could use imgtex both with
+ apache and apache2.
+ * Changed/Fixed ownership of imgtexwork to www-data, if not imgtex failed
+ to work.
+ * Moved preverr.png to /usr/share/imgtex as lintian suggested.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Fri, 12 Aug 2005 10:39:01 +0900
+
+imgtex (0.20050123-2) unstable; urgency=low
+
+ * Refined Description a bit with a help of Daniel Burrows
+ <d.burrows4@verizon.net> (Closes: #301871)
+
+ -- Atsuhito KOHDA <kohda@pm.tokushima-u.ac.jp> Sat, 16 Apr 2005 22:03:06 +0900
+
+imgtex (0.20050123-1) unstable; urgency=low
+
+ * Initial Release. (Closes: #299582)
+
+ -- Atsuhito KOHDA <kohda@pm.tokushima-u.ac.jp> Thu, 10 Mar 2005 11:29:07 +0900
+
--- imgtex-0.20050123.orig/debian/compat
+++ imgtex-0.20050123/debian/compat
@@ -0,0 +1 @@
+4
--- imgtex-0.20050123.orig/debian/control
+++ imgtex-0.20050123/debian/control
@@ -0,0 +1,15 @@
+Source: imgtex
+Section: contrib/utils
+Priority: optional
+Maintainer: Atsuhito KOHDA <kohda@debian.org>
+Build-Depends: debhelper (>= 4.0.0)
+Standards-Version: 3.6.1
+
+Package: imgtex
+Architecture: all
+Depends: ${perl:Depends}, dvipng (>= 1.5-2), libfcgi-perl, libapache2-mod-fastcgi, texlive-latex-extra
+Description: provides yet another math-on-the-web solution
+ imgTeX uses dvipng and FastCGI to embed LaTeX equations within HTML code.
+ It runs very fast and renders high quality math equations.
+ .
+ Home page of imgTeX <http://www.eaflux.com/imgtex/>
--- imgtex-0.20050123.orig/debian/copyright
+++ imgtex-0.20050123/debian/copyright
@@ -0,0 +1,18 @@
+This package was debianized by Atsuhito KOHDA <kohda@pm.tokushima-u.ac.jp> on
+Thu, 10 Mar 2005 11:29:07 +0900.
+
+It was downloaded from <http://www.eaflux.com/imgtex/>
+
+Copyright:
+
+Upstream Author: Koji Nakamaru <nakamaru at gmail.com>
+
+License:
+
+GNU General Public License (GPL).
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL.
+
+Note: imgtex depends on libapache2-mod-fastcgi which is non-free so
+should go in contrib.
--- imgtex-0.20050123.orig/debian/dirs
+++ imgtex-0.20050123/debian/dirs
@@ -0,0 +1,2 @@
+usr/lib/cgi-bin/imgtexwork
+usr/share/imgtex
--- imgtex-0.20050123.orig/debian/docs
+++ imgtex-0.20050123/debian/docs
@@ -0,0 +1 @@
+debian/sample-code
\ No newline at end of file
--- imgtex-0.20050123.orig/debian/preinst
+++ imgtex-0.20050123/debian/preinst
@@ -0,0 +1,48 @@
+#! /bin/bash
+# preinst script for imgtex
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+workdir=/usr/lib/cgi-bin/imgtexwork
+
+case "$1" in
+ upgrade)
+ ownership=`ls -ld $workdir | awk '{print $3 $4}'`
+ if [ -n "$ownership" -a "$ownership" != "www-datawww-data" ]; then
+ echo "Fixing ownership of imgtexwork ..."
+ chown www-data:www-data $workdir
+ echo "done."
+ fi
+ ;;
+
+ install)
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- imgtex-0.20050123.orig/debian/rules
+++ imgtex-0.20050123/debian/rules
@@ -0,0 +1,100 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+cgid=/usr/lib/cgi-bin
+imgd=/usr/share/imgtex
+pack=$(CURDIR)/debian/imgtex
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/imgtex.
+ cp imgtex_fcgi.txt $(pack)$(cgid)/imgtex.fcgi
+ cp preverr.png $(pack)$(imgd)
+# cp imgtex_inc_php.txt $(CURDIR)/debian/imgtex/usr/lib/cgi-bin/imgtex.inc.php
+ chown www-data:www-data $(pack)$(cgid)/imgtex.fcgi
+ chown www-data:www-data $(pack)$(cgid)/imgtexwork
+ chmod 755 $(pack)$(cgid)/imgtex.fcgi
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+# dh_fixperms
+ dh_perl
+# dh_python
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- imgtex-0.20050123.orig/debian/sample-code
+++ imgtex-0.20050123/debian/sample-code
@@ -0,0 +1,36 @@
+<blockquote>
+<p>Here are some examples. Both math:
+<img src="/cgi-bin/imgtex.fcgi?{$ f(x)=\int_{-\infty}^xe^{-t^2}dt $}" align="middle" />,
+and displaymath:
+<img src="/cgi-bin/imgtex.fcgi?{\[ f(x)=\int_{-\infty}^xe^{-t^2}dt \]}" align="middle" />
+can be used.
+</p>
+<p>And colored version:
+<img src="/cgi-bin/imgtex.fcgi?{\textcolor{blue}{$ f(x)=\int_{-\infty}^xe^{-t^2}dt $}}" style="vertical-align:middle" />,
+and displaymath:
+<img src="/cgi-bin/imgtex.fcgi?{\textcolor{red}{\[ f(x)=\int_{-\infty}^xe^{-t^2}dt \]}}" style="vertical-align:middle" />
+can be used too (also examples of <tt>style="vertical-align:middle"</tt>).
+</p>
+<p>You can also write more complicated equations:</p>
+<div align="center">
+<img src="/cgi-bin/imgtex.fcgi?[res=300]{
+\begin{equation*}
+A = \begin{pmatrix}
+a_{11} & \ldots & a_{1n} \\
+\vdots & \ddots & \vdots \\
+a_{m1} & \ldots & a_{mn}
+\end{pmatrix}
+\end{equation*}
+}" />
+</div>
+<div align="center">
+<img src="/cgi-bin/imgtex.fcgi?[res=200]{
+\[
+\frac{\pi}{2} =
+\left( \int_{0}^{\infty} \frac{\sin x}{\sqrt{x}} dx \right)^2 =
+\sum_{k=0}^{\infty} \frac{(2k)!}{2^{2k}(k!)^2} \frac{1}{2k+1} =
+\prod_{k=1}^{\infty} \frac{4k^2}{4k^2 - 1}
+\]
+}" />
+</div>
+</blockquote>