From: Graham Wilson <graham@debian.org>
Date: Mon, 28 Jul 2025 01:02:26 +0800
Subject: Check for a passivetex format file and tell the user, if it's

Bug-Debian: http://bugs.debian.org/190840
Forwarded: not-needed
Last-Update: 2008-02-05

missing.
---
 format/fo/dvi | 4 ++++
 format/fo/pdf | 4 ++++
 format/fo/ps  | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/format/fo/dvi b/format/fo/dvi
index 6615048..08bcb0a 100755
--- a/format/fo/dvi
+++ b/format/fo/dvi
@@ -11,6 +11,10 @@ post-process)
     echo >&2 "Can't process, xmltex tool not found at $XMLTEX_PATH."
     exit 3
   fi
+  if [ ! -f /usr/share/texmf/tex/xmltex/passivetex/fotex.xmt ]; then
+    printf "PassiveTeX is needed for this format, but it is not installed. Please install\nthe passivetex package.\n"
+    exit 1
+  fi
   # Work around stupid tetex bug with '_' in filenames
   # Also work around stupid tetex limitation with long lines (rhbz #101055)
   # and workaround passivetex limitation for chapter titles starting with L
diff --git a/format/fo/pdf b/format/fo/pdf
index 9e586b3..53d1013 100755
--- a/format/fo/pdf
+++ b/format/fo/pdf
@@ -13,6 +13,10 @@ DEFAULT|DBLATEX)
 	    echo >&2 "Can't process, pdfxmltex tool not found at $PDFXMLTEX_PATH."
 	    exit 3
 	  fi
+	  if [ ! -f /usr/share/texmf/tex/xmltex/passivetex/fotex.xmt ]; then
+	    printf "PassiveTeX is needed for this format, but it is not installed. Please install\nthe passivetex package.\n"
+	    exit 1
+	  fi
 	  # Work around stupid tetex bug with '_' in filenames
 	  # Also work around stupid tetex limitation with long lines
 	  # (rhbz #101055) and workaround passivetex limitation for chapter
diff --git a/format/fo/ps b/format/fo/ps
index 27673cf..6a258e9 100755
--- a/format/fo/ps
+++ b/format/fo/ps
@@ -8,6 +8,10 @@ DEFAULT|DBLATEX)
 	  then
 	    echo >&2 "Post-process XSL-FO to DVI"
 	  fi
+	  if [ ! -f /usr/share/texmf/tex/xmltex/passivetex/fotex.xmt ]; then
+	    printf "PassiveTeX is needed for this format, but it is not installed. Please install\nthe passivetex package.\n"
+	    exit 1
+	  fi
 	  # Work around stupid tetex bug with '_' in filenames
 	  # Also work around stupid tetex limitation with long lines 
 	  # (rhbz #101055) and workaround passivetex limitation for chapter
