I want to write mathematical equations in ionic with code not by inserting images, I’ve tried using mathjax but it doesn’t appear, then I tried with html tags and it works for simple equations, but for more complex equations I feel it is less efficient.
Can you please explain a little better what are you trying to do? The user will input the equations? The user will take a photo os some equation and it will be recognized by the device? What are your objective?
I just want to write ordinary math or physics equations for content, content like learning math or math exercises, as simple as that
Pada tanggal Sen, 28 Okt 2019 pukul 20.15 Leonardofmed via Ionic Forum ionicframework@discoursemail.com menulis:
I see, I suggest you read this thread then: MathJax in Ionic
It contains instructions on how to implement MathJax correctly. Note the Rapropos comment for the install location.
I have successfully used the following plugin in my app
GitHub - arnog/mathlive: A web component for easy math input
In addition to this, you can also use katex plugin for displaying the latex equations…although this can be done with the previous plugin as well, but i found it easier with this… you just have to pass the string which contains the latex equation to this, and it will render it in the view.
https://github.com/garciparedes/ng-katex#readme
okay thanks, I’ll try it
Pada tanggal Sel, 29 Okt 2019 pukul 01.12 Chetan Bansal via Ionic Forum ionicframework@discoursemail.com menulis:
Bonjour !
J’ai lu https://github.com/garciparedes/ng-katex#readme
J’ai essayé d’écrire des exercices de mathématiques avec des équations simples dans une application que je veux développer avec ionic5 et Angular .
Mais je n’arrive pas .
je n’arrive pas à insérer des équations dans la balise
Quelqu’un peut-il m’aider ?
J’ai installé ng-katex à partir de la ligne de commande de Visual Studio Code .
J’ai trois fichiers
1- home.module.ts
Dans ce fichier ,j’ai ajouté ceci : import { KatexModule } from ‘ng-katex’;
Puis ceci :
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
HomePageRoutingModule,
KatexModule
],
declarations: [HomePage]
})
2- home.page.ts
J’ai par exemple fait ceci :
import { Component } from ‘@angular/core’;
@Component({
selector: ‘app-home’,
templateUrl: ‘home.page.html’,
styleUrls: [‘home.page.scss’],
template: <ng-katex-paragraph [paragraph]="paragraph"></ng-katex-paragraph>
})
export class HomePage {
paragraph: string = \$x ^ 2 + y ^ 2 5\$
;
constructor() {
}
}
3-home.page.html
c’est dans ce fichier que je veux insérer dans les balises les équations simples
Mais je n’arrive pas.
Quelqu’un peut-il vraiment m’aider ?
Car je ne veux faire pour chaque équation une image pour l’insérer dans le fichier home.page.html
J’ai regardé sur youtube.com , il n’y a pas une vidéo qui explique cela .
C’est dans les balises ionic comme " ion-card " que je veux insérer les équations simples.
Aidez moi s’il vous plait ! Car si je fais pour chaque équation une image puis l’insérer dans la balise " ion-card " , l’application que je veux développer va être très lourde
Please post in English for your future posts…
What i believe is the issue you are facing, the equation string that you are providing to the tag is not in the TeX format.
Test your expressions in this https://garciparedes.me/ng-katex/ to see whether it is a valid equation syntax to be rendered…