├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── layout │ │ │ │ ├── card_math_recyclerview.xml │ │ │ │ ├── activity_mathview_list.xml │ │ │ │ ├── activity_runtime_layout.xml │ │ │ │ ├── activity_mathview_in_layout.xml │ │ │ │ └── activity_main.xml │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ ├── java │ │ │ └── hourglass │ │ │ │ └── github │ │ │ │ └── in │ │ │ │ └── katex │ │ │ │ ├── activities │ │ │ │ ├── MathviewInLayoutActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MathViewAdditionAtRuntime.java │ │ │ │ └── MathViewListActivity.java │ │ │ │ ├── Helpers.java │ │ │ │ ├── adapters │ │ │ │ └── MathListAdapter.java │ │ │ │ └── DataHelpers.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── hourglass │ │ │ └── github │ │ │ └── in │ │ │ └── katex │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── hourglass │ │ └── github │ │ └── in │ │ └── katex │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── katexmathview ├── .gitignore ├── src │ ├── main │ │ ├── assets │ │ │ ├── webviewstyle.css │ │ │ ├── katex │ │ │ │ ├── contrib │ │ │ │ │ ├── copy-tex.min.css │ │ │ │ │ ├── copy-tex.css │ │ │ │ │ ├── mathtex-script-type.mjs │ │ │ │ │ ├── mathtex-script-type.min.js │ │ │ │ │ ├── copy-tex.min.js │ │ │ │ │ ├── copy-tex.mjs │ │ │ │ │ ├── auto-render.min.js │ │ │ │ │ ├── mathtex-script-type.js │ │ │ │ │ ├── auto-render.mjs │ │ │ │ │ ├── copy-tex.js │ │ │ │ │ └── auto-render.js │ │ │ │ ├── fonts │ │ │ │ │ ├── KaTeX_Main-Bold.ttf │ │ │ │ │ ├── KaTeX_Main-Bold.woff │ │ │ │ │ ├── KaTeX_AMS-Regular.ttf │ │ │ │ │ ├── KaTeX_AMS-Regular.woff │ │ │ │ │ ├── KaTeX_AMS-Regular.woff2 │ │ │ │ │ ├── KaTeX_Fraktur-Bold.ttf │ │ │ │ │ ├── KaTeX_Fraktur-Bold.woff │ │ │ │ │ ├── KaTeX_Main-Bold.woff2 │ │ │ │ │ ├── KaTeX_Main-Italic.ttf │ │ │ │ │ ├── KaTeX_Main-Italic.woff │ │ │ │ │ ├── KaTeX_Main-Italic.woff2 │ │ │ │ │ ├── KaTeX_Main-Regular.ttf │ │ │ │ │ ├── KaTeX_Main-Regular.woff │ │ │ │ │ ├── KaTeX_Math-Italic.ttf │ │ │ │ │ ├── KaTeX_Math-Italic.woff │ │ │ │ │ ├── KaTeX_Math-Italic.woff2 │ │ │ │ │ ├── KaTeX_Size1-Regular.ttf │ │ │ │ │ ├── KaTeX_Size2-Regular.ttf │ │ │ │ │ ├── KaTeX_Size3-Regular.ttf │ │ │ │ │ ├── KaTeX_Size4-Regular.ttf │ │ │ │ │ ├── KaTeX_Fraktur-Bold.woff2 │ │ │ │ │ ├── KaTeX_Fraktur-Regular.ttf │ │ │ │ │ ├── KaTeX_Main-BoldItalic.ttf │ │ │ │ │ ├── KaTeX_Main-Regular.woff2 │ │ │ │ │ ├── KaTeX_Math-BoldItalic.ttf │ │ │ │ │ ├── KaTeX_SansSerif-Bold.ttf │ │ │ │ │ ├── KaTeX_SansSerif-Bold.woff │ │ │ │ │ ├── KaTeX_Script-Regular.ttf │ │ │ │ │ ├── KaTeX_Script-Regular.woff │ │ │ │ │ ├── KaTeX_Size1-Regular.woff │ │ │ │ │ ├── KaTeX_Size1-Regular.woff2 │ │ │ │ │ ├── KaTeX_Size2-Regular.woff │ │ │ │ │ ├── KaTeX_Size2-Regular.woff2 │ │ │ │ │ ├── KaTeX_Size3-Regular.woff │ │ │ │ │ ├── KaTeX_Size3-Regular.woff2 │ │ │ │ │ ├── KaTeX_Size4-Regular.woff │ │ │ │ │ ├── KaTeX_Size4-Regular.woff2 │ │ │ │ │ ├── KaTeX_Caligraphic-Bold.ttf │ │ │ │ │ ├── KaTeX_Caligraphic-Bold.woff │ │ │ │ │ ├── KaTeX_Caligraphic-Bold.woff2 │ │ │ │ │ ├── KaTeX_Fraktur-Regular.woff │ │ │ │ │ ├── KaTeX_Fraktur-Regular.woff2 │ │ │ │ │ ├── KaTeX_Main-BoldItalic.woff │ │ │ │ │ ├── KaTeX_Main-BoldItalic.woff2 │ │ │ │ │ ├── KaTeX_Math-BoldItalic.woff │ │ │ │ │ ├── KaTeX_Math-BoldItalic.woff2 │ │ │ │ │ ├── KaTeX_SansSerif-Bold.woff2 │ │ │ │ │ ├── KaTeX_SansSerif-Italic.ttf │ │ │ │ │ ├── KaTeX_SansSerif-Italic.woff │ │ │ │ │ ├── KaTeX_SansSerif-Italic.woff2 │ │ │ │ │ ├── KaTeX_SansSerif-Regular.ttf │ │ │ │ │ ├── KaTeX_SansSerif-Regular.woff │ │ │ │ │ ├── KaTeX_Script-Regular.woff2 │ │ │ │ │ ├── KaTeX_Typewriter-Regular.ttf │ │ │ │ │ ├── KaTeX_Caligraphic-Regular.ttf │ │ │ │ │ ├── KaTeX_Caligraphic-Regular.woff │ │ │ │ │ ├── KaTeX_SansSerif-Regular.woff2 │ │ │ │ │ ├── KaTeX_Typewriter-Regular.woff │ │ │ │ │ ├── KaTeX_Typewriter-Regular.woff2 │ │ │ │ │ └── KaTeX_Caligraphic-Regular.woff2 │ │ │ │ ├── README.md │ │ │ │ ├── katex.min.css │ │ │ │ └── katex.css │ │ │ ├── style.css │ │ │ ├── themes │ │ │ │ └── style.css │ │ │ └── latex_parser.js │ │ ├── res │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── attrs.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── katex │ │ │ └── hourglass │ │ │ └── in │ │ │ └── mathlib │ │ │ └── MathView.java │ ├── test │ │ └── java │ │ │ └── katex │ │ │ └── hourglass │ │ │ └── in │ │ │ └── mathlib │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── katex │ │ └── hourglass │ │ └── in │ │ └── mathlib │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── .github └── FUNDING.yml ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /katexmathview/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':katexmathview' 2 | -------------------------------------------------------------------------------- /katexmathview/src/main/assets/webviewstyle.css: -------------------------------------------------------------------------------- 1 | img { 2 | max-width:50% !important; 3 | width:50% !important; 4 | 5 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /katexmathview/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | KatexMathView 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/contrib/copy-tex.min.css: -------------------------------------------------------------------------------- 1 | .katex,.katex-display{user-select:all;-moz-user-select:all;-webkit-user-select:all;-ms-user-select:all} 2 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | -webkit-touch-callout: none!important; 4 | -webkit-user-select: none!important; 5 | user-select: none!important; 6 | } -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /katexmathview/src/main/assets/themes/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | -webkit-touch-callout: none!important; 4 | -webkit-user-select: none!important; 5 | user-select: none!important; 6 | } -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/Katex/master/katexmathview/src/main/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Mar 20 14:59:16 IST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 7 | -------------------------------------------------------------------------------- /katexmathview/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /katexmathview/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/test/java/hourglass/github/in/katex/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package hourglass.github.in.katex; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /katexmathview/src/test/java/katex/hourglass/in/mathlib/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package katex.hourglass.in.mathlib; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/contrib/copy-tex.css: -------------------------------------------------------------------------------- 1 | /* Force selection of entire .katex/.katex-display blocks, so that we can 2 | * copy/paste the entire source code. If you omit this CSS, partial 3 | * selections of a formula will work, but will copy the ugly HTML 4 | * representation instead of the LaTeX source code. (Full selections will 5 | * still produce the LaTeX source code.) 6 | */ 7 | .katex, 8 | .katex-display { 9 | user-select: all; 10 | -moz-user-select: all; 11 | -webkit-user-select: all; 12 | -ms-user-select: all; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: lingarajkatex 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with a single custom sponsorship URL 13 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/card_math_recyclerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/contrib/mathtex-script-type.mjs: -------------------------------------------------------------------------------- 1 | import katex from '../katex.mjs'; 2 | 3 | let scripts = document.body.getElementsByTagName("script"); 4 | scripts = Array.prototype.slice.call(scripts); 5 | scripts.forEach(function (script) { 6 | if (!script.type || !script.type.match(/math\/tex/i)) { 7 | return -1; 8 | } 9 | 10 | const display = script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null; 11 | const katexElement = document.createElement(display ? "div" : "span"); 12 | katexElement.setAttribute("class", display ? "equation" : "inline-equation"); 13 | 14 | try { 15 | katex.render(script.text, katexElement, { 16 | displayMode: display 17 | }); 18 | } catch (err) { 19 | //console.error(err); linter doesn't like this 20 | katexElement.textContent = script.text; 21 | } 22 | 23 | script.parentNode.replaceChild(katexElement, script); 24 | }); 25 | -------------------------------------------------------------------------------- /app/src/androidTest/java/hourglass/github/in/katex/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package hourglass.github.in.katex; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("hourglass.github.in.katex", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /katexmathview/src/androidTest/java/katex/hourglass/in/mathlib/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package katex.hourglass.in.mathlib; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("katex.hourglass.in.katexmathview.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/hourglass/github/in/katex/activities/MathviewInLayoutActivity.java: -------------------------------------------------------------------------------- 1 | package hourglass.github.in.katex.activities; 2 | 3 | import android.os.Bundle; 4 | import android.support.annotation.Nullable; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.support.v7.widget.Toolbar; 7 | import hourglass.github.in.katex.R; 8 | 9 | /** 10 | * Created by lingaraj on 4/4/17. 11 | */ 12 | 13 | public class MathviewInLayoutActivity extends AppCompatActivity { 14 | 15 | @Override 16 | protected void onCreate(@Nullable Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | setContentView(R.layout.activity_mathview_in_layout); 19 | setInitialViews(); 20 | } 21 | 22 | private void setInitialViews() { 23 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 24 | setSupportActionBar(toolbar); 25 | getSupportActionBar().setTitle("Katex MathView In Layout Demo"); 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | KatexTuts 3 | 4 | $=\\frac{40}{100}\\times9000$ 5 | $x:35::48:60$ 6 | $x=\\frac{1+y}{1+2z^2}$ 7 | $$x=\\frac{1+y}{1+2z^2}$$ 8 | $\\int_0^\\infty e^{-x^2} dx=\\frac{\\sqrt{\\pi}}{2}$ 9 | $$\int_0^\\infty e^{-x^2} dx=\\frac{\\sqrt{\\pi}}{2}$$ 10 | $\\displaystyle \\int_0^\\infty e^{-x^2} dx$ 11 | $\\sqrt{2} \\sin x$ 12 | $\\int \\!\\! \\int f(x,y)\\,\\mathrm{d}x\\mathrm{d}y$ 13 | $${n+1\\choose k} = {n\\choose k} + {n \\choose k-1} 14 | $$ 15 | 16 | $\\int_0^\\infty e^{-x^2} dx=\\frac{\\sqrt{\\pi}}{2}$ 17 | $${n+1\\choose k} = {n\\choose k} + {n \\choose k-1}$$ 18 | 19 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/lingaraj/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /katexmathview/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/lingaraj/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 25 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #8BC34A 4 | #689F38 5 | #DCEDC8 6 | #00BCD4 7 | #212121 8 | #757575 9 | #FFFFFF 10 | #212121 11 | #BDBDBD 12 | #F44336 13 | #3F51B5 14 | #009688 15 | #FF9800 16 | #E91E63 17 | #2196F3 18 | #4CAF50 19 | #FF5722 20 | #9C27B0 21 | #03A9F4 22 | #8BC34A 23 | #795548 24 | #673AB7 25 | #00BCD4 26 | #FFC107 27 | #607D8B 28 | #9E9E9E 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion project.ext.compileSdkVersion 5 | buildToolsVersion project.ext.buildToolsVersion 6 | defaultConfig { 7 | applicationId "hourglass.github.in.katex" 8 | minSdkVersion project.ext.minSdkVersion 9 | targetSdkVersion project.ext.targetSdkVersion 10 | versionCode project.ext.versionCode 11 | versionName project.ext.versionName 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | implementation "com.android.support:appcompat-v7:$supportLibrary" 28 | implementation "com.android.support:recyclerview-v7:$supportLibrary" 29 | implementation "com.android.support:cardview-v7:$supportLibrary" 30 | implementation "com.android.support:design:$supportLibrary" 31 | testImplementation 'junit:junit:4.12' 32 | implementation project(':katexmathview') 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_mathview_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_runtime_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 14 | 18 | 19 | 25 | 26 | 27 | 28 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/java/hourglass/github/in/katex/activities/MainActivity.java: -------------------------------------------------------------------------------- 1 | package hourglass.github.in.katex.activities; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.support.v7.widget.Toolbar; 7 | import android.util.Log; 8 | import android.view.View; 9 | import hourglass.github.in.katex.R; 10 | 11 | public class MainActivity extends AppCompatActivity { 12 | private String TAG = "MainActivity"; 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_main); 18 | setInitialViews(); 19 | } 20 | 21 | private void setInitialViews() { 22 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 23 | setSupportActionBar(toolbar); 24 | getSupportActionBar().setTitle("Katex MathView Demo"); 25 | 26 | 27 | } 28 | 29 | public void recyclerViewClick(View view) { 30 | Log.d(TAG,"Using Mathview in Recyclerview Clicked"); 31 | Intent intent = new Intent(getApplicationContext(),MathViewListActivity.class); 32 | startActivity(intent); 33 | } 34 | 35 | public void layoutViewClick(View view) { 36 | Log.d(TAG,"Using MathView in Layout Clicked"); 37 | Intent intent = new Intent(getApplicationContext(),MathviewInLayoutActivity.class); 38 | startActivity(intent); 39 | } 40 | 41 | public void addingAtRuntime(View view) { 42 | Log.d(TAG,"Adding Mathview at runtime Clicked"); 43 | Intent intent = new Intent(getApplicationContext(),MathViewAdditionAtRuntime.class); 44 | startActivity(intent); 45 | } 46 | 47 | 48 | } -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/contrib/mathtex-script-type.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],t);else{var r="object"==typeof exports?t(require("katex")):t(e.katex);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),u=document.body.getElementsByTagName("script");(u=Array.prototype.slice.call(u)).forEach(function(e){if(!e.type||!e.type.match(/math\/tex/i))return-1;var t=null!=e.type.match(/mode\s*=\s*display(;|\s|\n|$)/),r=document.createElement(t?"div":"span");r.setAttribute("class",t?"equation":"inline-equation");try{o.a.render(e.text,r,{displayMode:t})}catch(t){r.textContent=e.text}e.parentNode.replaceChild(r,e)})}]).default}); -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_mathview_in_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | 13 | 14 | 18 | 19 | 27 | 28 | 29 | 30 | 31 | 32 | 40 | 41 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/java/hourglass/github/in/katex/Helpers.java: -------------------------------------------------------------------------------- 1 | package hourglass.github.in.katex; 2 | 3 | import android.content.Context; 4 | import android.support.v4.content.ContextCompat; 5 | 6 | /** 7 | * Created by lingaraj on 4/4/17. 8 | */ 9 | 10 | public class Helpers { 11 | public static int getRandomColor(Context context,int i) { 12 | switch (i) { 13 | case 1: 14 | return ContextCompat.getColor(context,R.color.Color1); 15 | case 2: 16 | return ContextCompat.getColor(context,R.color.Color2); 17 | case 3: 18 | return ContextCompat.getColor(context,R.color.Color3); 19 | case 4: 20 | return ContextCompat.getColor(context,R.color.Color4); 21 | case 5: 22 | return ContextCompat.getColor(context,R.color.Color5); 23 | case 6: 24 | return ContextCompat.getColor(context,R.color.Color6); 25 | case 7: 26 | return ContextCompat.getColor(context,R.color.Color7); 27 | case 8: 28 | return ContextCompat.getColor(context,R.color.Color8); 29 | case 9: 30 | return ContextCompat.getColor(context,R.color.Color9); 31 | case 10: 32 | return ContextCompat.getColor(context,R.color.Color10); 33 | case 11: 34 | return ContextCompat.getColor(context,R.color.Color11); 35 | case 12: 36 | return ContextCompat.getColor(context,R.color.Color12); 37 | case 13: 38 | return ContextCompat.getColor(context,R.color.Color13); 39 | case 14: 40 | return ContextCompat.getColor(context,R.color.Color14); 41 | case 15: 42 | return ContextCompat.getColor(context,R.color.Color15); 43 | case 16: 44 | return ContextCompat.getColor(context,R.color.Color16); 45 | default: 46 | return ContextCompat.getColor(context,R.color.cardview_dark_background); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/hourglass/github/in/katex/activities/MathViewAdditionAtRuntime.java: -------------------------------------------------------------------------------- 1 | package hourglass.github.in.katex.activities; 2 | 3 | import android.os.Bundle; 4 | import android.support.annotation.Nullable; 5 | import android.support.v4.content.ContextCompat; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.support.v7.widget.Toolbar; 8 | import android.util.Log; 9 | import android.widget.LinearLayout; 10 | import hourglass.github.in.katex.DataHelpers; 11 | import hourglass.github.in.katex.Helpers; 12 | import hourglass.github.in.katex.R; 13 | import katex.hourglass.in.mathlib.MathView; 14 | 15 | /** 16 | * Created by lingaraj on 4/4/17. 17 | */ 18 | 19 | public class MathViewAdditionAtRuntime extends AppCompatActivity { 20 | 21 | private String TAG = "MATHVIEWRUNTIME"; 22 | private LinearLayout parent_layout; 23 | 24 | @Override 25 | protected void onCreate(@Nullable Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | setContentView(R.layout.activity_runtime_layout); 28 | setInitialViews(); 29 | addMathView(); 30 | } 31 | 32 | private void addMathView() { 33 | MathView mathView = new MathView(getApplicationContext()); 34 | mathView.setClickable(false); 35 | mathView.setTextSize(14); 36 | mathView.setTextColor(ContextCompat.getColor(getApplicationContext(),android.R.color.white)); 37 | mathView.setDisplayText(DataHelpers.getScrollableData()); 38 | // mathView.setDisplayText(getResources().getString(R.string.runtime_formula)); 39 | // mathView.setViewBackgroundColor(ContextCompat.getColor(getApplicationContext(),R.color.Color5)); 40 | mathView.setViewBackgroundColor(Helpers.getRandomColor(getApplicationContext(),2)); 41 | parent_layout.addView(mathView); 42 | Log.d(TAG,"MathView Added to parent layout at runtime"); 43 | } 44 | 45 | private void setInitialViews() { 46 | parent_layout = (LinearLayout) findViewById(R.id.linear_parent_layout); 47 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 48 | setSupportActionBar(toolbar); 49 | getSupportActionBar().setTitle("Runtime Mathview Demo"); 50 | Log.d(TAG,"Views Intitialized"); 51 | 52 | } 53 | 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /katexmathview/src/main/assets/katex/contrib/copy-tex.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(0);var r={inline:["$","$"],display:["$$","$$"]},o=function(e,t){void 0===t&&(t=r);for(var n=e.querySelectorAll(".katex-mathml + .katex-html"),o=0;o 2 | 8 | 9 | 13 | 14 | 15 | 19 | 20 | 28 | 29 | 30 | 31 | 40 | 41 |