Adding extension project to support MathML syntax through j2html. (#223)
- Based on PR #220 by matthew-mccall.
This commit is contained in:
101
j2html-ext-mathml/.gitignore
vendored
Normal file
101
j2html-ext-mathml/.gitignore
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
# Created by https://www.gitignore.io
|
||||
|
||||
### Intellij ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
|
||||
|
||||
*.iml
|
||||
|
||||
## Directory-based project format:
|
||||
.idea/
|
||||
# if you remove the above rule, at least ignore the following:
|
||||
|
||||
# User-specific stuff:
|
||||
# .idea/workspace.xml
|
||||
# .idea/tasks.xml
|
||||
# .idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
# .idea/dataSources.ids
|
||||
# .idea/dataSources.xml
|
||||
# .idea/sqlDataSources.xml
|
||||
# .idea/dynamic.xml
|
||||
# .idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
# .idea/gradle.xml
|
||||
# .idea/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
# .idea/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
|
||||
|
||||
### Windows ###
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
|
||||
### Java ###
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
|
||||
### Maven ###
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
|
||||
### Eclipse ###
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
buildNumber.properties
|
||||
130
j2html-ext-mathml/pom.xml
Normal file
130
j2html-ext-mathml/pom.xml
Normal file
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.j2html</groupId>
|
||||
<artifactId>j2html-parent</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>j2html-ext-mathml</name>
|
||||
<artifactId>j2html-ext-mathml</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.j2html</groupId>
|
||||
<artifactId>j2html</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.j2html</groupId>
|
||||
<artifactId>j2html-codegen-maven-plugin</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate-source-files</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<modelFile>${project.basedir}/src/main/models/mathml.model</modelFile>
|
||||
<attributePackage>com.j2html.mathml.attributes</attributePackage>
|
||||
<tagPackage>com.j2html.mathml.tags</tagPackage>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default</id>
|
||||
<goals>
|
||||
<goal>perform</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<pomFileName>pom.xml</pomFileName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
</manifest>
|
||||
<manifestEntries>
|
||||
<Automatic-Module-Name>com.j2html</Automatic-Module-Name>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-manifest</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!--plugin>
|
||||
<groupId>org.revapi</groupId>
|
||||
<artifactId>revapi-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<oldArtifacts>
|
||||
<artifact>com.j2html:j2html-ext-mathml:1.6.0</artifact>
|
||||
</oldArtifacts>
|
||||
<analysisConfiguration>
|
||||
<revapi.differences>
|
||||
<differences>
|
||||
|
||||
</differences>
|
||||
</revapi.differences>
|
||||
</analysisConfiguration>
|
||||
</configuration>
|
||||
</plugin-->
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
247
j2html-ext-mathml/src/main/java/com/j2html/mathml/MathML.java
Normal file
247
j2html-ext-mathml/src/main/java/com/j2html/mathml/MathML.java
Normal file
@@ -0,0 +1,247 @@
|
||||
package com.j2html.mathml;
|
||||
|
||||
import com.j2html.mathml.tags.*;
|
||||
import j2html.tags.DomContent;
|
||||
|
||||
public class MathML {
|
||||
|
||||
public static AnnotationTag annotation(String text) {
|
||||
return new AnnotationTag().withText(text);
|
||||
}
|
||||
|
||||
public static AnnotationTag annotation(DomContent... dc) {
|
||||
return new AnnotationTag().with(dc);
|
||||
}
|
||||
|
||||
public static MactionTag maction(String text) {
|
||||
return new MactionTag().withText(text);
|
||||
}
|
||||
|
||||
public static MactionTag maction(DomContent... dc) {
|
||||
return new MactionTag().with(dc);
|
||||
}
|
||||
|
||||
public static MathTag math(String text) {
|
||||
return new MathTag().withText(text);
|
||||
}
|
||||
|
||||
public static MathTag math(DomContent... dc) {
|
||||
return new MathTag().with(dc);
|
||||
}
|
||||
|
||||
public static MerrorTag merror(String text) {
|
||||
return new MerrorTag().withText(text);
|
||||
}
|
||||
|
||||
public static MerrorTag merror(DomContent... dc) {
|
||||
return new MerrorTag().with(dc);
|
||||
}
|
||||
|
||||
public static MfracTag mfrac(String text) {
|
||||
return new MfracTag().withText(text);
|
||||
}
|
||||
|
||||
public static MfracTag mfrac(DomContent... dc) {
|
||||
return new MfracTag().with(dc);
|
||||
}
|
||||
|
||||
public static MiTag mi(String text) {
|
||||
return new MiTag().withText(text);
|
||||
}
|
||||
|
||||
public static MiTag mi(DomContent... dc) {
|
||||
return new MiTag().with(dc);
|
||||
}
|
||||
|
||||
public static MmultiscriptsTag mmultiscripts(String text) {
|
||||
return new MmultiscriptsTag().withText(text);
|
||||
}
|
||||
|
||||
public static MmultiscriptsTag mmultiscripts(DomContent... dc) {
|
||||
return new MmultiscriptsTag().with(dc);
|
||||
}
|
||||
|
||||
public static MnTag mn(String text) {
|
||||
return new MnTag().withText(text);
|
||||
}
|
||||
|
||||
public static MnTag mn(DomContent... dc) {
|
||||
return new MnTag().with(dc);
|
||||
}
|
||||
|
||||
public static MoTag mo(String text) {
|
||||
return new MoTag().withText(text);
|
||||
}
|
||||
|
||||
public static MoTag mo(DomContent... dc) {
|
||||
return new MoTag().with(dc);
|
||||
}
|
||||
|
||||
public static MoverTag mover(String text) {
|
||||
return new MoverTag().withText(text);
|
||||
}
|
||||
|
||||
public static MoverTag mover(DomContent... dc) {
|
||||
return new MoverTag().with(dc);
|
||||
}
|
||||
|
||||
public static MpaddedTag mpadded(String text) {
|
||||
return new MpaddedTag().withText(text);
|
||||
}
|
||||
|
||||
public static MpaddedTag mpadded(DomContent... dc) {
|
||||
return new MpaddedTag().with(dc);
|
||||
}
|
||||
|
||||
public static MphantomTag mphantom(String text) {
|
||||
return new MphantomTag().withText(text);
|
||||
}
|
||||
|
||||
public static MphantomTag mphantom(DomContent... dc) {
|
||||
return new MphantomTag().with(dc);
|
||||
}
|
||||
|
||||
public static MprescriptsTag mprescripts(String text) {
|
||||
return new MprescriptsTag().withText(text);
|
||||
}
|
||||
|
||||
public static MprescriptsTag mprescripts(DomContent... dc) {
|
||||
return new MprescriptsTag().with(dc);
|
||||
}
|
||||
|
||||
public static MrootTag mroot(String text) {
|
||||
return new MrootTag().withText(text);
|
||||
}
|
||||
|
||||
public static MrootTag mroot(DomContent... dc) {
|
||||
return new MrootTag().with(dc);
|
||||
}
|
||||
|
||||
public static MrowTag mrow(String text) {
|
||||
return new MrowTag().withText(text);
|
||||
}
|
||||
|
||||
public static MrowTag mrow(DomContent... dc) {
|
||||
return new MrowTag().with(dc);
|
||||
}
|
||||
|
||||
public static MsTag ms(String text) {
|
||||
return new MsTag().withText(text);
|
||||
}
|
||||
|
||||
public static MsTag ms(DomContent... dc) {
|
||||
return new MsTag().with(dc);
|
||||
}
|
||||
|
||||
public static MspaceTag mspace(String text) {
|
||||
return new MspaceTag().withText(text);
|
||||
}
|
||||
|
||||
public static MspaceTag mspace(DomContent... dc) {
|
||||
return new MspaceTag().with(dc);
|
||||
}
|
||||
|
||||
public static MsqrtTag msqrt(String text) {
|
||||
return new MsqrtTag().withText(text);
|
||||
}
|
||||
|
||||
public static MsqrtTag msqrt(DomContent... dc) {
|
||||
return new MsqrtTag().with(dc);
|
||||
}
|
||||
|
||||
public static MstyleTag mstyle(String text) {
|
||||
return new MstyleTag().withText(text);
|
||||
}
|
||||
|
||||
public static MstyleTag mstyle(DomContent... dc) {
|
||||
return new MstyleTag().with(dc);
|
||||
}
|
||||
|
||||
public static MsubTag msub(String text) {
|
||||
return new MsubTag().withText(text);
|
||||
}
|
||||
|
||||
public static MsubTag msub(DomContent... dc) {
|
||||
return new MsubTag().with(dc);
|
||||
}
|
||||
|
||||
public static MsubsupTag msubsup(String text) {
|
||||
return new MsubsupTag().withText(text);
|
||||
}
|
||||
|
||||
public static MsubsupTag msubsup(DomContent... dc) {
|
||||
return new MsubsupTag().with(dc);
|
||||
}
|
||||
|
||||
public static MsupTag msup(String text) {
|
||||
return new MsupTag().withText(text);
|
||||
}
|
||||
|
||||
public static MsupTag msup(DomContent... dc) {
|
||||
return new MsupTag().with(dc);
|
||||
}
|
||||
|
||||
public static MtableTag mtable(String text) {
|
||||
return new MtableTag().withText(text);
|
||||
}
|
||||
|
||||
public static MtableTag mtable(DomContent... dc) {
|
||||
return new MtableTag().with(dc);
|
||||
}
|
||||
|
||||
public static MtdTag mtd(String text) {
|
||||
return new MtdTag().withText(text);
|
||||
}
|
||||
|
||||
public static MtdTag mtd(DomContent... dc) {
|
||||
return new MtdTag().with(dc);
|
||||
}
|
||||
|
||||
public static MtextTag mtext(String text) {
|
||||
return new MtextTag().withText(text);
|
||||
}
|
||||
|
||||
public static MtextTag mtext(DomContent... dc) {
|
||||
return new MtextTag().with(dc);
|
||||
}
|
||||
|
||||
public static MtrTag mtr(String text) {
|
||||
return new MtrTag().withText(text);
|
||||
}
|
||||
|
||||
public static MtrTag mtr(DomContent... dc) {
|
||||
return new MtrTag().with(dc);
|
||||
}
|
||||
|
||||
public static MunderTag munder(String text) {
|
||||
return new MunderTag().withText(text);
|
||||
}
|
||||
|
||||
public static MunderTag munder(DomContent... dc) {
|
||||
return new MunderTag().with(dc);
|
||||
}
|
||||
|
||||
public static MunderoverTag munderover(String text) {
|
||||
return new MunderoverTag().withText(text);
|
||||
}
|
||||
|
||||
public static MunderoverTag munderover(DomContent... dc) {
|
||||
return new MunderoverTag().with(dc);
|
||||
}
|
||||
|
||||
public static NoneTag none(String text) {
|
||||
return new NoneTag().withText(text);
|
||||
}
|
||||
|
||||
public static NoneTag none(DomContent... dc) {
|
||||
return new NoneTag().with(dc);
|
||||
}
|
||||
|
||||
public static SemanticsTag semantics(String text) {
|
||||
return new SemanticsTag().withText(text);
|
||||
}
|
||||
|
||||
public static SemanticsTag semantics(DomContent... dc) {
|
||||
return new SemanticsTag().with(dc);
|
||||
}
|
||||
}
|
||||
254
j2html-ext-mathml/src/main/models/mathml.model
Normal file
254
j2html-ext-mathml/src/main/models/mathml.model
Normal file
@@ -0,0 +1,254 @@
|
||||
ELEMENT[annotation]
|
||||
ELEMENT[maction]
|
||||
ELEMENT[math]
|
||||
ELEMENT[merror]
|
||||
ELEMENT[mfrac]
|
||||
ELEMENT[mi]
|
||||
ELEMENT[mmultiscripts]
|
||||
ELEMENT[mn]
|
||||
ELEMENT[mo]
|
||||
ELEMENT[mover]
|
||||
ELEMENT[mpadded]
|
||||
ELEMENT[mphantom]
|
||||
ELEMENT[mprescripts]
|
||||
ELEMENT[mroot]
|
||||
ELEMENT[mrow]
|
||||
ELEMENT[ms]
|
||||
ELEMENT[mspace]
|
||||
ELEMENT[msqrt]
|
||||
ELEMENT[mstyle]
|
||||
ELEMENT[msub]
|
||||
ELEMENT[msubsup]
|
||||
ELEMENT[msup]
|
||||
ELEMENT[mtable]
|
||||
ELEMENT[mtd]
|
||||
ELEMENT[mtext]
|
||||
ELEMENT[mtr]
|
||||
ELEMENT[munder]
|
||||
ELEMENT[munderover]
|
||||
ELEMENT[none]
|
||||
ELEMENT[semantics]
|
||||
|
||||
BOOLEAN[displaystyle]
|
||||
ATTRIBUTE[annotation:displaystyle]
|
||||
ATTRIBUTE[maction:displaystyle]
|
||||
ATTRIBUTE[math:displaystyle]
|
||||
ATTRIBUTE[merror:displaystyle]
|
||||
ATTRIBUTE[mfrac:displaystyle]
|
||||
ATTRIBUTE[mi:displaystyle]
|
||||
ATTRIBUTE[mmultiscripts:displaystyle]
|
||||
ATTRIBUTE[mn:displaystyle]
|
||||
ATTRIBUTE[mo:displaystyle]
|
||||
ATTRIBUTE[mover:displaystyle]
|
||||
ATTRIBUTE[mpadded:displaystyle]
|
||||
ATTRIBUTE[mphantom:displaystyle]
|
||||
ATTRIBUTE[mprescripts:displaystyle]
|
||||
ATTRIBUTE[mroot:displaystyle]
|
||||
ATTRIBUTE[mrow:displaystyle]
|
||||
ATTRIBUTE[ms:displaystyle]
|
||||
ATTRIBUTE[mspace:displaystyle]
|
||||
ATTRIBUTE[msqrt:displaystyle]
|
||||
ATTRIBUTE[mstyle:displaystyle]
|
||||
ATTRIBUTE[msub:displaystyle]
|
||||
ATTRIBUTE[msubsup:displaystyle]
|
||||
ATTRIBUTE[msup:displaystyle]
|
||||
ATTRIBUTE[mtable:displaystyle]
|
||||
ATTRIBUTE[mtd:displaystyle]
|
||||
ATTRIBUTE[mtext:displaystyle]
|
||||
ATTRIBUTE[mtr:displaystyle]
|
||||
ATTRIBUTE[munder:displaystyle]
|
||||
ATTRIBUTE[munderover:displaystyle]
|
||||
ATTRIBUTE[none:displaystyle]
|
||||
ATTRIBUTE[semantics:displaystyle]
|
||||
|
||||
BOOLEAN[mathbackground]
|
||||
ATTRIBUTE[annotation:mathbackground]
|
||||
ATTRIBUTE[maction:mathbackground]
|
||||
ATTRIBUTE[math:mathbackground]
|
||||
ATTRIBUTE[merror:mathbackground]
|
||||
ATTRIBUTE[mfrac:mathbackground]
|
||||
ATTRIBUTE[mi:mathbackground]
|
||||
ATTRIBUTE[mmultiscripts:mathbackground]
|
||||
ATTRIBUTE[mn:mathbackground]
|
||||
ATTRIBUTE[mo:mathbackground]
|
||||
ATTRIBUTE[mover:mathbackground]
|
||||
ATTRIBUTE[mpadded:mathbackground]
|
||||
ATTRIBUTE[mphantom:mathbackground]
|
||||
ATTRIBUTE[mprescripts:mathbackground]
|
||||
ATTRIBUTE[mroot:mathbackground]
|
||||
ATTRIBUTE[mrow:mathbackground]
|
||||
ATTRIBUTE[ms:mathbackground]
|
||||
ATTRIBUTE[mspace:mathbackground]
|
||||
ATTRIBUTE[msqrt:mathbackground]
|
||||
ATTRIBUTE[mstyle:mathbackground]
|
||||
ATTRIBUTE[msub:mathbackground]
|
||||
ATTRIBUTE[msubsup:mathbackground]
|
||||
ATTRIBUTE[msup:mathbackground]
|
||||
ATTRIBUTE[mtable:mathbackground]
|
||||
ATTRIBUTE[mtd:mathbackground]
|
||||
ATTRIBUTE[mtext:mathbackground]
|
||||
ATTRIBUTE[mtr:mathbackground]
|
||||
ATTRIBUTE[munder:mathbackground]
|
||||
ATTRIBUTE[munderover:mathbackground]
|
||||
ATTRIBUTE[none:mathbackground]
|
||||
ATTRIBUTE[semantics:mathbackground]
|
||||
|
||||
BOOLEAN[mathcolor]
|
||||
ATTRIBUTE[annotation:mathcolor]
|
||||
ATTRIBUTE[maction:mathcolor]
|
||||
ATTRIBUTE[math:mathcolor]
|
||||
ATTRIBUTE[merror:mathcolor]
|
||||
ATTRIBUTE[mfrac:mathcolor]
|
||||
ATTRIBUTE[mi:mathcolor]
|
||||
ATTRIBUTE[mmultiscripts:mathcolor]
|
||||
ATTRIBUTE[mn:mathcolor]
|
||||
ATTRIBUTE[mo:mathcolor]
|
||||
ATTRIBUTE[mover:mathcolor]
|
||||
ATTRIBUTE[mpadded:mathcolor]
|
||||
ATTRIBUTE[mphantom:mathcolor]
|
||||
ATTRIBUTE[mprescripts:mathcolor]
|
||||
ATTRIBUTE[mroot:mathcolor]
|
||||
ATTRIBUTE[mrow:mathcolor]
|
||||
ATTRIBUTE[ms:mathcolor]
|
||||
ATTRIBUTE[mspace:mathcolor]
|
||||
ATTRIBUTE[msqrt:mathcolor]
|
||||
ATTRIBUTE[mstyle:mathcolor]
|
||||
ATTRIBUTE[msub:mathcolor]
|
||||
ATTRIBUTE[msubsup:mathcolor]
|
||||
ATTRIBUTE[msup:mathcolor]
|
||||
ATTRIBUTE[mtable:mathcolor]
|
||||
ATTRIBUTE[mtd:mathcolor]
|
||||
ATTRIBUTE[mtext:mathcolor]
|
||||
ATTRIBUTE[mtr:mathcolor]
|
||||
ATTRIBUTE[munder:mathcolor]
|
||||
ATTRIBUTE[munderover:mathcolor]
|
||||
ATTRIBUTE[none:mathcolor]
|
||||
ATTRIBUTE[semantics:mathcolor]
|
||||
|
||||
BOOLEAN[mathsize]
|
||||
ATTRIBUTE[annotation:mathsize]
|
||||
ATTRIBUTE[maction:mathsize]
|
||||
ATTRIBUTE[math:mathsize]
|
||||
ATTRIBUTE[merror:mathsize]
|
||||
ATTRIBUTE[mfrac:mathsize]
|
||||
ATTRIBUTE[mi:mathsize]
|
||||
ATTRIBUTE[mmultiscripts:mathsize]
|
||||
ATTRIBUTE[mn:mathsize]
|
||||
ATTRIBUTE[mo:mathsize]
|
||||
ATTRIBUTE[mover:mathsize]
|
||||
ATTRIBUTE[mpadded:mathsize]
|
||||
ATTRIBUTE[mphantom:mathsize]
|
||||
ATTRIBUTE[mprescripts:mathsize]
|
||||
ATTRIBUTE[mroot:mathsize]
|
||||
ATTRIBUTE[mrow:mathsize]
|
||||
ATTRIBUTE[ms:mathsize]
|
||||
ATTRIBUTE[mspace:mathsize]
|
||||
ATTRIBUTE[msqrt:mathsize]
|
||||
ATTRIBUTE[mstyle:mathsize]
|
||||
ATTRIBUTE[msub:mathsize]
|
||||
ATTRIBUTE[msubsup:mathsize]
|
||||
ATTRIBUTE[msup:mathsize]
|
||||
ATTRIBUTE[mtable:mathsize]
|
||||
ATTRIBUTE[mtd:mathsize]
|
||||
ATTRIBUTE[mtext:mathsize]
|
||||
ATTRIBUTE[mtr:mathsize]
|
||||
ATTRIBUTE[munder:mathsize]
|
||||
ATTRIBUTE[munderover:mathsize]
|
||||
ATTRIBUTE[none:mathsize]
|
||||
ATTRIBUTE[semantics:mathsize]
|
||||
|
||||
BOOLEAN[mathvariant]
|
||||
ATTRIBUTE[annotation:mathvariant]
|
||||
ATTRIBUTE[maction:mathvariant]
|
||||
ATTRIBUTE[math:mathvariant]
|
||||
ATTRIBUTE[merror:mathvariant]
|
||||
ATTRIBUTE[mfrac:mathvariant]
|
||||
ATTRIBUTE[mi:mathvariant]
|
||||
ATTRIBUTE[mmultiscripts:mathvariant]
|
||||
ATTRIBUTE[mn:mathvariant]
|
||||
ATTRIBUTE[mo:mathvariant]
|
||||
ATTRIBUTE[mover:mathvariant]
|
||||
ATTRIBUTE[mpadded:mathvariant]
|
||||
ATTRIBUTE[mphantom:mathvariant]
|
||||
ATTRIBUTE[mprescripts:mathvariant]
|
||||
ATTRIBUTE[mroot:mathvariant]
|
||||
ATTRIBUTE[mrow:mathvariant]
|
||||
ATTRIBUTE[ms:mathvariant]
|
||||
ATTRIBUTE[mspace:mathvariant]
|
||||
ATTRIBUTE[msqrt:mathvariant]
|
||||
ATTRIBUTE[mstyle:mathvariant]
|
||||
ATTRIBUTE[msub:mathvariant]
|
||||
ATTRIBUTE[msubsup:mathvariant]
|
||||
ATTRIBUTE[msup:mathvariant]
|
||||
ATTRIBUTE[mtable:mathvariant]
|
||||
ATTRIBUTE[mtd:mathvariant]
|
||||
ATTRIBUTE[mtext:mathvariant]
|
||||
ATTRIBUTE[mtr:mathvariant]
|
||||
ATTRIBUTE[munder:mathvariant]
|
||||
ATTRIBUTE[munderover:mathvariant]
|
||||
ATTRIBUTE[none:mathvariant]
|
||||
ATTRIBUTE[semantics:mathvariant]
|
||||
|
||||
BOOLEAN[nonce]
|
||||
ATTRIBUTE[annotation:nonce]
|
||||
ATTRIBUTE[maction:nonce]
|
||||
ATTRIBUTE[math:nonce]
|
||||
ATTRIBUTE[merror:nonce]
|
||||
ATTRIBUTE[mfrac:nonce]
|
||||
ATTRIBUTE[mi:nonce]
|
||||
ATTRIBUTE[mmultiscripts:nonce]
|
||||
ATTRIBUTE[mn:nonce]
|
||||
ATTRIBUTE[mo:nonce]
|
||||
ATTRIBUTE[mover:nonce]
|
||||
ATTRIBUTE[mpadded:nonce]
|
||||
ATTRIBUTE[mphantom:nonce]
|
||||
ATTRIBUTE[mprescripts:nonce]
|
||||
ATTRIBUTE[mroot:nonce]
|
||||
ATTRIBUTE[mrow:nonce]
|
||||
ATTRIBUTE[ms:nonce]
|
||||
ATTRIBUTE[mspace:nonce]
|
||||
ATTRIBUTE[msqrt:nonce]
|
||||
ATTRIBUTE[mstyle:nonce]
|
||||
ATTRIBUTE[msub:nonce]
|
||||
ATTRIBUTE[msubsup:nonce]
|
||||
ATTRIBUTE[msup:nonce]
|
||||
ATTRIBUTE[mtable:nonce]
|
||||
ATTRIBUTE[mtd:nonce]
|
||||
ATTRIBUTE[mtext:nonce]
|
||||
ATTRIBUTE[mtr:nonce]
|
||||
ATTRIBUTE[munder:nonce]
|
||||
ATTRIBUTE[munderover:nonce]
|
||||
ATTRIBUTE[none:nonce]
|
||||
ATTRIBUTE[semantics:nonce]
|
||||
|
||||
BOOLEAN[scriptlevel]
|
||||
ATTRIBUTE[annotation:scriptlevel]
|
||||
ATTRIBUTE[maction:scriptlevel]
|
||||
ATTRIBUTE[math:scriptlevel]
|
||||
ATTRIBUTE[merror:scriptlevel]
|
||||
ATTRIBUTE[mfrac:scriptlevel]
|
||||
ATTRIBUTE[mi:scriptlevel]
|
||||
ATTRIBUTE[mmultiscripts:scriptlevel]
|
||||
ATTRIBUTE[mn:scriptlevel]
|
||||
ATTRIBUTE[mo:scriptlevel]
|
||||
ATTRIBUTE[mover:scriptlevel]
|
||||
ATTRIBUTE[mpadded:scriptlevel]
|
||||
ATTRIBUTE[mphantom:scriptlevel]
|
||||
ATTRIBUTE[mprescripts:scriptlevel]
|
||||
ATTRIBUTE[mroot:scriptlevel]
|
||||
ATTRIBUTE[mrow:scriptlevel]
|
||||
ATTRIBUTE[ms:scriptlevel]
|
||||
ATTRIBUTE[mspace:scriptlevel]
|
||||
ATTRIBUTE[msqrt:scriptlevel]
|
||||
ATTRIBUTE[mstyle:scriptlevel]
|
||||
ATTRIBUTE[msub:scriptlevel]
|
||||
ATTRIBUTE[msubsup:scriptlevel]
|
||||
ATTRIBUTE[msup:scriptlevel]
|
||||
ATTRIBUTE[mtable:scriptlevel]
|
||||
ATTRIBUTE[mtd:scriptlevel]
|
||||
ATTRIBUTE[mtext:scriptlevel]
|
||||
ATTRIBUTE[mtr:scriptlevel]
|
||||
ATTRIBUTE[munder:scriptlevel]
|
||||
ATTRIBUTE[munderover:scriptlevel]
|
||||
ATTRIBUTE[none:scriptlevel]
|
||||
ATTRIBUTE[semantics:scriptlevel]
|
||||
42
j2html-ext-mathml/src/test/java/MathMLTests.java
Normal file
42
j2html-ext-mathml/src/test/java/MathMLTests.java
Normal file
@@ -0,0 +1,42 @@
|
||||
import org.junit.Test;
|
||||
|
||||
import static com.j2html.mathml.MathML.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class MathMLTests {
|
||||
|
||||
@Test
|
||||
public void all_tags_render_containers(){
|
||||
assertEquals("<annotation></annotation>", annotation().render());
|
||||
assertEquals("<maction></maction>", maction().render());
|
||||
assertEquals("<math></math>", math().render());
|
||||
assertEquals("<merror></merror>", merror().render());
|
||||
assertEquals("<mfrac></mfrac>", mfrac().render());
|
||||
assertEquals("<mi></mi>", mi().render());
|
||||
assertEquals("<mmultiscripts></mmultiscripts>", mmultiscripts().render());
|
||||
assertEquals("<mn></mn>", mn().render());
|
||||
assertEquals("<mo></mo>", mo().render());
|
||||
assertEquals("<mover></mover>", mover().render());
|
||||
assertEquals("<mpadded></mpadded>", mpadded().render());
|
||||
assertEquals("<mphantom></mphantom>", mphantom().render());
|
||||
assertEquals("<mprescripts></mprescripts>", mprescripts().render());
|
||||
assertEquals("<mroot></mroot>", mroot().render());
|
||||
assertEquals("<mrow></mrow>", mrow().render());
|
||||
assertEquals("<ms></ms>", ms().render());
|
||||
assertEquals("<mspace></mspace>", mspace().render());
|
||||
assertEquals("<msqrt></msqrt>", msqrt().render());
|
||||
assertEquals("<mstyle></mstyle>", mstyle().render());
|
||||
assertEquals("<msub></msub>", msub().render());
|
||||
assertEquals("<msubsup></msubsup>", msubsup().render());
|
||||
assertEquals("<msup></msup>", msup().render());
|
||||
assertEquals("<mtable></mtable>", mtable().render());
|
||||
assertEquals("<mtd></mtd>", mtd().render());
|
||||
assertEquals("<mtext></mtext>", mtext().render());
|
||||
assertEquals("<mtr></mtr>", mtr().render());
|
||||
assertEquals("<munder></munder>", munder().render());
|
||||
assertEquals("<munderover></munderover>", munderover().render());
|
||||
assertEquals("<none></none>", none().render());
|
||||
assertEquals("<semantics></semantics>", semantics().render());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user