Search packages, repositories and app categories

Package detailsv0.5.1

latext

Efficiently display scientific LaTeX equations on Android, iOS, Web, and Desktop platforms using the flutter_math library, without relying on WebView or JavaScript.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.7K
Likes
40
Pub points
155

Install package

flutter pub add latext

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Latext is a Flutter package that efficiently renders scientific LaTeX equations across Android, iOS, Web, macOS, Windows, and Linux without using WebView or JavaScript. Built on top of flutter_math, it provides high-quality, platform-native equation display with fast performance and accurate typography. Ideal for educational apps, research tools, and technical documentation, Latext ensures consistent rendering regardless of the target platform. The package supports complex mathematical expressions and integrates seamlessly into existing Flutter projects.

Use cases

  • Educational apps
  • Research and academic tools
  • Technical documentation
  • Mathematical content in web and desktop apps
  • Interactive learning platforms

Key features

  • Native rendering without WebView
  • Cross-platform compatibility
  • High-performance equation display
  • Support for complex LaTeX syntax
  • Seamless integration with Flutter

Suitable for

  • Developers building math-heavy applications
  • Educators creating interactive learning experiences
  • Teams targeting multiple platforms with consistent UI
  • Apps requiring precise mathematical typography

Considerations

  • Limited to LaTeX equation rendering
  • Requires understanding of LaTeX syntax
  • May have minimal support for advanced LaTeX packages
  • Best suited for static or semi-dynamic math content

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package