Index: doc/config.doc
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/doc/config.doc,v
retrieving revision 1.7
diff -u -r1.7 config.doc
--- doc/config.doc	20 Jan 2013 13:57:47 -0000	1.7
+++ doc/config.doc	20 Jan 2013 19:15:31 -0000
@@ -213,6 +213,7 @@
 \refitem cfg_mathjax_extensions MATHJAX_EXTENSIONS
 \refitem cfg_mathjax_format MATHJAX_FORMAT
 \refitem cfg_mathjax_relpath MATHJAX_RELPATH
+\refitem cfg_mathjax_code MATHJAX_CODE
 \refitem cfg_max_dot_graph_depth MAX_DOT_GRAPH_DEPTH
 \refitem cfg_max_initializer_lines MAX_INITIALIZER_LINES
 \refitem cfg_mscfile_dirs MSCFILE_DIRS
@@ -1880,6 +1881,25 @@
 MATHJAX_EXTENSIONS     = TeX/AMSmath TeX/AMSsymbols
 \endverbatim
 
+\anchor cfg_mathjax_code
+<dt>\c MATHJAX_CODE <dd>
+ \addindex MATHJAX_CODE
+ The MATHJAX_CODE tag can be used to specify one or more javascript
+ pieces of code that will be used on startup of the MathJax code.
+ See 
+<a href="http://docs.mathjax.org/en/latest/output.html">the MathJax site</a>
+ for more details.<br>
+ As an example to disable the "Math Renderer" menu item in the "Math
+ Settings" menu of MathJax:
+\verbatim
+MATHJAX_CODE = \
+  MathJax.Hub.Config({ \
+   menuSettings: { \
+    showRenderer: false, \
+   } \
+  });
+\endverbatim
+
 \anchor cfg_searchengine
 <dt>\c SEARCHENGINE <dd>
  \addindex SEARCHENGINE
Index: src/config.xml
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/config.xml,v
retrieving revision 1.8
diff -u -r1.8 config.xml
--- src/config.xml	20 Jan 2013 13:57:48 -0000	1.8
+++ src/config.xml	21 Jan 2013 18:45:03 -0000
@@ -1114,7 +1114,7 @@
 ' defval='0'/> 
     <option type='enum' id='MATHJAX_FORMAT' defval='HTML-CSS' docs='
 When MathJax is enabled you can set the default output format to be used for 
-thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and 
+the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and 
 SVG. The default value is HTML-CSS, which is slower, but has the best 
 compatibility. 
 '>
@@ -1137,6 +1137,11 @@
 names that should be enabled during MathJax rendering. 
 ' depends='USE_MATHJAX'>
     </option>
+    <option type='string' id='MATHJAX_CODE' format='string' docs='
+The MATHJAX_CODE tag can be used to specify one or more javascript 
+pieces of code that will be used on startup of the MathJax code. 
+' depends='USE_MATHJAX'>
+    </option>
     <option type='bool' id='SEARCHENGINE' docs='
 When the SEARCHENGINE tag is enabled doxygen will generate a search box 
 for the HTML output. The underlying search engine uses javascript 
Index: src/configoptions.cpp
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/configoptions.cpp,v
retrieving revision 1.8
diff -u -r1.8 configoptions.cpp
--- src/configoptions.cpp	20 Jan 2013 13:57:48 -0000	1.8
+++ src/configoptions.cpp	21 Jan 2013 18:45:07 -0000
@@ -1634,7 +1634,7 @@
   ce = cfg->addEnum(
                  "MATHJAX_FORMAT",
                  "When MathJax is enabled you can set the default output format to be used for\n"
-                 "thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and\n"
+                 "the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and\n"
                  "SVG. The default value is HTML-CSS, which is slower, but has the best\n"
                  "compatibility.",
                  "HTML-CSS"
@@ -1664,6 +1664,13 @@
                 );
   cl->addDependency("USE_MATHJAX");
   //----
+  cs = cfg->addString(
+                 "MATHJAX_CODE",
+                 "The MATHJAX_CODE tag can be used to specify one or more javascript\n"
+                 "pieces of code that will be used on startup of the MathJax code."
+                );
+  cs->addDependency("USE_MATHJAX");
+  //----
   cb = cfg->addBool(
                  "SEARCHENGINE",
                  "When the SEARCHENGINE tag is enabled doxygen will generate a search box\n"
Index: src/htmlgen.cpp
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/htmlgen.cpp,v
retrieving revision 1.10
diff -u -r1.10 htmlgen.cpp
--- src/htmlgen.cpp	20 Jan 2013 13:57:49 -0000	1.10
+++ src/htmlgen.cpp	21 Jan 2013 18:44:45 -0000
@@ -1176,8 +1176,16 @@
     }
     mathJaxJs += "],\n"
                  "    jax: [\"input/TeX\",\"output/"+mathJaxFormat+"\"],\n"
-                 "});\n"
-                 "</script>";
+                 "  });\n";
+
+    QCString mathJaxCode   = Config_getString("MATHJAX_CODE");
+    if (!mathJaxCode.isEmpty())
+    {
+      mathJaxJs += mathJaxCode;
+      mathJaxJs += "\n";
+    }
+    mathJaxJs += "</script>\n";
+
     mathJaxJs += "<script src=\"" + path + "MathJax.js\"></script>\n";
   }
 
