GithubHelp home page GithubHelp logo

judemanutd / katexview Goto Github PK

View Code? Open in Web Editor NEW
53.0 53.0 12.0 1.6 MB

KaTeX View for android

License: MIT License

Kotlin 79.51% Java 20.49%
android android-library katex kotlin kotlin-android tex webview webview-library

katexview's People

Contributors

judemanutd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

katexview's Issues

Not able to include Katex in my Android Studio Project

ERROR: Failed to resolve: com.github.judemanutd:katexView

Below is my Module dependency list

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.github.bumptech.glide:glide:4.4.0'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.android.support:design:28.0.0'
implementation 'com.github.judemanutd:katexView:1.0.1'
implementation('com.paytm:pgplussdk:1.3.3') {
transitive = true;
}

androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}

KaTeXView appearing late

We are getting a string that contains LaTeX code from a server. We are setting this string line by line in a for loop using KaTeXView. The problem is that when we run the application, first the LaTeX format ($ signs ) is shown, then it is converted to KaTeXView. How can we directly get the KaTeXView without showing the LaTeX format?

The bigger expressions cuts in the end.

I am trying to render this expression, but its cutting at the end and doesn't move
to the next line.

Screenshot_2020103

$$\left(x^2+1+\sqrt{2}x\right)\left(x^2+1-\sqrt{2}x\right)\left(x^2+1\right)\left(x+1\right)\left(x-1\right)$$

<com.judemanutd.katexview.KatexView
android:id="@+id/katex_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:textColor="@color/black" />

Dark theme

text color does not change according to phone thme

Cannot render Latex with equation

Unable to render this latex:

\begin{equation}
  x = a_0 + \cfrac{1}{a_1 
          + \cfrac{1}{a_2 
          + \cfrac{1}{a_3 + \cfrac{1}{a_4} } } }\end{equation}

Error log:

[INFO:CONSOLE(0)] "The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them in Chrome 92 (July 2021). See https://chromestatus.com/feature/5436853517811712 for more details.", source: about:blank (0)
E/GoLog: [INFO:CONSOLE(1)] "KaTeX auto-render: Failed to parse ` \begin{equation}
E/GoLog:   x = a_0 + \cfrac{1}{a_1 
E/GoLog:           + \cfrac{1}{a_2 
E/GoLog:           + \cfrac{1}{a_3 + \cfrac{1}{a_4} } } }\end{equation} ` with  ParseError: KaTeX parse error: No such environment: equation at position 8:  \begin{̲e̲q̲u̲a̲t̲i̲o̲n̲}̲
E/GoLog:   x = a_0 + \c…", source: file:///android_asset/katex/contrib/auto-render.min.js (1)

Seems to be related to this issue (KaTeX/KaTeX#445), which is closed there.

Unable to load some Katex queations like

== 1

A body, initially at rest, is acted upon by four forces $\mathrm{F}{1}=\hat{\mathrm{i}}+\hat{\mathrm{k}}, \mathrm{F}{2}=2 \hat{\mathrm{j}}+3 \hat{\mathrm{k}}, \mathrm{F}{3}=3 \hat{\mathrm{i}}$ and $\mathrm{F}{4}=3 \hat{\mathrm{j}}-4 \hat{\mathrm{i}} .$ In which plane will the body move?

== 2

What is the output of this formula $$ \left(\frac{\mathrm{m}{1}+\mathrm{m}{2}}{2}\right) \mathrm{g} $$ , please answer?

== 3

In the derivation of expression for peak percent overshoot,
$\mathrm{M}_{\mathrm{p}}=\exp \left(\frac{-\pi \xi}{\sqrt{1-\xi^{2}}}\right) \times 100 %,$ which one of the following conditions is NOT required?

== 4

According to the relation $\mathrm{H}=\mathrm{I}^{2} \mathrm{Rt},$ where $\mathrm{I}$ is current, $\mathrm{R}$ is resistance and t is time. If the errors in the measurement of $\mathrm{I}, \mathrm{R}$ and $\mathrm{t}$ are $3 %, 4 %$ and $6 %$ respectively then error in the measurement of $\mathrm{H}$ is :

== 5

$$ \begin{aligned} &\text { In the derivation of expression for peak percent overshoot, }\ &\mathrm{M}_{\mathrm{p}}=\exp \left(\frac{-\pi \xi}{\sqrt{1-\xi^{2}}}\right) \times 100 %, \text { which one of the following conditions is NOT required? } \end{aligned} $$

Not rendering properly, if possible can you please help me to sort out this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.