Enabled LaTeX expressions in javadoc via MathJax. JIRA: MATH-1006.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1504314 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2013-07-17 22:42:07 +00:00
parent ce96ee600f
commit a934dbbb88
4 changed files with 33 additions and 1 deletions

View File

@ -247,6 +247,7 @@
doctitle="<h1>${component.title} ${component.version}</h1>"
windowtitle="${component.title} ${component.version}"
bottom="Copyright (c) 2003-${current.year} Apache Software Foundation"
additionalparam="-header '<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>'"
classpathref="compile.classpath">
<link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
</javadoc>

19
pom.xml
View File

@ -455,7 +455,15 @@
</execution>
</executions>
</plugin>
<!-- MathJax -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<additionalparam>-header &apos;&lt;script type=&quot;text/javascript&quot; src=&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;&gt;&lt;/script&gt;&apos;</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
@ -578,6 +586,15 @@
</reportSet>
</reportSets>
</plugin>
<!-- MathJax -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<additionalparam>-header &apos;&lt;script type=&quot;text/javascript&quot; src=&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;&gt;&lt;/script&gt;&apos;</additionalparam>
</configuration>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -51,6 +51,9 @@ If the output is not quite correct, check for invisible trailing spaces!
</properties>
<body>
<release version="x.y" date="TBD" description="TBD">
<action dev="psteitz" type="update" issue="MATH-1006">
Enabled LaTeX expressions in javadoc via MathJax.
</action>
<action dev="sebb" type="add" issue="MATH-1000">
Add mode function to Frequency class.
</action>

View File

@ -174,6 +174,17 @@
<li>
External references or full statements of definitions for all mathematical
terms used in component documentation <i>must</i> be provided.</li>
<li>
Commons math javadoc generation now supports embedded LaTeX formulas via the
<a href="http://www.mathjax.org">MathJax</a> javascript display engine. To
embed mathematical expressions formatted in LaTeX in javadoc, simply surround
the expression to be formatted with either &#92;( and &#92;) for inline
formulas, or &#92;[ and &#92;] to have the formula appear on a separate line.
For example, &#92;(a^2 + b^2 = c^2&#92;) will render an in-line formula
saying thqt (a, b, c) is Pythagorean triplet. Using &#92;[ and &#92;] on
the ends will render the same formula on a separate line. See the MathJax
and LaTex documentation for details on how to represent formulas and
escape special characters.</li>
<li>
Implementations <i>should</i> use standard algorithms and
references or full descriptions of all algorithms <i>should</i> be