Support for MathJax extensions (patch)
David Munger <[email protected]>
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <CAKdLyociehDFbx6h=zOvtV8v3PAuLNiNzQNSRETLgVj0NBf8Dw@mail.gmail.com> |
Hello, This is my first patch, so I am not sure if this is the proper way to submit it. This adds support for MathJax extensions through the MATHJAX_EXTENSIONS config option. For example, use: MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols Best regards, David Munger ------------------------------------------------------------------------------ Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ _______________________________________________ Doxygen-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/doxygen-develop
mathjaxext.patch
(text/x-patch, 1.5 KB)
Index: src/config.xml
===================================================================
--- src/config.xml (révision 769)
+++ src/config.xml (copie de travail)
@@ -1052,6 +1052,11 @@
MathJax, but it is strongly recommended to install a local copy of MathJax
before deployment.
' defval='http://www.mathjax.org/mathjax'/>
+ <option type='list' id='MATHJAX_EXTENSIONS' format='string' docs='
+The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
+names that should be enabled during MathJax rendering.
+' 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/htmlgen.cpp
===================================================================
--- src/htmlgen.cpp (révision 769)
+++ src/htmlgen.cpp (copie de travail)
@@ -1262,7 +1262,17 @@
}
t << "<script src=\"" << path << "MathJax.js\">\n";
t << " MathJax.Hub.Config({\n";
- t << " extensions: [\"tex2jax.js\"],\n";
+ t << " extensions: [\"tex2jax.js\"";
+ {
+ QStrList &mathJaxExtensions = Config_getList("MATHJAX_EXTENSIONS");
+ const char *s = mathJaxExtensions.first();
+ while (s)
+ {
+ t << ", \"" << s << ".js\"";
+ s = mathJaxExtensions.next();
+ }
+ }
+ t << "],\n";
t << " jax: [\"input/TeX\",\"output/HTML-CSS\"],\n";
t << "});\n";
t << "</script>\n";