Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Update KeenType library

AuthorDaveJarvis <email>
Date2023-01-22 21:57:06 GMT-0800
Commitea14846157f8cc768c5590d0bc936bb7e4983af6
Parent1226250
Delta9 lines added, 3 lines removed, 6-line increase
src/main/java/com/keenwrite/preview/MathRenderer.java
/**
- * This method only takes a few seconds to generate
+ * Converts a TeX-based equation into an SVG document.
*
- * @param equation A mathematical expression to render.
+ * @param equation A mathematical expression to render, without sigils.
* @return The given string with all formulas transformed into SVG format.
*/
public static Document toDocument( final String equation ) {
return DocumentParser.parse( toString( equation ) );
}
- private static String toString( final String equation ) {
+ /**
+ * Converts a TeX-based equation into an SVG document.
+ *
+ * @param equation A mathematical expression to render, without sigils.
+ * @return The given string with all formulas transformed into SVG format.
+ */
+ public static String toString( final String equation ) {
return sTypesetter.toSvg( "$" + equation + "$" );
}