On 7/17/13 4:08 PM, sebb wrote: > On 17 July 2013 23:42, <[email protected]> wrote: >> Author: psteitz >> Date: Wed Jul 17 22:42:07 2013 >> New Revision: 1504314 >> >> URL: http://svn.apache.org/r1504314 >> Log: >> Enabled LaTeX expressions in javadoc via MathJax. JIRA: MATH-1006. >> >> Modified: >> commons/proper/math/trunk/build.xml >> commons/proper/math/trunk/pom.xml >> commons/proper/math/trunk/src/changes/changes.xml >> commons/proper/math/trunk/src/site/xdoc/developers.xml >> >> Modified: commons/proper/math/trunk/build.xml >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/build.xml?rev=1504314&r1=1504313&r2=1504314&view=diff >> ============================================================================== >> --- commons/proper/math/trunk/build.xml (original) >> +++ commons/proper/math/trunk/build.xml Wed Jul 17 22:42:07 2013 >> @@ -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> >> >> Modified: commons/proper/math/trunk/pom.xml >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/pom.xml?rev=1504314&r1=1504313&r2=1504314&view=diff >> ============================================================================== >> --- commons/proper/math/trunk/pom.xml (original) >> +++ commons/proper/math/trunk/pom.xml Wed Jul 17 22:42:07 2013 >> @@ -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> > Version should be defined as a property. > CP32 defines commons.javadoc.version as 2.9.1, so the line could be > dropped if Math moves to CP32. > Otherwise, just define commons.javadoc.version as 2.9.1 locally, and > drop the version lines (CP30 defines them)
Thanks for reviewing. I was not sure it would be correctly inherited, so put it in explicitly. If we can count on it coming correctly from the parent, I would say drop it. Phil >> + <configuration> >> + <additionalparam>-header '<script >> type="text/javascript" >> src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>'</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> > Version is unnecessary - see above. > >> + <configuration> >> + <additionalparam>-header '<script >> type="text/javascript" >> src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>'</additionalparam> >> + </configuration> >> + </plugin> >> </plugins> >> </reporting> >> </project> >> >> Modified: commons/proper/math/trunk/src/changes/changes.xml >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/changes/changes.xml?rev=1504314&r1=1504313&r2=1504314&view=diff >> ============================================================================== >> --- commons/proper/math/trunk/src/changes/changes.xml (original) >> +++ commons/proper/math/trunk/src/changes/changes.xml Wed Jul 17 22:42:07 >> 2013 >> @@ -51,6 +51,9 @@ If the output is not quite correct, chec >> </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> >> >> Modified: commons/proper/math/trunk/src/site/xdoc/developers.xml >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/xdoc/developers.xml?rev=1504314&r1=1504313&r2=1504314&view=diff >> ============================================================================== >> --- commons/proper/math/trunk/src/site/xdoc/developers.xml (original) >> +++ commons/proper/math/trunk/src/site/xdoc/developers.xml Wed Jul 17 >> 22:42:07 2013 >> @@ -175,6 +175,17 @@ >> 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 \( and \) for >> inline >> + formulas, or \[ and \] to have the formula appear on a >> separate line. >> + For example, \(a^2 + b^2 = c^2\) will render an in-line >> formula >> + saying thqt (a, b, c) is Pythagorean triplet. Using \[ and >> \] 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 >> provided.</li> >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
