Skip to content

Commit c757bb5

Browse files
authored
Merge pull request #27 from str4d/26-mathjax
Render all maths with MathJax
2 parents dc9f58f + b412c69 commit c757bb5

File tree

12 files changed

+284
-250
lines changed

12 files changed

+284
-250
lines changed

pom.xml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,23 @@
9797
<groupId>org.apache.maven.plugins</groupId>
9898
<artifactId>maven-javadoc-plugin</artifactId>
9999
<version>2.9.1</version>
100+
<configuration>
101+
<header>&lt;script type='text/x-mathjax-config'&gt;
102+
MathJax.Hub.Config({
103+
tex2jax: {
104+
inlineMath: [ ['$','$'] ],
105+
processEscapes: true
106+
}
107+
});
108+
&lt;/script&gt;
109+
&lt;script type='text/javascript' src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'&gt;&lt;/script&gt;</header>
110+
</configuration>
100111
<executions>
101112
<execution>
102113
<id>attach-javadocs</id>
103114
<goals>
104115
<goal>jar</goal>
105116
</goals>
106-
<configuration> <!-- There are some malformed javadoc comments -->
107-
<failOnError>false</failOnError>
108-
</configuration>
109117
</execution>
110118
</executions>
111119
</plugin>

src/net/i2p/crypto/eddsa/math/Curve.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
/**
1717
* A twisted Edwards curve.
18-
* Points on the curve satisfy -x^2 + y^2 = 1 + d x^2y^2
18+
* Points on the curve satisfy $-x^2 + y^2 = 1 + d x^2y^2$
1919
* @author str4d
2020
*
2121
*/

src/net/i2p/crypto/eddsa/math/Encoding.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
package net.i2p.crypto.eddsa.math;
1313

1414
/**
15-
* Common interface for all (b-1)-bit encodings of elements
15+
* Common interface for all $(b-1)$-bit encodings of elements
1616
* of EdDSA finite fields.
1717
* @author str4d
1818
*
@@ -27,25 +27,25 @@ public synchronized void setField(Field f) {
2727
}
2828

2929
/**
30-
* Encode a FieldElement in its (b-1)-bit encoding.
31-
* @return the (b-1)-bit encoding of this FieldElement.
30+
* Encode a FieldElement in its $(b-1)$-bit encoding.
31+
* @return the $(b-1)$-bit encoding of this FieldElement.
3232
*/
3333
public abstract byte[] encode(FieldElement x);
3434

3535
/**
36-
* Decode a FieldElement from its (b-1)-bit encoding.
36+
* Decode a FieldElement from its $(b-1)$-bit encoding.
3737
* The highest bit is masked out.
38-
* @param in the (b-1)-bit encoding of a FieldElement.
38+
* @param in the $(b-1)$-bit encoding of a FieldElement.
3939
* @return the FieldElement represented by 'val'.
4040
*/
4141
public abstract FieldElement decode(byte[] in);
4242

4343
/**
4444
* From the Ed25519 paper:<br>
45-
* x is negative if the (b-1)-bit encoding of x is lexicographically larger
46-
* than the (b-1)-bit encoding of -x. If q is an odd prime and the encoding
47-
* is the little-endian representation of {0, 1,..., q-1} then the negative
48-
* elements of F_q are {1, 3, 5,..., q-2}.
45+
* $x$ is negative if the $(b-1)$-bit encoding of $x$ is lexicographically larger
46+
* than the $(b-1)$-bit encoding of -x. If $q$ is an odd prime and the encoding
47+
* is the little-endian representation of $\{0, 1,\dots, q-1\}$ then the negative
48+
* elements of $F_q$ are $\{1, 3, 5,\dots, q-2\}$.
4949
* @return true if negative
5050
*/
5151
public abstract boolean isNegative(FieldElement x);

src/net/i2p/crypto/eddsa/math/FieldElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public FieldElement(Field f) {
2929
}
3030

3131
/**
32-
* Encode a FieldElement in its (b-1)-bit encoding.
33-
* @return the (b-1)-bit encoding of this FieldElement.
32+
* Encode a FieldElement in its $(b-1)$-bit encoding.
33+
* @return the $(b-1)$-bit encoding of this FieldElement.
3434
*/
3535
public byte[] toByteArray() {
3636
return f.getEncoding().encode(this);

0 commit comments

Comments
 (0)