├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml └── compiler.xml ├── app ├── .gitignore ├── libs │ └── bolts-android-1.2.0.jar ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_main.xml │ │ │ │ └── fragment_example.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── sixgodit │ │ │ │ └── xzz │ │ │ │ └── jlatexmathexample │ │ │ │ ├── App.java │ │ │ │ ├── LaTeXInfo.java │ │ │ │ └── VerticalImageSpan.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── sixgodit │ │ │ └── xzz │ │ │ └── jlatexmathexample │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── sixgodit │ │ └── xzz │ │ └── jlatexmathexample │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── latexlibrary ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── assets │ │ │ ├── lion.png │ │ │ ├── fonts │ │ │ │ ├── jlm_cmbsy10.ttf │ │ │ │ ├── jlm_cmbx10.ttf │ │ │ │ ├── jlm_cmex10.ttf │ │ │ │ ├── jlm_cmmi10.ttf │ │ │ │ ├── jlm_cmmib10.ttf │ │ │ │ ├── jlm_cmr10.ttf │ │ │ │ ├── jlm_cmss10.ttf │ │ │ │ ├── jlm_cmssi10.ttf │ │ │ │ ├── jlm_cmsy10.ttf │ │ │ │ ├── jlm_cmti10.ttf │ │ │ │ ├── jlm_cmtt10.ttf │ │ │ │ ├── jlm_dsrom10.ttf │ │ │ │ ├── jlm_eufb10.ttf │ │ │ │ ├── jlm_eufm10.ttf │ │ │ │ ├── jlm_fcmbipg.ttf │ │ │ │ ├── jlm_fcmbpg.ttf │ │ │ │ ├── jlm_fcmripg.ttf │ │ │ │ ├── jlm_fcmrpg.ttf │ │ │ │ ├── jlm_fcsbpg.ttf │ │ │ │ ├── jlm_fcsropg.ttf │ │ │ │ ├── jlm_fcsrpg.ttf │ │ │ │ ├── jlm_fctrpg.ttf │ │ │ │ ├── jlm_jlmbi10.ttf │ │ │ │ ├── jlm_jlmbx10.ttf │ │ │ │ ├── jlm_jlmi10.ttf │ │ │ │ ├── jlm_jlmr10.ttf │ │ │ │ ├── jlm_jlmsb10.ttf │ │ │ │ ├── jlm_jlmsi10.ttf │ │ │ │ ├── jlm_jlmss10.ttf │ │ │ │ ├── jlm_jlmtt10.ttf │ │ │ │ ├── jlm_msam10.ttf │ │ │ │ ├── jlm_msbm10.ttf │ │ │ │ ├── jlm_rsfs10.ttf │ │ │ │ ├── jlm_special.ttf │ │ │ │ ├── jlm_wnbx10.ttf │ │ │ │ ├── jlm_wnr10.ttf │ │ │ │ ├── jlm_wnss10.ttf │ │ │ │ ├── jlm_wnssi10.ttf │ │ │ │ ├── jlm_wnti10.ttf │ │ │ │ ├── jlm_wntt10.ttf │ │ │ │ ├── jlm_cmbxti10.ttf │ │ │ │ ├── jlm_cmssbx10.ttf │ │ │ │ ├── jlm_jlmsbi10.ttf │ │ │ │ ├── jlm_stmary10.ttf │ │ │ │ ├── jlm_wnbxti10.ttf │ │ │ │ ├── jlm_wnssbx10.ttf │ │ │ │ ├── latin │ │ │ │ │ ├── optional │ │ │ │ │ │ ├── jlm_cmbx10.ttf │ │ │ │ │ │ ├── jlm_cmss10.ttf │ │ │ │ │ │ ├── jlm_cmssi10.ttf │ │ │ │ │ │ ├── jlm_cmti10.ttf │ │ │ │ │ │ ├── jlm_cmtt10.ttf │ │ │ │ │ │ ├── jlm_cmbxti10.ttf │ │ │ │ │ │ ├── jlm_cmssbx10.ttf │ │ │ │ │ │ └── jlm_cmti10_unchanged.xml │ │ │ │ │ ├── jlm_jlmr10_unchanged.xml │ │ │ │ │ ├── jlm_jlmtt10.xml │ │ │ │ │ ├── jlm_jlmsb10.xml │ │ │ │ │ ├── jlm_jlmbx10.xml │ │ │ │ │ ├── jlm_jlmr10.xml │ │ │ │ │ ├── jlm_jlmss10.xml │ │ │ │ │ ├── jlm_jlmsbi10.xml │ │ │ │ │ ├── jlm_jlmbi10.xml │ │ │ │ │ ├── jlm_jlmsi10.xml │ │ │ │ │ └── jlm_jlmi10.xml │ │ │ │ ├── maths │ │ │ │ │ ├── jlm_special.map.xml │ │ │ │ │ ├── jlm_special.xml │ │ │ │ │ └── optional │ │ │ │ │ │ └── jlm_dsrom10.xml │ │ │ │ ├── licences │ │ │ │ │ ├── License_for_dsrom.txt │ │ │ │ │ └── Knuth_License.txt │ │ │ │ ├── base │ │ │ │ │ ├── jlm_moustache.xml │ │ │ │ │ └── jlm_amsfonts.map.xml │ │ │ │ ├── language_greek.xml │ │ │ │ └── language_cyrillic.xml │ │ │ └── province │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── org │ │ │ └── scilab │ │ │ └── forge │ │ │ └── jlatexmath │ │ │ ├── greek │ │ │ ├── MANIFEST.MF │ │ │ ├── LICENSE │ │ │ └── GreekRegistration.java │ │ │ ├── cyrillic │ │ │ ├── MANIFEST.MF │ │ │ ├── LICENSE │ │ │ └── CyrillicRegistration.java │ │ │ ├── core │ │ │ ├── AjLatexMath.java │ │ │ ├── EmptyAtom.java │ │ │ ├── EmptyFormulaException.java │ │ │ ├── BreakMarkAtom.java │ │ │ ├── FontAlreadyLoadedException.java │ │ │ ├── AlphabetRegistrationException.java │ │ │ ├── OvalAtom.java │ │ │ ├── InvalidMatrixException.java │ │ │ ├── ReflectAtom.java │ │ │ ├── InvalidAtomTypeException.java │ │ │ ├── InvalidTeXFormulaException.java │ │ │ ├── ShadowAtom.java │ │ │ ├── MiddleAtom.java │ │ │ ├── InvalidSymbolTypeException.java │ │ │ ├── ParseException.java │ │ │ ├── InvalidUnitException.java │ │ │ ├── SsAtom.java │ │ │ ├── TtAtom.java │ │ │ ├── SmallCapAtom.java │ │ │ ├── ResourceParseException.java │ │ │ ├── SymbolNotFoundException.java │ │ │ ├── CharFont.java │ │ │ ├── JMathTeXException.java │ │ │ ├── GeoGebraLogoAtom.java │ │ │ ├── OverBar.java │ │ │ ├── ItAtom.java │ │ │ ├── StrutBox.java │ │ │ ├── InvalidDelimiterTypeException.java │ │ │ ├── BoldAtom.java │ │ │ ├── FormulaNotFoundException.java │ │ │ ├── MonoScaleAtom.java │ │ │ ├── RomanAtom.java │ │ │ ├── StyleAtom.java │ │ │ ├── AlphabetRegistration.java │ │ │ ├── GlueBox.java │ │ │ ├── SymbolMappingNotFoundException.java │ │ │ ├── TextStyleAtom.java │ │ │ ├── tcaronAtom.java │ │ │ ├── SmashedAtom.java │ │ │ ├── TextStyleMappingNotFoundException.java │ │ │ ├── FixedCharAtom.java │ │ │ ├── MathAtom.java │ │ │ ├── DelimiterMappingNotFoundException.java │ │ │ ├── VdotsAtom.java │ │ │ ├── UnderscoreAtom.java │ │ │ ├── ScaleAtom.java │ │ │ ├── FcscoreAtom.java │ │ │ ├── ReflectBox.java │ │ │ ├── IJAtom.java │ │ │ ├── TextCircledAtom.java │ │ │ ├── DoubleFramedAtom.java │ │ │ ├── LapedAtom.java │ │ │ ├── HlineAtom.java │ │ │ ├── RuleAtom.java │ │ │ ├── BigDelimiterAtom.java │ │ │ ├── StrikeThroughAtom.java │ │ │ ├── LCaronAtom.java │ │ │ ├── Row.java │ │ │ ├── VCenteredAtom.java │ │ │ ├── Metrics.java │ │ │ ├── DdotsAtom.java │ │ │ ├── IddotsAtom.java │ │ │ ├── OverlinedAtom.java │ │ │ ├── ParseOption.java │ │ │ ├── TypedAtom.java │ │ │ ├── CumulativeScriptsAtom.java │ │ │ ├── NewEnvironmentMacro.java │ │ │ ├── HdotsforAtom.java │ │ │ ├── InvalidDelimiterException.java │ │ │ ├── OgonekAtom.java │ │ │ └── FBoxAtom.java │ │ │ └── dynamic │ │ │ ├── ExternalConverter.java │ │ │ └── ExternalConverterFactory.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── sixgodit │ │ │ └── xzz │ │ │ └── latexlibrary │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── sixgodit │ │ └── xzz │ │ └── latexlibrary │ │ └── ApplicationTest.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── README.md ├── gradle.properties └── JLaTexMathExample.iml /.idea/.name: -------------------------------------------------------------------------------- 1 | JLaTexMathExample -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /latexlibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':latexlibrary' 2 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/libs/bolts-android-1.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/app/libs/bolts-android-1.2.0.jar -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | JLaTexMathExample 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /latexlibrary/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LaTexLibrary 3 | 4 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/lion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/lion.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmbsy10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmbsy10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmbx10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmbx10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmex10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmex10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmmi10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmmi10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmmib10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmmib10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmr10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmr10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmss10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmss10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmssi10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmssi10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmsy10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmsy10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmti10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmti10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmtt10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmtt10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_dsrom10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_dsrom10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_eufb10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_eufb10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_eufm10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_eufm10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_fcmbipg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_fcmbipg.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_fcmbpg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_fcmbpg.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_fcmripg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_fcmripg.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_fcmrpg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_fcmrpg.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_fcsbpg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_fcsbpg.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_fcsropg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_fcsropg.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_fcsrpg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_fcsrpg.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_fctrpg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_fctrpg.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmbi10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmbi10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmbx10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmbx10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmi10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmi10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmr10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmr10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmsb10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmsb10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmsi10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmsi10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmss10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmss10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmtt10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmtt10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_msam10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_msam10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_msbm10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_msbm10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_rsfs10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_rsfs10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_special.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_special.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_wnbx10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_wnbx10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_wnr10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_wnr10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_wnss10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_wnss10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_wnssi10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_wnssi10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_wnti10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_wnti10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_wntt10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_wntt10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmbxti10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmbxti10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_cmssbx10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_cmssbx10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_jlmsbi10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_jlmsbi10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_stmary10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_stmary10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_wnbxti10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_wnbxti10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/jlm_wnssbx10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/jlm_wnssbx10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmbx10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmbx10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmss10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmss10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmssi10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmssi10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmti10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmti10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmtt10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmtt10.ttf -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmbxti10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmbxti10.ttf -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmssbx10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sixgodIT/JLaTexMath-andriod/HEAD/latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmssbx10.ttf -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/optional/jlm_cmti10_unchanged.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 28 16:03:58 CST 2015 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-2.4-all.zip 7 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmr10_unchanged.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/maths/jlm_special.map.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/licences/License_for_dsrom.txt: -------------------------------------------------------------------------------- 1 | License 2 | ------- 3 | 4 | You may use and distribute these fonts as you like. 5 | You may modify these fonts as long as you do not 6 | rename the files to one of those names that 7 | Donald E. Knuth chose for the Computer Modern fonts. 8 | (And seriously, who would want to do that?) 9 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/maths/jlm_special.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /latexlibrary/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JLaTexMath-android from [mksmbrtsh/jlatexmath-android](https://github.com/mksmbrtsh/jlatexmath-android) 2 | --- 3 | ### JLaTexMath for Android 4 | 完美支持、数学、物理、化学公式、汉字解析、图文混排 5 | 6 | 本项目借鉴自[jlatexmath-android](https://github.com/mksmbrtsh/jlatexmath-android)(由java Api 转化来的Android版本) 7 | 8 | 本项目针对化学、生物类的中文公式做了优化。 9 | ### java原版 10 | [JLaTeXMath - A Java API to render LaTeX](http://forge.scilab.org/index.php/p/jlatexmath/) 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/com/sixgodit/xzz/jlatexmathexample/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.sixgodit.xzz.jlatexmathexample; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /latexlibrary/src/test/java/com/sixgodit/xzz/latexlibrary/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.sixgodit.xzz.latexlibrary; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/licences/Knuth_License.txt: -------------------------------------------------------------------------------- 1 | Knuth License 2 | 3 | This software is copyright and you are explicitly granted a license which gives you, the "user" of the software, legal permission to copy, distribute and/or modify the software, so long as if you modify the software then it carry a different name from the original software. 4 | 5 | All the same, please check the specific details of the software's license before making modifications. 6 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/sixgodit/xzz/jlatexmathexample/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.sixgodit.xzz.jlatexmathexample; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /latexlibrary/src/androidTest/java/com/sixgodit/xzz/latexlibrary/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.sixgodit.xzz.latexlibrary; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmtt10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmsb10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmbx10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmr10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmss10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /latexlibrary/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 23 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar']) 23 | } 24 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmsbi10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmbi10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmsi10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/latin/jlm_jlmi10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 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/xuzhenzhou/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 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.1" 6 | 7 | defaultConfig { 8 | applicationId "com.sixgodit.xzz.jlatexmathexample" 9 | minSdkVersion 14 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | compile 'com.android.support:appcompat-v7:23.1.0' 25 | compile project(':latexlibrary') 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/sixgodit/xzz/jlatexmathexample/App.java: -------------------------------------------------------------------------------- 1 | package com.sixgodit.xzz.jlatexmathexample; 2 | 3 | import android.app.Application; 4 | 5 | import org.scilab.forge.jlatexmath.core.AjLatexMath; 6 | 7 | import java.util.concurrent.Callable; 8 | 9 | import bolts.Task; 10 | 11 | /** 12 | * Created by xuzhenzhou on 15/10/28. 13 | */ 14 | public class App extends Application { 15 | @Override 16 | public void onCreate() { 17 | super.onCreate(); 18 | Task.callInBackground(new Callable() { 19 | @Override 20 | public Object call() throws Exception { 21 | AjLatexMath.init(getApplicationContext()); 22 | return null; 23 | } 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /latexlibrary/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/xuzhenzhou/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 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/base/jlm_moustache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /JLaTexMathExample.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/province: -------------------------------------------------------------------------------- 1 | [{"name":"北京","code":"001011"},{"name":"天津","code":"001012"},{"name":"河北","code":"001013"},{"name":"山西","code":"001014"},{"name":"内蒙古","code":"001015"},{"name":"辽宁","code":"001021"},{"name":"吉林","code":"001022"},{"name":"黑龙江","code":"001023"},{"name":"上海","code":"001031"},{"name":"江苏","code":"001032"},{"name":"浙江","code":"001033"},{"name":"安徽","code":"001034"},{"name":"福建","code":"001035"},{"name":"江西","code":"001036"},{"name":"山东","code":"001037"},{"name":"河南","code":"001041"},{"name":"湖北","code":"001042"},{"name":"湖南","code":"001043"},{"name":"广东","code":"001044"},{"name":"广西","code":"001045"},{"name":"海南","code":"001046"},{"name":"重庆","code":"001050"},{"name":"四川","code":"001051"},{"name":"贵州","code":"001052"},{"name":"云南","code":"001053"},{"name":"西藏","code":"001054"},{"name":"陕西","code":"001061"},{"name":"甘肃","code":"001062"},{"name":"青海","code":"001063"},{"name":"宁夏","code":"001064"},{"name":"新疆","code":"001065"},{"name":"台湾","code":"001071"},{"name":"香港","code":"001081"},{"name":"澳门","code":"001082"}] -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/greek/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | 2 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/greek/fonts/jlm_fcmbipg.ttf 3 | Content-Type: application/x-font 4 | 5 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/greek/fonts/jlm_fcmbpg.ttf 6 | Content-Type: application/x-font 7 | 8 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/greek/fonts/jlm_fcmripg.ttf 9 | Content-Type: application/x-font 10 | 11 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/greek/fonts/jlm_fcmrpg.ttf 12 | Content-Type: application/x-font 13 | 14 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/greek/fonts/jlm_fcsbpg.ttf 15 | Content-Type: application/x-font 16 | 17 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/greek/fonts/jlm_fcsropg.ttf 18 | Content-Type: application/x-font 19 | 20 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/greek/fonts/jlm_fcsrpg.ttf 21 | Content-Type: application/x-font 22 | 23 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/greek/fonts/jlm_fctrpg.ttf 24 | Content-Type: application/x-font -------------------------------------------------------------------------------- /latexlibrary/src/main/assets/fonts/base/jlm_amsfonts.map.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/cyrillic/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | 2 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/cyrillic/fonts/jlm_wnr10.ttf 3 | Content-Type: application/x-font 4 | 5 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/cyrillic/fonts/jlm_wnti10.ttf 6 | Content-Type: application/x-font 7 | 8 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/cyrillic/fonts/jlm_wntt10.ttf 9 | Content-Type: application/x-font 10 | 11 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/cyrillic/fonts/jlm_wnss10.ttf 12 | Content-Type: application/x-font 13 | 14 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/cyrillic/fonts/jlm_wnssbx10.ttf 15 | Content-Type: application/x-font 16 | 17 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/cyrillic/fonts/jlm_wnssi10.ttf 18 | Content-Type: application/x-font 19 | 20 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/cyrillic/fonts/jlm_wnbx10.ttf 21 | Content-Type: application/x-font 22 | 23 | Name: org/scilab/forge/org.scilab.forge.jlatexmath/cyrillic/fonts/jlm_wnbxti10.ttf 24 | Content-Type: application/x-font -------------------------------------------------------------------------------- /app/src/main/java/com/sixgodit/xzz/jlatexmathexample/LaTeXInfo.java: -------------------------------------------------------------------------------- 1 | package com.sixgodit.xzz.jlatexmathexample; 2 | 3 | import org.scilab.forge.jlatexmath.core.TeXFormula; 4 | 5 | /** 6 | * Created by xuzhenzhou on 15/10/14. 7 | */ 8 | public class LaTeXInfo { 9 | private TeXFormula mTeXFormula; 10 | private int start; 11 | private int end; 12 | private String group; 13 | 14 | public LaTeXInfo( TeXFormula teXFormula, int start,int end, String group) { 15 | this.start = start; 16 | mTeXFormula = teXFormula; 17 | this.end = end; 18 | this.group = group; 19 | } 20 | 21 | public TeXFormula getTeXFormula() { 22 | return mTeXFormula; 23 | } 24 | 25 | public void setTeXFormula(TeXFormula teXFormula) { 26 | mTeXFormula = teXFormula; 27 | } 28 | 29 | public int getStart() { 30 | return start; 31 | } 32 | 33 | public void setStart(int start) { 34 | this.start = start; 35 | } 36 | 37 | public int getEnd() { 38 | return end; 39 | } 40 | 41 | public void setEnd(int end) { 42 | this.end = end; 43 | } 44 | 45 | public String getGroup() { 46 | return group; 47 | } 48 | 49 | public void setGroup(String group) { 50 | this.group = group; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/AjLatexMath.java: -------------------------------------------------------------------------------- 1 | package org.scilab.forge.jlatexmath.core; 2 | 3 | import android.content.Context; 4 | import android.content.res.AssetManager; 5 | import android.graphics.Color; 6 | import android.graphics.Paint; 7 | import android.graphics.Paint.Style; 8 | 9 | public class AjLatexMath { 10 | 11 | private static Context mContext; 12 | private static Paint st; 13 | 14 | /** 15 | * 初始化画笔以及公式解析类 16 | * 17 | * @param context 18 | */ 19 | public static void init(Context context) { 20 | mContext = context; 21 | st = new Paint(); 22 | st.setStyle(Style.FILL_AND_STROKE); 23 | st.setColor(Color.BLACK); 24 | st.setStrokeWidth(0); 25 | TeXFormula.getPartialTeXFormula("{x^{2}+ x-1= 0 }").setDEBUG(false); 26 | } 27 | 28 | public static AssetManager getAssetManager() { 29 | AssetManager mng = mContext.getAssets(); 30 | return mng; 31 | } 32 | 33 | /** 34 | * 同步画笔颜色,使生成图片与文字夜色一致 35 | * 36 | * @param color 37 | */ 38 | public static void setColor(int color) { 39 | if (st == null) { 40 | init(mContext); 41 | } 42 | st.setColor(color); 43 | } 44 | 45 | public static Context getContext() { 46 | return mContext; 47 | } 48 | 49 | public static Paint getPaint() { 50 | return st; 51 | } 52 | 53 | public static float getLeading(float textSize) { 54 | st.setTextSize(textSize); 55 | return st.getFontSpacing(); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/dynamic/ExternalConverter.java: -------------------------------------------------------------------------------- 1 | /* ExternalConverter.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2010 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.dynamic; 30 | 31 | public interface ExternalConverter { 32 | 33 | public String getLaTeXString(String externalCode); 34 | 35 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/dynamic/ExternalConverterFactory.java: -------------------------------------------------------------------------------- 1 | /* ExternalConverterFactory.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2010 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.dynamic; 30 | 31 | public interface ExternalConverterFactory { 32 | 33 | public ExternalConverter getExternalConverter(); 34 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/EmptyAtom.java: -------------------------------------------------------------------------------- 1 | /* EmptyAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2010 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An empty atom. 33 | */ 34 | public class EmptyAtom extends Atom { 35 | 36 | public EmptyAtom() { 37 | } 38 | 39 | public Box createBox(TeXEnvironment env) { 40 | return new StrutBox(0, 0, 0, 0); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/EmptyFormulaException.java: -------------------------------------------------------------------------------- 1 | /* EmptyFormulaException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | public class EmptyFormulaException extends Exception { 33 | 34 | public EmptyFormulaException() { 35 | super("Illegal operation with an empty Formula!"); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/BreakMarkAtom.java: -------------------------------------------------------------------------------- 1 | /* BreakMarkAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2010 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An empty atom just to add a mark. 33 | */ 34 | public class BreakMarkAtom extends Atom { 35 | 36 | public BreakMarkAtom() { 37 | } 38 | 39 | public Box createBox(TeXEnvironment env) { 40 | return new StrutBox(0, 0, 0, 0); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/FontAlreadyLoadedException.java: -------------------------------------------------------------------------------- 1 | /* FontAlreadyLoadedException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | public class FontAlreadyLoadedException extends XMLResourceParseException { 33 | 34 | public FontAlreadyLoadedException(String msg) { 35 | super(msg); 36 | } 37 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/AlphabetRegistrationException.java: -------------------------------------------------------------------------------- 1 | /* AlphabetRegistrationException.java 2 | * ========================================================================= 3 | * This file is originally of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * Signals that an error occured while registering an alphabet 33 | */ 34 | public class AlphabetRegistrationException extends Exception { 35 | 36 | protected AlphabetRegistrationException(String str) { 37 | super(str); 38 | } 39 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/cyrillic/LICENSE: -------------------------------------------------------------------------------- 1 | JLaTeXMath Library - Displays LaTeX commands 2 | JLateXMath is an fork of JMathTeX with a lot of modifications to support 3 | many more LaTeX commands, drop of the jdom dependency and easy evolution 4 | capabilities. 5 | 6 | Copyright (C) 2009-2011 DENIZET Calixte 7 | Copyright (C) Kris Coolsaet 8 | Copyright (C) Nico Van Cleemput 9 | Copyright (C) Kurt Vermeulen 10 | Copyright 2004-2007 Universiteit Gent 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | GNU General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License 24 | along with this program; see the file COPYING. If not, write to the 25 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 26 | MA 02110-1301, USA. 27 | 28 | 29 | 30 | The archive contains several fonts : 31 | 1) the fonts eufb10.ttf, eufm10.ttf, msam10.ttf and msbm10.ttf are under OFL (Open Font License); 32 | 33 | 2) the font dsrom10.ttf is under a free license; 34 | 35 | 3) the font stmary10.ttf and rsfs10.ttf are in PD (Public Domain); 36 | 37 | 4) the fonts cmbsy10.ttf, cmbx10.ttf, cmbxti10.ttf, cmex10.ttf, cmmi10.ttf, cmr10.ttf, cmss10.ttf, cmssbx10.ttf, cmsy10.ttf and cmtt10.ttf are under Knuth License. 38 | 39 | You can find a copy of these licenses in the fonts directory. 40 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/greek/LICENSE: -------------------------------------------------------------------------------- 1 | JLaTeXMath Library - Displays LaTeX commands 2 | JLateXMath is an fork of JMathTeX with a lot of modifications to support 3 | many more LaTeX commands, drop of the jdom dependency and easy evolution 4 | capabilities. 5 | 6 | Copyright (C) 2009-2011 DENIZET Calixte 7 | Copyright (C) Kris Coolsaet 8 | Copyright (C) Nico Van Cleemput 9 | Copyright (C) Kurt Vermeulen 10 | Copyright 2004-2007 Universiteit Gent 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | GNU General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License 24 | along with this program; see the file COPYING. If not, write to the 25 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 26 | MA 02110-1301, USA. 27 | 28 | 29 | 30 | The archive contains several fonts : 31 | 1) the fonts eufb10.ttf, eufm10.ttf, msam10.ttf and msbm10.ttf are under OFL (Open Font License); 32 | 33 | 2) the font dsrom10.ttf is under a free license; 34 | 35 | 3) the font stmary10.ttf and rsfs10.ttf are in PD (Public Domain); 36 | 37 | 4) the fonts cmbsy10.ttf, cmbx10.ttf, cmbxti10.ttf, cmex10.ttf, cmmi10.ttf, cmr10.ttf, cmss10.ttf, cmssbx10.ttf, cmsy10.ttf and cmtt10.ttf are under Knuth License. 38 | 39 | You can find a copy of these licenses in the fonts directory. 40 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/OvalAtom.java: -------------------------------------------------------------------------------- 1 | /* ShadowAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An atom representing a boxed base atom. 33 | */ 34 | public class OvalAtom extends FBoxAtom { 35 | 36 | public OvalAtom(Atom base) { 37 | super(base); 38 | } 39 | 40 | public Box createBox(TeXEnvironment env) { 41 | return new OvalBox((FramedBox) super.createBox(env)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/InvalidMatrixException.java: -------------------------------------------------------------------------------- 1 | /* InvalidMatrixException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Signals a problem of dimensions in the matrix. 34 | * 35 | * @author Calixte Denizet 36 | */ 37 | public class InvalidMatrixException extends JMathTeXException { 38 | 39 | protected InvalidMatrixException(String msg) { 40 | super(msg); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/ReflectAtom.java: -------------------------------------------------------------------------------- 1 | /* ReflectAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An atom representing a reflected Atom. 33 | */ 34 | public class ReflectAtom extends Atom { 35 | 36 | private Atom base; 37 | 38 | public ReflectAtom(Atom base) { 39 | this.type = base.type; 40 | this.base = base; 41 | } 42 | 43 | public Box createBox(TeXEnvironment env) { 44 | return new ReflectBox(base.createBox(env)); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/InvalidAtomTypeException.java: -------------------------------------------------------------------------------- 1 | /* InvalidAtomTypeException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Signals that an unknown atom type constant was used. 34 | * 35 | * @author Kurt Vermeulen 36 | */ 37 | public class InvalidAtomTypeException extends JMathTeXException { 38 | 39 | protected InvalidAtomTypeException(String msg) { 40 | super(msg); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/InvalidTeXFormulaException.java: -------------------------------------------------------------------------------- 1 | /* InvalidTeXFormulaException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Signals that an invalid TeXFormula was used. 34 | * 35 | * @author Kurt Vermeulen 36 | */ 37 | public class InvalidTeXFormulaException extends JMathTeXException { 38 | 39 | protected InvalidTeXFormulaException(String msg) { 40 | super(msg); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/ShadowAtom.java: -------------------------------------------------------------------------------- 1 | /* ShadowAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An atom representing a boxed base atom. 33 | */ 34 | public class ShadowAtom extends FBoxAtom { 35 | 36 | public ShadowAtom(Atom base) { 37 | super(base); 38 | } 39 | 40 | public Box createBox(TeXEnvironment env) { 41 | return new ShadowBox((FramedBox) super.createBox(env), env.getTeXFont() 42 | .getDefaultRuleThickness(env.getStyle()) * 4); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/MiddleAtom.java: -------------------------------------------------------------------------------- 1 | /* MiddleAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An atom representing a middle atom which must be rounded by a left and right 33 | * delimiter. 34 | */ 35 | public class MiddleAtom extends Atom { 36 | 37 | public Atom base; 38 | public Box box = new StrutBox(0, 0, 0, 0); 39 | 40 | public MiddleAtom(Atom at) { 41 | base = at; 42 | } 43 | 44 | public Box createBox(TeXEnvironment env) { 45 | return box; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/InvalidSymbolTypeException.java: -------------------------------------------------------------------------------- 1 | /* InvalidSymbolTypeException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Signals that an unknown symbol type constant or a symbol of the wrong type was used. 34 | * 35 | * @author Kurt Vermeulen 36 | */ 37 | public class InvalidSymbolTypeException extends JMathTeXException { 38 | 39 | protected InvalidSymbolTypeException(String msg) { 40 | super(msg); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/ParseException.java: -------------------------------------------------------------------------------- 1 | /* ParseException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Signals that an error occured while parsing a string to a formula. 34 | */ 35 | public class ParseException extends JMathTeXException { 36 | 37 | public ParseException(String str, Throwable cause) { 38 | super(str, cause); 39 | } 40 | 41 | public ParseException(String str) { 42 | super(str); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/InvalidUnitException.java: -------------------------------------------------------------------------------- 1 | /* InvalidUnitException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Signals that an unknown unit constant was used. 34 | * 35 | * @author Kurt Vermeulen 36 | */ 37 | public class InvalidUnitException extends JMathTeXException { 38 | 39 | protected InvalidUnitException() { 40 | super("The delimiter type was not valid! " 41 | + "Use one of the unit constants from the class 'TeXConstants'."); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/SsAtom.java: -------------------------------------------------------------------------------- 1 | /* SsAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An atom representing a sans serif atom. 33 | */ 34 | public class SsAtom extends Atom { 35 | 36 | private Atom base; 37 | 38 | public SsAtom(Atom base) { 39 | this.base = base; 40 | } 41 | 42 | public Box createBox(TeXEnvironment env) { 43 | env = env.copy(env.getTeXFont().copy()); 44 | env.getTeXFont().setSs(true); 45 | Box box = base.createBox(env); 46 | env.getTeXFont().setSs(false); 47 | return box; 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/TtAtom.java: -------------------------------------------------------------------------------- 1 | /* TtAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An atom representing a typewriter atom. 33 | */ 34 | public class TtAtom extends Atom { 35 | 36 | private Atom base; 37 | 38 | public TtAtom(Atom base) { 39 | this.base = base; 40 | } 41 | 42 | public Box createBox(TeXEnvironment env) { 43 | env = env.copy(env.getTeXFont().copy()); 44 | env.getTeXFont().setTt(true); 45 | Box box = base.createBox(env); 46 | env.getTeXFont().setTt(false); 47 | return box; 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/SmallCapAtom.java: -------------------------------------------------------------------------------- 1 | /* RomanAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | /** 32 | * An atom representing a small capital atom. 33 | */ 34 | public class SmallCapAtom extends Atom { 35 | 36 | protected Atom base; 37 | 38 | public SmallCapAtom(Atom base) { 39 | this.base = base; 40 | } 41 | 42 | public Box createBox(TeXEnvironment env) { 43 | boolean prev = env.getSmallCap(); 44 | env.setSmallCap(true); 45 | Box box = base.createBox(env); 46 | env.setSmallCap(prev); 47 | return box; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/ResourceParseException.java: -------------------------------------------------------------------------------- 1 | /* ResourceParseException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Signals that an error occurred while loading the necessary resources into 34 | * memory. 35 | */ 36 | public class ResourceParseException extends JMathTeXException { 37 | 38 | protected ResourceParseException(String msg) { 39 | super(msg); 40 | } 41 | 42 | protected ResourceParseException(String msg, Throwable cause) { 43 | super(msg, cause); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/SymbolNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* SymbolNotFoundException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Signals that an unknown symbol was used. 34 | * 35 | * @author Kurt Vermeulen 36 | */ 37 | public class SymbolNotFoundException extends JMathTeXException { 38 | 39 | protected SymbolNotFoundException(String name) { 40 | super("There's no symbol with the name '" + name + "' defined in '" 41 | + TeXSymbolParser.RESOURCE_NAME + "'!"); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/CharFont.java: -------------------------------------------------------------------------------- 1 | /* CharFont.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Represents a specific character in a specific font (identified by its font 34 | * ID). 35 | */ 36 | public class CharFont { 37 | 38 | public char c; 39 | public int fontId; 40 | public int boldFontId; 41 | 42 | public CharFont(char ch, int f) { 43 | this(ch, f, f); 44 | } 45 | 46 | public CharFont(char ch, int f, int bf) { 47 | c = ch; 48 | fontId = f; 49 | boldFontId = bf; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/sixgodit/xzz/jlatexmathexample/VerticalImageSpan.java: -------------------------------------------------------------------------------- 1 | package com.sixgodit.xzz.jlatexmathexample; 2 | 3 | 4 | import android.content.Context; 5 | import android.graphics.Bitmap; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | import android.graphics.Rect; 9 | import android.graphics.drawable.Drawable; 10 | import android.text.style.ImageSpan; 11 | 12 | /** 13 | * 垂直居中的ImageSpan 14 | * 15 | * @author xuzhenzhou 16 | */ 17 | public class VerticalImageSpan extends ImageSpan { 18 | 19 | 20 | public VerticalImageSpan(Context context, Bitmap b) { 21 | super(context, b); 22 | } 23 | 24 | public int getSize(Paint paint, CharSequence text, int start, int end, 25 | Paint.FontMetricsInt fontMetricsInt) { 26 | Drawable drawable = getDrawable(); 27 | Rect rect = drawable.getBounds(); 28 | if (fontMetricsInt != null) { 29 | Paint.FontMetricsInt fmPaint = paint.getFontMetricsInt(); 30 | int fontHeight = fmPaint.bottom - fmPaint.top; 31 | int drHeight = rect.bottom - rect.top; 32 | 33 | int top = drHeight / 2 - fontHeight / 4; 34 | int bottom = drHeight / 2 + fontHeight / 4; 35 | 36 | fontMetricsInt.ascent = -bottom; 37 | fontMetricsInt.top = -bottom; 38 | fontMetricsInt.bottom = top; 39 | fontMetricsInt.descent = top; 40 | } 41 | return rect.right; 42 | } 43 | 44 | @Override 45 | public void draw(Canvas canvas, CharSequence text, int start, int end, 46 | float x, int top, int y, int bottom, Paint paint) { 47 | Drawable drawable = getDrawable(); 48 | canvas.save(); 49 | int transY = 0; 50 | transY = ((bottom - top) - drawable.getBounds().bottom) / 2 + top; 51 | canvas.translate(x, transY); 52 | drawable.draw(canvas); 53 | canvas.restore(); 54 | } 55 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/JMathTeXException.java: -------------------------------------------------------------------------------- 1 | /* JMathTeXException.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * Superclass of all the possible (public) exceptions that can be thrown in this 34 | * package. 35 | * 36 | * @author Kurt Vermeulen 37 | */ 38 | public class JMathTeXException extends RuntimeException { 39 | 40 | protected JMathTeXException(String msg) { 41 | super(msg); 42 | } 43 | 44 | protected JMathTeXException(String msg, Throwable cause) { 45 | super(msg, cause); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/GeoGebraLogoAtom.java: -------------------------------------------------------------------------------- 1 | /* GeoGebraLogoAtom.java 2 | * ========================================================================= 3 | * This file is part of the JLaTeXMath Library - http://forge.scilab.org/jlatexmath 4 | * 5 | * Copyright (C) 2009 DENIZET Calixte 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * A copy of the GNU General Public License can be found in the file 18 | * LICENSE.txt provided with the source distribution of this program (see 19 | * the META-INF directory in the source jar). This license can also be 20 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 21 | * 22 | * If you did not receive a copy of the GNU General Public License along 23 | * with this program, contact the lead developer, or write to the Free 24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 25 | * 02110-1301, USA. 26 | * 27 | */ 28 | 29 | package org.scilab.forge.jlatexmath.core; 30 | 31 | public class GeoGebraLogoAtom extends Atom { 32 | 33 | public GeoGebraLogoAtom() { 34 | } 35 | 36 | public int getLeftType() { 37 | return TeXConstants.TYPE_ORDINARY; 38 | } 39 | 40 | public int getRightType() { 41 | return TeXConstants.TYPE_ORDINARY; 42 | } 43 | 44 | public Box createBox(TeXEnvironment env) { 45 | CharBox o = new CharBox(env.getTeXFont().getDefaultChar('o', 46 | env.getStyle())); 47 | return new GeoGebraLogoBox(o.width, o.height); 48 | } 49 | } -------------------------------------------------------------------------------- /latexlibrary/src/main/java/org/scilab/forge/jlatexmath/core/OverBar.java: -------------------------------------------------------------------------------- 1 | /* OverBar.java 2 | * ========================================================================= 3 | * This file is originally part of the JMathTeX Library - http://jmathtex.sourceforge.net 4 | * 5 | * Copyright (C) 2004-2007 Universiteit Gent 6 | * Copyright (C) 2009 DENIZET Calixte 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * A copy of the GNU General Public License can be found in the file 19 | * LICENSE.txt provided with the source distribution of this program (see 20 | * the META-INF directory in the source jar). This license can also be 21 | * found on the GNU website at http://www.gnu.org/licenses/gpl.html. 22 | * 23 | * If you did not receive a copy of the GNU General Public License along 24 | * with this program, contact the lead developer, or write to the Free 25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 26 | * 02110-1301, USA. 27 | * 28 | */ 29 | 30 | package org.scilab.forge.jlatexmath.core; 31 | 32 | /** 33 | * A box representing another box with a horizontal rule above it, with 34 | * appropriate kerning. 35 | */ 36 | public class OverBar extends VerticalBox { 37 | 38 | public OverBar(Box b, float kern, float thickness) { 39 | // construct vertical box 40 | add(new StrutBox(0, thickness, 0, 0)); 41 | add(new HorizontalRule(thickness, b.getWidth(), 0)); 42 | add(new StrutBox(0, kern, 0, 0)); 43 | add(b); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_example.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 17 | 18 | 26 | 27 | 28 | 29 | 30 |