diff -ruP drutex-6.x-1.3/contrib/drutex_blahtex.inc drutex-6.x-1.beta4/contrib/drutex_blahtex.inc
--- drutex-6.x-1.3/contrib/drutex_blahtex.inc	2006-09-05 21:25:41.000000000 -0500
+++ drutex-6.x-1.beta4/contrib/drutex_blahtex.inc	2008-11-09 17:41:59.000000000 -0600
@@ -16,7 +16,7 @@
   return (object) array(
     'title' => t('blahtex (MathML)'),
     'description' => t('Provides math environments to create MathML with blahtex.'),
-    'toggle' => true,
+    'toggle' => TRUE,
     'weight' => 16
   );
 }
@@ -25,7 +25,7 @@
  * Implementation of subhook_defaults().
  */
 function drutex_blahtex_defaults() {
-  $D['drutex_blahtex_active'] = false;
+  $D['drutex_blahtex_active'] = FALSE;
 
   return $D;
 }
diff -ruP drutex-6.x-1.3/contrib/drutex_example.inc drutex-6.x-1.beta4/contrib/drutex_example.inc
--- drutex-6.x-1.3/contrib/drutex_example.inc	2006-09-05 21:25:41.000000000 -0500
+++ drutex-6.x-1.beta4/contrib/drutex_example.inc	2008-11-09 17:42:51.000000000 -0600
@@ -15,7 +15,7 @@
   return (object) array(
     'title' => t('Exampe submodule'),
     'description' => t('Provides some senseless stuff.'),
-    'toggle' => true, /* tells drutex if the user can activate/deactivate this submodule */
+    'toggle' => TRUE, /* tells drutex if the user can activate/deactivate this submodule */
     'weight' => 20 /* helps ordering the fieldsets on the configuration page */
   );
 }
@@ -24,7 +24,7 @@
  * Implementation of subhook_defaults().
  */
 function drutex_example_defaults() {
-  $D['drutex_blahtex_active'] = false;
+  $D['drutex_blahtex_active'] = FALSE;
   $D['drutex_example_sometext'] = 'This is the default text for drutex_example_sometext_$format.';
 
   return $D;
diff -ruP drutex-6.x-1.3/drutex.info drutex-6.x-1.beta4/drutex.info
--- drutex-6.x-1.3/drutex.info	2008-10-02 02:30:14.000000000 -0500
+++ drutex-6.x-1.beta4/drutex.info	2008-11-14 02:13:38.000000000 -0600
@@ -4,7 +4,8 @@
 
 ; Information added by drupal.org packaging script on 2008-03-31
 core = "6.x"
-version = "6.x-1.3"
+version = "6.x-1.beta4"
 project = "drutex"
+package = "Input filters"
 datestamp = "1206954607"
 
diff -ruP drutex-6.x-1.3/drutex.install drutex-6.x-1.beta4/drutex.install
--- drutex-6.x-1.3/drutex.install	1969-12-31 18:00:00.000000000 -0600
+++ drutex-6.x-1.beta4/drutex.install	2008-11-13 00:36:39.000000000 -0600
@@ -0,0 +1,18 @@
+<?php
+// $ID$
+
+
+/*  Drutex does not install a module table */
+
+/**
+ *  Implementation of hook_uninstall().
+ */
+
+function drutex_uninstall() {
+
+//  delete all drutex variables in the variable table and clear the variables cache
+  db_query("DELETE FROM {variable} WHERE name like 'drutex_%%'");
+  cache_clear_all('variables', 'cache');
+}
+
+
diff -ruP drutex-6.x-1.3/drutex_latex.inc drutex-6.x-1.beta4/drutex_latex.inc
--- drutex-6.x-1.3/drutex_latex.inc	2006-09-05 21:25:41.000000000 -0500
+++ drutex-6.x-1.beta4/drutex_latex.inc	2008-11-14 01:23:40.000000000 -0600
@@ -13,16 +13,36 @@
   return (object) array(
     'title' => t('LaTeX to HTML'),
     'description' => t('Converts many LaTeX commands and environments to plain HTML.'),
-    'toggle' => true,
+    'toggle' => TRUE,
     'weight' => 4
   );
 }
 
 /**
+ * Implementation of subhook_filter_tips().
+ */
+function drutex_latex_filter_tips($delta, $format, $long = FALSE) {
+  return t('Visit drutex/latex/nid to generate a LaTeX file of this node.');
+}
+
+/**
+ * Implementation of subhook_link
+ */
+function drutex_latex_link($type, $node = NULL, $teaser = FALSE) {
+  $latex_link = 'drutex/latex/'. $node->nid;
+  $text = t('Generate LaTex file');
+  $links['drutex_latex_link'] = array( 
+    'title' => $text,
+    'href' => $latex_link,
+    );
+  return $links;
+}
+
+/**
  * Implementation of subhook_defaults().
  */
 function drutex_latex_defaults() {
-  $D['drutex_latex_active'] = false;
+  $D['drutex_latex_active'] = FALSE;
   return $D;
 }
 
diff -ruP drutex-6.x-1.3/drutex_linebreak.inc drutex-6.x-1.beta4/drutex_linebreak.inc
--- drutex-6.x-1.3/drutex_linebreak.inc	2007-04-25 09:46:28.000000000 -0500
+++ drutex-6.x-1.beta4/drutex_linebreak.inc	2008-11-11 19:31:51.000000000 -0600
@@ -16,16 +16,24 @@
   return (object) array(
     'title' => t('Line break converter'),
     'description' => check_plain(t('Converts line breaks into HTML (i.e. <br /> and <p> tags).')),
-    'toggle' => true,
+    'toggle' => TRUE,
     'weight' => 12
   );
 }
 
 /**
+ * Implementation of subhook_filter_tips().
+ */
+
+function drutex_linebreak_filter_tips($delta, $format, $long = FALSE) {
+  return t('Line and paragraphs break automatically.');
+}
+
+/**
  * Implementation of subhook_defaults().
  */
 function drutex_linebreak_defaults() {
-  $D['drutex_linebreak_active'] = true;
+  $D['drutex_linebreak_active'] = TRUE;
   $D['drutex_linebreak_behaviour'] = 'drupal';
 
   return $D;
diff -ruP drutex-6.x-1.3/drutex.module drutex-6.x-1.beta4/drutex.module
--- drutex-6.x-1.3/drutex.module	2008-10-02 02:41:21.000000000 -0500
+++ drutex-6.x-1.beta4/drutex.module	2008-11-14 01:20:07.000000000 -0600
@@ -7,6 +7,64 @@
  */
 
 /**
+ * Implementation of hook_link
+ */
+
+function drutex_link($type, $node = NULL, $teaser = FALSE) {
+  $links = array();
+  if ($type == 'node') {
+    $format = $node->format;
+    foreach (drutex_submodule_list($format) as $submodule) {
+      if (drutex_submodule_is_active($submodule, $format)) {
+        $linkfunction = 'drutex_' . $submodule . '_link';
+        if (function_exists($linkfunction)) {
+          $result = $linkfunction($type, $node, $teaser);
+          if (isset($result) && is_array($result)) {
+            $links = array_merge($links, $result);
+          }
+          elseif (isset($result)) {
+            $links[] = $result;
+          }
+        }
+      }
+    }
+  }
+  return $links;
+}
+
+/**
+ * Implementation of hook_help().
+ */
+function drutex_help($path, $arg) {
+  switch ($path) {
+    case 'admin/modules#description':
+      return t('Allows users to render LaTeX/TeX in many different ways.');
+  }
+}
+
+/**
+ * Implementation of hook_filter_tips().
+ */
+function drutex_filter_tips($delta, $format, $long) {
+  $output = '';
+    $output .= t('LaTex commands embedded in text will be interpreted and rendered. Additional information can be found at <a href ="http://groups.drupal.org/node/1263"> DruTex Documentation Pages </a>');
+    $output .= '<ul>';
+    foreach (drutex_submodule_list($format) as $submodule) {
+      if (drutex_submodule_is_active($submodule, $format)) {
+        $helpfunction = 'drutex_' . $submodule . '_filter_tips';
+        if (function_exists($helpfunction)) {
+	  $res = $helpfunction($delta, $format, $long);
+          if ($res != '') {
+            $output .= '<li>'. $res . '</li>';
+          }
+        }
+      }
+    }
+    $ouptut .= '</ul>';
+  return $output;
+}
+
+/**
  * Implementation of hook_filter().
  */
 function drutex_filter($op, $delta = 0, $format = -1, $text = '') {
@@ -17,7 +75,7 @@
     case 'description':
       return t('Allows users to render LaTeX/TeX in many different ways.');
 
-    case "process":
+    case 'process':
       return drutex_node2html($text, $format);
 
     case 'settings':
@@ -34,19 +92,27 @@
 function drutex_menu() {
   $items = array();
 
-	if (drutex_submodule_is_active('pdf')) {
-		$items['drutex/pdf'] = array(
-			'title' => t('node2pdf'),
-			'callback' => 'drutex_node2pdf_wrapper',
-			'access' => user_access('access pdf files'),
-			'type' => MENU_CALLBACK);
-
-		$items['drutex/latex'] = array(
-			'title' => t('node2latex'),
-			'callback' => 'drutex_node2latex_wrapper',
-			'access' => user_access('access latex source'),
-			'type' => MENU_CALLBACK);
-    }
+  if (drutex_submodule_is_active('pdf')) {
+    $items['drutex/pdf'] = array(
+      'title' => 'node2pdf',
+      'file' => 'drutex_pdf.inc',
+      'page callback' => 'drutex_node2pdf_wrapper',
+      'page arguments' => array(2), 
+      'access callback' => 'user_access',
+      'access arguments' => array('access pdf files'),
+      'type' => MENU_CALLBACK,
+    );
+
+    $items['drutex/latex'] = array(
+      'title' => 'node2latex',
+      'file' => 'drutex_pdf.inc',
+      'page callback' => 'drutex_node2latex_wrapper',
+      'page arguments' => array(2),
+      'access callback' => 'user_access', 
+      'access arguments' => array('access latex source'),
+      'type' => MENU_CALLBACK,
+    );
+  }
 
   drutex_set_stylesheet();
 
@@ -119,7 +185,7 @@
   }
 }
 
-/**
+/** 
  * Filter-settings page.
  */
 function _drutex_filter_settings($format = -1) {
@@ -150,15 +216,7 @@
   */
 
   $image_dir = drutex_var_get("drutex_dir_images_$format");
-
-  if (!is_writable($image_dir)) {
-    if (file_exists($image_dir)) {
-      chmod($image_dir, 0777);
-    }
-    else {
-      mkdir($image_dir);
-    }
-  }
+  file_check_directory($image_dir, FILE_CREATE_DIRECTORY);
 
   /* global settings
      that means: settings all submodules can share
@@ -265,6 +323,7 @@
  */
 function drutex_node2html($text, $format = -1) {
   /* preprocess */
+
   foreach (drutex_submodule_implements('node2html_preprocess', $format) as $submodule) {
     $text = drutex_submodule_invoke($submodule, 'node2html_preprocess', $text, $format);
   }
@@ -281,7 +340,7 @@
   }
 
   $text = _drutex_unhide_all($text);
-
+  
   /* postprocess */
   foreach (drutex_submodule_implements('node2html_postprocess', $format) as $submodule) {
     $text = drutex_submodule_invoke($submodule, 'node2html_postprocess', $text, $format);
@@ -414,7 +473,7 @@
     $hidden[$count] = _drutex_unescape($subject);
     return _drutex_secret() . ':' . $count++ . ':';
   }
-  else if ($cmd == 'get') {
+  elseif ($cmd == 'get') {
     $subject = (int)$subject;
     return $hidden[$subject];
   }
@@ -482,7 +541,7 @@
 function _drutex_create_temporary_dir($format = -1) {
   static $n = 1;
   $dir = drutex_var_get("drutex_dir_temporary_$format") . '/drutex-' . _drutex_secret() . '-' . $n++;
-  mkdir($dir);
+  file_check_directory($dir, FILE_CREATE_DIRECTORY); 
   return $dir;
 }
 
@@ -495,7 +554,8 @@
   if ($handle = opendir($dir)) {
     while ($item = readdir($handle)) {
       if ($item != '.' && $item != '..') {
-         unlink("$dir/$item");
+        $file = $dir . '/' . $item;
+        file_delete($file);
       }
     }
     closedir($handle);
@@ -510,9 +570,9 @@
   if ($handle = opendir($source)) {
     while ($item = readdir($handle)) {
       if ($item != '.' && $item != '..') {
-        if(is_file("$source/$item")) {
-          copy("$source/$item", "$dest/$item");
-        }
+	$sourcefile = $source .'/'. $item; 
+        $destfile = $dest .'/'. $item;        
+        file_copy($sourcefile, $destfile);
       }
     }
     closedir($handle);
@@ -522,6 +582,7 @@
 /**
  * Get URL where the images are saved.
  */
+
 function drutex_get_image_url($format = -1) {
   $path = drutex_var_get("drutex_url_images_$format");
 
@@ -534,13 +595,14 @@
   }
 }
 
+
 /**
  * Implementation of hook_nodeapi().
  *
  * Notify all submodules when a node changed.
  */
-function drutex_nodeapi(&$node, $op, $arg) {
-  drutex_submodule_invoke_all('nodeapi', $node, $op, $arg, "format={$node->format}");
+function drutex_nodeapi(&$node, $op, $teaser = FALSE, $page = FALSE) {
+  drutex_submodule_invoke_all('nodeapi', $node, $op, $teaser, $page, "format={$node->format}");
 }
 
 /**
@@ -565,15 +627,15 @@
  */
 function drutex_submodule_is_active($submodule, $format = -1) {
   if (is_file(drupal_get_path('module', 'drutex') . "/drutex_{$submodule}.inc")) {
-    if ($format == -1) {
-      return true;
+   if ($format == -1) {
+      return TRUE;
     }
     else if (_format_uses_drutex($format) && drutex_var_get("drutex_{$submodule}_active_{$format}")) {
-      return true;
+      return TRUE;
     }
   }
 
-  return false;
+  return FALSE;
 }
 
 /**
@@ -589,11 +651,11 @@
     $result = db_query("SELECT format from {filters} WHERE module = 'drutex'");
 
     while ($obj = db_fetch_object($result)) {
-      $cache[$obj->format] = true;
+      $cache[$obj->format] = TRUE;
     }
 
     /* the format -1 always 'uses' DruTeX */
-    $cache[-1] = true;
+    $cache[-1] = TRUE;
   }
 
   return isset($cache[$format]);
@@ -738,7 +800,6 @@
   $hook = array_shift($args);
   $return = array();
   $format = _drutex_rewrite_format_call($args);
-
   foreach (drutex_submodule_implements($hook, $format) as $submodule) {
     $result = call_user_func_array("drutex_{$submodule}_{$hook}", $args);
     if (isset($result) && is_array($result)) {
@@ -766,10 +827,8 @@
   }
 }
 
-
 $path = drupal_get_path('module', 'drutex');
 
-
 /* load the submodules */
 foreach (drutex_submodule_list() as $submodule) {
   include_once("{$path}/drutex_{$submodule}.inc");
diff -ruP drutex-6.x-1.3/drutex_numbering.inc drutex-6.x-1.beta4/drutex_numbering.inc
--- drutex-6.x-1.3/drutex_numbering.inc	2007-04-25 09:46:28.000000000 -0500
+++ drutex-6.x-1.beta4/drutex_numbering.inc	2008-11-11 19:31:37.000000000 -0600
@@ -15,16 +15,20 @@
   return (object) array(
     'title' => t('Numbering / Referencing'),
     'description' => t('Assists automatic numbering of tex, equation und equations environments.'),
-    'toggle' => false,
+    'toggle' => FALSE,
     'weight' => 20
   );
 }
 
+function drutex_numbering_filter_tips($delta, $format, $long = FALSE) {
+  return t('Assists automatic numbering of tex, equation, and equations environments.');
+}
+
 /**
  * Implementation of subhook_defaults().
  */
 function drutex_numbering_defaults() {
-  $D['drutex_numbering_active'] = true;
+  $D['drutex_numbering_active'] = TRUE;
   return $D;
 }
 
diff -ruP drutex-6.x-1.3/drutex_pdf.inc drutex-6.x-1.beta4/drutex_pdf.inc
--- drutex-6.x-1.3/drutex_pdf.inc	2007-04-25 09:46:28.000000000 -0500
+++ drutex-6.x-1.beta4/drutex_pdf.inc	2008-11-14 01:25:51.000000000 -0600
@@ -15,16 +15,36 @@
   return (object) array(
     'title' => t('PDF Generator'),
     'description' => t('Allows to generate pdf-versions of a node (with decent html2latex features).'),
-    'toggle' => true,
+    'toggle' => TRUE,
     'weight' => 6
   );
 }
 
 /**
+ * Implementation of subhook_filter_tips().
+ */
+function drutex_pdf_filter_tips($delta, $format, $long = FALSE) {
+  return t('Visit drutex/pdf/nid to generate pdf-versions of this node.');
+}
+
+/**
+ * Implementation of subhook_link()
+ */
+function drutex_pdf_link($type, $node = NULL, $teaser = FALSE) {
+  $pdf_link = 'drutex/pdf/'. $node->nid;
+  $text = t('Generate PDF file');
+  $links['drutex_pdf_link'] = array( 
+    'title' => $text,
+    'href' => $pdf_link,
+    );
+  return $links;
+}
+
+/**
  * Implementation of subhook_defaults().
  */
 function drutex_pdf_defaults() {
-  $D['drutex_pdf_active'] = true;
+  $D['drutex_pdf_active'] = TRUE;
 
   /* relative to drutex/templates/pdf */
   $D['drutex_template_pdf'] = 'plain.tex';
@@ -84,12 +104,11 @@
 function drutex_node2pdf_wrapper($nid) {
   $node = node_load($nid);
   $pdf_dir = drutex_var_get("drutex_dir_images_{$node->format}");
-
-  if (!is_file("$pdf_dir/{$node->nid}.pdf")) {
+  $pdf_file = $pdf_dir .'/'. $node->nid . '.pdf';
+  if (!is_file($pdf_file)) { 
     drutex_node2pdf($nid);
   }
-
-  drupal_goto("$pdf_dir/{$node->nid}.pdf");
+  drupal_goto($pdf_file);
 }
 
 /**
@@ -103,22 +122,22 @@
  */
 function drutex_node2pdf($nid) {
   $node = node_load($nid);
-
+  
   drutex_node2latex($nid);
-
   $image_dir = drutex_var_get("drutex_dir_images_{$node->format}");
 
   /* create temporary dir */
   $temporary_dir = _drutex_create_temporary_dir();
-
-  copy("$image_dir/{$node->nid}.tex", "$temporary_dir/{$node->nid}.tex");
-  _drutex_copy_dir("modules/drutex/templates/pdf", $temporary_dir);
-
+  $file = $node->nid .'.tex';
+  $temporary_file = $temporary_dir .'/'. $file;
+  $source_file = $image_dir .'/'. $file;
+  file_copy($source_file, $temporary_file);
+  $pdf_template_path = drupal_get_path('module', 'drutex') . '/templates/pdf';
+  _drutex_copy_dir($pdf_template_path, $temporary_dir);
 
   /*
    * Prepare and execute the conversion commands
    */
-
   $pattern_convert = drutex_var_get("drutex_pattern_pdflatex_{$node->format}");
 
   /* replacement array */
@@ -141,7 +160,7 @@
 
       if (drutex_var_get("drutex_debug_$format")) {
         $level = ($cmd_retval == 0) ? WATCHDOG_NOTICE : WATCHDOG_WARNING;
-        watchdog('DruTeX', "Command: $cmd<br />Return value: $cmd_retval", $level);
+        watchdog('DruTeX', "Command: %cmd<br />Return value: %cmdret", array('%cmd' => $cmd,'%cmdret' => $cmd_retval), $level);
       }
     }
   }
@@ -151,7 +170,7 @@
     _drutex_delete_dir($temporary_dir);
   }
   else {
-    watchdog('DruTeX', "Temporary directory for pdf-generation was $temporary_dir.", WATCHDOG_NOTICE);
+    watchdog('DruTeX', "Temporary directory for pdf-generation was %tdir.", array('%tdir' => $temporary_dir), WATCHDOG_NOTICE);
   }
 }
 
@@ -166,12 +185,12 @@
 function drutex_node2latex_wrapper($nid) {
   $node = node_load($nid);
   $pdf_dir = drutex_var_get("drutex_dir_images_{$node->format}");
-
-  if (!is_file("$pdf_dir/{$node->nid}.tex")) {
+  $tex_file = $pdf_dir .'/'. $node->nid .'.tex';
+  if (!is_file($tex_file)) {
     drutex_node2latex($nid);
   }
 
-  drupal_goto("$pdf_dir/{$node->nid}.tex");
+  drupal_goto($tex_file);
 }
 
 /**
@@ -198,11 +217,11 @@
 
   /* convert html elements in the node's content to latex */
   $content = drutex_html2latex($node);
-
+//  print $content;
   /* replace the template keys by the actual values */
   $map = array(
     'DRUTEX_NODE_TITLE' => $node->title,
-    'DRUTEX_NODE_URL' => url('node/'. $node->nid, null, null, true),
+    'DRUTEX_NODE_URL' => url("node/$node->nid", array('absolute' => TRUE)),
     'DRUTEX_DIR' => drutex_var_get('drutex_dir'),
     'DRUTEX_NODE_BODY' => $content
   );
@@ -224,7 +243,7 @@
  */
 function drutex_html2latex(&$node) {
   if (drutex_submodule_is_active('security', $node->format)) {
-    if (drutex_security($node->body, $format) == false) {
+    if (drutex_security($node->body, $format) == FALSE) {
       return 'Unallowed command detected!';
     }
   }
@@ -233,7 +252,7 @@
 
   /* include the rules file */
   $drutex_path = drupal_get_path('module', 'drutex');
-  include_once("$drutex_path/drutex_pdf.rules");
+  require_once("$drutex_path/drutex_pdf.rules");
 
   /* get entities */
   $A = drutex_submodule_invoke_all('drutex2latex', $node, "format=$format");
@@ -250,16 +269,19 @@
   return $text;
 }
 
-/**
+
+/** 
  * Implementation of hook_nodeapi().
  */
-function drutex_pdf_nodeapi(&$node, $op, $arg) {
-  if (true) {
+function drutex_pdf_nodeapi(&$node, $op, $teaser = FALSE, $page = FALSE) {
+  if (TRUE) {
     switch ($op) {
-      case 'validate':
-        break;
+      case 'load': 
+       break;
+      case 'view':
+       break;
 
-      case 'load':
+      case 'validate':
         break;
 
       case 'insert':
@@ -268,15 +290,10 @@
       case 'update':
       case 'delete':
         $pdf_dir = drutex_var_get("drutex_dir_images_{$node->format}");
-
-        if (is_file("$pdf_dir/{$node->nid}.pdf")) {
-          unlink("$pdf_dir/{$node->nid}.pdf");
-        }
-
-        if (is_file("$pdf_dir/{$node->nid}.tex")) {
-          unlink("$pdf_dir/{$node->nid}.tex");
-        }
-
+        $pdf_file = $pdf_dir .'/'. $node->nid .'.pdf';
+        $tex_file = $pdf_dir .'/'. $node->nid .'.tex';
+        file_delete($pdf_file);
+        file_delete($tex_file);
         break;
     }
   }
diff -ruP drutex-6.x-1.3/drutex_render.inc drutex-6.x-1.beta4/drutex_render.inc
--- drutex-6.x-1.3/drutex_render.inc	2008-10-02 02:59:03.000000000 -0500
+++ drutex-6.x-1.beta4/drutex_render.inc	2008-11-11 19:32:10.000000000 -0600
@@ -13,16 +13,24 @@
   return (object) array(
     'title' => t('LaTeX Renderer'),
     'description' => t('Provides different environments to create rendered images (especially maths).'),
-    'toggle' => true,
+    'toggle' => TRUE,
     'weight' => 0
   );
 }
 
 /**
+ * Implementation of subhook_filter_tips().
+ */
+
+function drutex_render_filter_tips($delta, $format, $long = FALSE) {
+  return t('Provides different environments to create rendered images (especially maths).');
+}
+
+/**
  * Implementation of subhook_defaults().
  */
 function drutex_render_defaults() {
-  $D['drutex_render_active'] = true;
+  $D['drutex_render_active'] = TRUE;
 
   /* relative to drutex/templates/render */
   $D['drutex_template_render'] = 'default.tex';
@@ -193,7 +201,7 @@
   $text = _drutex_unescape($text);
 
   if (drutex_submodule_is_active('security', $format)) {
-    if (drutex_security($text, $format) == false) {
+    if (drutex_security($text, $format) == FALSE) {
       return '<em class="error">Unallowed command detected!</em>';
     }
   }
@@ -262,7 +270,7 @@
 
         if (drutex_var_get("drutex_debug_$format")) {
           $level = ($cmd_retval == 0) ? WATCHDOG_NOTICE : WATCHDOG_WARNING;
-          watchdog('DruTeX', "Command: $cmd<br />Return value: $cmd_retval", $level);
+          watchdog('DruTeX', "Command: %cmd<br />Return value: %cmdret", array('%cmd' => $cmd, '%cmdret' => $cmd_retval), $level);
         }
       }
     }
@@ -275,10 +283,10 @@
     }
     else {
       if ($success) {
-        watchdog('DruTeX', "$image_file was created. Temporary directory was $temporary_dir.", WATCHDOG_NOTICE);
+        watchdog('DruTeX', "%imgfile was created. Temporary directory was %tdir.", array('%imgfile' => $image_file, '%tdir' => $temporary_dir), WATCHDOG_NOTICE);
       }
       else {
-        watchdog('DruTeX', "$image_file couldn\'t be created. Temporary directory was $temporary_dir.", WATCHDOG_WARNING);
+        watchdog('DruTeX', "%imgfile couldn\'t be created. Temporary directory was %tdir.",  array('%imgfile' => $image_file, '%tdir' => $temporary_dir), WATCHDOG_WARNING);
       }
     }
   }
@@ -287,12 +295,11 @@
 
   if ($success) {
     $img_alt = _drutex_hide('set', check_plain($text));
-    $res = "<img class=\"teximage\" src=\"$img_url\" alt=\"$img_alt\" />";
+    $res = '<img class="teximage" src="' . $img_url . '" alt="' . $img_alt . '" />';
   }
   else {
     $res = '<em class="error">TeX Embedding failed!</em>';
   }
-
   if (!empty($attributes['tag'])) {
     $class_attr = empty($attributes['class']) ? '' : " class=\"{$attributes['class']}\"";
 
@@ -315,7 +322,6 @@
     }
   }
 
-
   return $res;
 }
 
Only in drutex-6.x-1.3: drutex_render.inc~
diff -ruP drutex-6.x-1.3/drutex_security.inc drutex-6.x-1.beta4/drutex_security.inc
--- drutex-6.x-1.3/drutex_security.inc	2006-09-05 23:20:08.000000000 -0500
+++ drutex-6.x-1.beta4/drutex_security.inc	2008-11-12 11:55:42.000000000 -0600
@@ -16,16 +16,34 @@
   return (object) array(
     'title' => t('Security restrictions'),
     'description' => t('Restricts the set of allowed LaTeX commands.'),
-    'toggle' => true,
+    'toggle' => TRUE,
     'weight' => 20
   );
 }
 
 /**
+ * Implementation of subhook_filter_tips().
+ */
+
+function drutex_security_filter_tips($delta, $format, $long = FALSE) {
+
+  if (drutex_var_get("drutex_security_active_$format") == TRUE) {
+    $allowed_commands = drutex_var_get("drutex_security_allowedcommands_$format");
+    $allowed_environments = drutex_var_get("drutex_security_allowedenvironments_$format");
+    $text = t('Allowed commands include: %cmd', array('%cmd' => $allowed_commands));
+    $text .= '<br>'. t('Allowed environments include: %env', array('%env' => $allowed_environments));
+  }
+  else {
+    $text = '';
+  }
+  return $text;
+}
+
+/**
  * Implementation of subhook_defaults().
  */
 function drutex_security_defaults() {
-  $D['drutex_security_active'] = false;
+  $D['drutex_security_active'] = FALSE;
   $D['drutex_security_allowedcommands'] = '\atop \binom \cdot \cfrac \choose \frac \int \ln \over \sum \to';
   $D['drutex_security_allowedenvironments'] = 'align array equation equations gather matrix split';
 
@@ -54,13 +72,13 @@
   $commands = $matches[0];
 
   foreach ($commands as $command) {
-    if (array_search($command, $allowed_commands[$format]) === false) {
-      watchdog('DruTeX', "Unallowed command (by security submodule): $command", WATCHDOG_WARNING);
-      return false;
+    if (array_search($command, $allowed_commands[$format]) === FALSE) {
+      watchdog('DruTeX', "Unallowed command (by security submodule): %cmd", array('%cmd' => $command), WATCHDOG_WARNING);
+      return FALSE;
     }
   }
 
-  return true;
+  return TRUE;
 }
 
 /**
diff -ruP drutex-6.x-1.3/drutex_tools.inc drutex-6.x-1.beta4/drutex_tools.inc
--- drutex-6.x-1.3/drutex_tools.inc	2008-03-31 03:05:50.000000000 -0500
+++ drutex-6.x-1.beta4/drutex_tools.inc	2008-11-09 16:36:59.000000000 -0600
@@ -13,7 +13,7 @@
   return (object) array(
     'title' => t('Toolbox'),
     'description' => t('Tools for more debugging and error logging.'),
-    'toggle' => false,
+    'toggle' => FALSE,
     'weight' => 20
   );
 }
@@ -22,8 +22,8 @@
  * Implementation of subhook_defaults().
  */
 function drutex_tools_defaults() {
-  $D['drutex_tools_active'] = true;
-  $D['drutex_debug'] = false;
+  $D['drutex_tools_active'] = TRUE;
+  $D['drutex_debug'] = FALSE;
 
   return $D;
 }
@@ -51,7 +51,7 @@
   $temporary_dir = drutex_var_get("drutex_dir_temporary_$format");
   $is_writable = is_writable($temporary_dir);
 
-  if ($is_writable == false) {
+  if ($is_writable == FALSE) {
     $form["drutex_check_tmpdir"] = array(
       '#type' => 'markup',
       '#value' => $div_error . t('The temporary directory (') . $temporary_dir .') isn\'t writable.'.'</div>'
@@ -70,7 +70,7 @@
   $image_dir = drutex_var_get("drutex_dir_images_$format");
   $is_writable = is_writable($image_dir);
 
-  if ($is_writable == false) {
+  if ($is_writable == FALSE) {
     $form["drutex_check_imgdir"] = array(
       '#type' => 'markup',
       '#value' => $div_error . t('The image directory (') . $image_dir .') isn\'t writable.'.'</div>'
diff -ruP drutex-6.x-1.3/drutex_verbatim.inc drutex-6.x-1.beta4/drutex_verbatim.inc
--- drutex-6.x-1.3/drutex_verbatim.inc	2006-09-05 21:25:41.000000000 -0500
+++ drutex-6.x-1.beta4/drutex_verbatim.inc	2008-11-09 16:38:08.000000000 -0600
@@ -15,7 +15,7 @@
   return (object) array(
     'title' => t('Numbering / Referencing'),
     'description' => t('Provide verbatim environments (these will be hidden by all further DruTeX parsing).'),
-    'toggle' => false,
+    'toggle' => FALSE,
     'weight' => 20
   );
 }
@@ -24,7 +24,7 @@
  * Implementation of subhook_defaults().
  */
 function drutex_verbatim_defaults() {
-  $D['drutex_verbatim_active'] = true;
+  $D['drutex_verbatim_active'] = TRUE;
   return $D;
 }
 
diff -ruP drutex-6.x-1.3/INSTALL.txt drutex-6.x-1.beta4/INSTALL.txt
--- drutex-6.x-1.3/INSTALL.txt	2006-08-23 06:15:50.000000000 -0500
+++ drutex-6.x-1.beta4/INSTALL.txt	2008-11-09 14:53:44.000000000 -0600
@@ -4,8 +4,8 @@
 
 2) Go to the module admin section and enable "drutex".
 
-3) Go to the input-filters admin section and create a new input format. You can choose an arbitrary name, but "DruTeX" would make sense. When you create a new format, you can select an input filter from a list: Just choose DruTeX.
+3) Go to the Site Configuration >> Input Formats and create a new input format. You can choose an arbitrary name, but "DruTeX" would make sense. When you create a new format, you can select an input filter from a list: Just choose DruTeX.
 
-4) Go again to the input-filters admin section, and select "configure" for the newly added input format. Click on the "configure" tab, and you are able to adjust many settings of DruTeX.
+4) Go again to the Input Formats admin section, and select "configure" for the newly added input format. Click on the "configure" tab, and you are able to adjust many settings of DruTeX.
 
-5) Go and test DruTeX: Create a new node, select your new input format, and try to render something, e.g. just try $x^2$.
\ No newline at end of file
+5) Go and test DruTeX: Create a new node, select your new input format, and try to render something, e.g. just try $x^2$.
