搜尋套件、儲存庫與 APP 分類

套件詳情v0.5.1

latext

使用 flutter_math 庫在 Android、iOS、Web 和桌面平台高效顯示科學 LaTeX 方程式,無需依賴 WebView 或 JavaScript。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1720
喜歡數
40
Pub 分數
155

安裝套件

flutter pub add latext

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Latext 是一個 Flutter 套件,能有效於 Android、iOS、Web、macOS、Windows 與 Linux 上渲染科學 LaTeX 公式,無需使用 WebView 或 JavaScript。基於 flutter_math 建構,提供高品質、平台原生的公式顯示,具備快速效能與精確排版。適用於教育應用、研究工具與技術文件,Latext 確保在不同目標平台上的呈現一致性。此套件支援複雜數學表達式,並可順暢整合至現有的 Flutter 專案。

適用情境

  • 教育類應用
  • 研究與學術工具
  • 技術文件
  • Web 與桌面應用程式中的數學內容
  • 互動式學習平台

主要特色

  • 原生渲染,無需 WebView
  • 跨平台相容性
  • 高效能方程式顯示
  • 支援複雜的 LaTeX 語法
  • 與 Flutter 的無縫整合

適合對象

  • 開發數學密集型應用程式的開發者
  • 教育工作者創建互動學習體驗
  • 針對多個平台且具有一致使用者介面的團隊
  • 需要精確數學排版的應用程式

使用建議

  • 僅限LaTeX公式渲染
  • 需要理解 LaTeX 語法
  • 可能對高級LaTeX套件的支援有限
  • 最適合靜態或半動態數學內容

原始 README

以下為關聯原始碼儲存庫的 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.

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案