FLUTTER ECOSYSTEM

djade007/latext

flutter_math 라이브러리를 사용하여 WebView 또는 JavaScript에 의존하지 않고 과학적 LaTeX 방정식을 효율적으로 표시하는 플러터 패키지입니다.

latext 프로젝트 이미지
Stars
36
Forks
16
최근 푸시(UTC)
2025. 5. 23.
프로젝트 상태
활성
Afeez Olajide GitHub avatar
GITHUB User

Afeez Olajide ↗

London, United Kingdom공식 웹사이트 ↗
언어DartHTMLSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

latext

Render scientific LaTeX equations using the LaTexT library.

  • Mathematics / Maths Equations (Algebra, Calculus, Geometry, Geometry etc...)
  • Physics Equations
  • Signal Processing Equations
  • Chemistry Equations
  • Statistics / Stats Equations
  • Inherit text style from parent widgets

LaTeX rendering is done using flutter_math_fork and using RichText.

latext is working on Android, iOS, the Web and the Desktop platform.

What's the difference to flutter_math_fork library?

flutter_math_fork is simply taking any input for Math rendering. We split up into Text and Math parts. You can use a separator (eg. the common "$" or "$$"). Content between these separators is rendered as math while anything outside of these separators is rendered as normal Flutter Text. This makes Text containing only some single formula parts much easier.

Use this package as a library

Add this to your package's pubspec.yaml file:

dependencies:
  latext: ^0.4.1

You can install packages from the command line with Flutter:

flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Now in your Dart code, you can use:

import 'package:latext/latext.dart';

...

// A static LaTeX block which may not change on `setState()`
return LaTexT(laTeXCode: Text("\\alpha", style: Theme.of(context)
                      .textTheme
                      .bodyText1
                      .copyWith(color: Colors.red)))

// A dynamic LaTeX block which is rebuilt on `setState()` (less efficient but required sometimes)
return Builder(builder: (context) => LaTexT(laTeXCode: Text("\\alpha", style: Theme.of(context)
                      .textTheme
                      .bodyText1
                      .copyWith(color: Colors.red))))

This package was adapted from KaTexFlutter.