Index: src/latexgen.cpp
===================================================================
--- src/latexgen.cpp	(revision 755)
+++ src/latexgen.cpp	(working copy)
@@ -762,6 +762,12 @@
   t << "\\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}\n";
 }
 
+static void writeDefaultFooter(FTextStream &t)
+{
+  t << "\\printindex\n";
+  t << "\\end{document}\n";
+}
+
 void LatexGenerator::writeHeaderFile(QFile &f)
 {
   FTextStream t(&f);
@@ -772,6 +778,12 @@
   writeDefaultHeaderPart3(t);
 }
 
+void LatexGenerator::writeFooterFile(QFile &f)
+{
+  FTextStream t(&f);
+  writeDefaultFooter(t);
+}
+
 void LatexGenerator::writeStyleSheetFile(QFile &f)
 {
   FTextStream t(&f);
@@ -993,6 +1005,7 @@
   //static bool compactLatex = Config_getBool("COMPACT_LATEX");
   static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
   static QCString latexHeader = Config_getString("LATEX_HEADER");
+  static QCString latexFooter = Config_getString("LATEX_FOOTER");
   switch (is)
   {
     case isTitlePageStart:
@@ -1211,8 +1224,15 @@
     case isPageDocumentation2:
       break;
     case isEndIndex:
-      t << "\\printindex\n";
-      t << "\\end{document}\n";
+      if (latexFooter.isEmpty())
+      {
+        writeDefaultFooter(t);
+      }
+      else
+      {
+        QCString footer = fileToString(latexFooter);
+        t << substituteKeywords(footer,0);
+      }
       break;
   }
 }
Index: src/configoptions.cpp
===================================================================
--- src/configoptions.cpp	(revision 755)
+++ src/configoptions.cpp	(working copy)
@@ -1638,6 +1638,16 @@
   cs->setWidgetType(ConfigString::File);
   cs->addDependency("GENERATE_LATEX");
   //----
+  cs = cfg->addString(
+                 "LATEX_FOOTER",
+                 "The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for\n"
+                 "the generated latex document. The footer should contain everything after\n"
+                 "the last chapter. If it is left blank doxygen will generate a\n"
+                 "standard footer. Notice: only use this tag if you know what you are doing!"
+                );
+  cs->setWidgetType(ConfigString::File);
+  cs->addDependency("GENERATE_LATEX");
+  //----
   cb = cfg->addBool(
                  "PDF_HYPERLINKS",
                  "If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated\n"
Index: src/config.xml
===================================================================
--- src/config.xml	(revision 755)
+++ src/config.xml	(working copy)
@@ -1105,6 +1105,12 @@
 the first chapter. If it is left blank doxygen will generate a 
 standard header. Notice: only use this tag if you know what you are doing! 
 ' defval='' depends='GENERATE_LATEX'/>
+    <option type='string' id='LATEX_FOOTER' format='file' docs='
+The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 
+the generated latex document. The footer should contain everything after 
+the last chapter. If it is left blank doxygen will generate a 
+standard footer. Notice: only use this tag if you know what you are doing! 
+' defval='' depends='GENERATE_LATEX'/>
     <option type='bool' id='PDF_HYPERLINKS' docs='
 If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
 is prepared for conversion to pdf (using ps2pdf). The pdf file will 
Index: src/latexgen.h
===================================================================
--- src/latexgen.h	(revision 755)
+++ src/latexgen.h	(working copy)
@@ -30,6 +30,7 @@
     static void init();
     static void writeStyleSheetFile(QFile &f);
     static void writeHeaderFile(QFile &f);
+    static void writeFooterFile(QFile &f);
 
     //OutputGenerator *copy();
     //OutputGenerator *clone() { return new LatexGenerator(*this); }
Index: src/doxygen.cpp
===================================================================
--- src/doxygen.cpp	(revision 755)
+++ src/doxygen.cpp	(working copy)
@@ -9151,7 +9151,7 @@
   msg("5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n");
   msg("    RTF:   %s -w rtf styleSheetFile\n",name);
   msg("    HTML:  %s -w html headerFile footerFile styleSheetFile [configFile]\n",name);
-  msg("    LaTeX: %s -w latex headerFile styleSheetFile [configFile]\n\n",name);
+  msg("    LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",name);
   msg("6) Use doxygen to generate an rtf extensions file\n");
   msg("    RTF:   %s -e rtf extensionsFile\n\n",name);
   msg("If -s is specified the comments in the config file will be omitted.\n");
@@ -9447,11 +9447,11 @@
         }
         else if (stricmp(formatName,"latex")==0)
         {
-          if (optind+3<argc) // use config file to get settings
+          if (optind+4<argc) // use config file to get settings
           {
-            if (!Config::instance()->parse(argv[optind+3]))
+            if (!Config::instance()->parse(argv[optind+4]))
             {
-              err("error opening or reading configuration file %s!\n",argv[optind+3]);
+              err("error opening or reading configuration file %s!\n",argv[optind+4]);
               exit(1);
             }
             Config::instance()->substituteEnvironmentVars();
@@ -9463,7 +9463,7 @@
           {
             Config::instance()->init();
           }
-          if (optind+2>=argc)
+          if (optind+3>=argc)
           {
             err("error: option \"-w latex\" does not have enough arguments\n");
             cleanUpDoxygen();
@@ -9484,6 +9484,11 @@
           f.close();
           if (openOutputFile(argv[optind+2],f))
           {
+            LatexGenerator::writeFooterFile(f);
+          }
+          f.close();
+          if (openOutputFile(argv[optind+3],f))
+          {
             LatexGenerator::writeStyleSheetFile(f);
           }
           cleanUpDoxygen();
Index: doc/doxygen.1
===================================================================
--- doc/doxygen.1	(revision 755)
+++ doc/doxygen.1	(working copy)
@@ -31,7 +31,7 @@
 HTML:
 doxygen \fB\-w\fR html headerFile footerFile styleSheetFile [configFile]
 .TP
-LaTeX: doxygen \fB\-w\fR latex headerFile styleSheetFile [configFile]
+LaTeX: doxygen \fB\-w\fR latex headerFile footerFile styleSheetFile [configFile]
 .TP
 5) Use doxygen to generate an rtf extensions file
 .TP
