パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.3.4

flutter_markdown_latex

flutter_markdown パッケージ用の拡張機能で、Markdown 内の LaTeX をレンダリングします。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
5330
いいね数
33
Pub ポイント
150

パッケージをインストール

flutter pub add flutter_markdown_latex

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutter_markdown を拡張し、Markdown テキスト内に LaTeX 式をレンダリングする機能を提供する Flutter パッケージです。豊富なテキストコンテンツに数学記法や数式をスムーズに統合できるため、教育アプリ、ドキュメント、または技術ブログに最適です。既存の Flutter Markdown レンダリングを活用しながら、互換性のあるバックエンドを通じて LaTeX の解析および表示機能を追加しています。モバイル、Web、デスクトップなど、すべての主要プラットフォームで動作します。

用途

  • アプリケーションドキュメントでの数式のレンダリング
  • 数学的なコンテンツを含む教育アプリの作成
  • Markdownベースの記事に科学的式を表示する
  • Flutter ベースのブログに LaTeX を統合する
  • 複雑な表記を使用した技術文書の作成を支援

主な機能

  • LaTeX サポートを備えた flutter_markdown の拡張
  • クロスプラットフォーム互換性
  • pub add を通じたシンプルな統合
  • インラインおよびブロック形式のLaTeXをサポート
  • 標準的な LaTeX 構文を使用

適している対象

  • 教育アプリ開発者
  • Markdown を使用する技術文書作成者
  • STEMコンテンツクリエイター
  • 数学レンダリングを必要とするFlutterアプリ
  • ドキュメント中心のプロジェクト

注意事項

  • LaTeX レンダリングには追加の依存関係が必要です
  • 複雑な数式によってパフォーマンスが異なる場合があります
  • サポートされているLaTeXサブセットに限定
  • レンダリングされた数式にカスタムスタイルが必要になる場合があります
  • リアルタイム編集には適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Flutter Markdown Latex

Coverage Status Pub Version

This extension is created to enhance the functionality of the flutter_markdown package by adding support for rendering LaTeX in markdown. The rendering of LaTeX is achieved through the utilization of the flutter_math_fork package.

Rendering Samples

This is inline latex: $f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x}$

This is block level latex:

$$
c = \pm\sqrt{a^2 + b^2}
$$

This is inline latex with displayMode: $$f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x}$$

The relationship between the height and the side length of an equilateral triangle is:

\[ \text{Height} = \frac{\sqrt{3}}{2} \times \text{Side Length} \]

\[ \text{X} = \frac{1}{2} \times \text{Y} \times \text{Z} = \frac{1}{2} \times 9 \times \frac{\sqrt{3}}{2} \times 9 = \frac{81\sqrt{3}}{4} \]

The basic form of the Taylor series is:

\[f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + \cdots\]

where \(f(x)\) is the function to be expanded, \(a\) is the expansion point, \(f'(a)\), \(f''(a)\), \(f'''(a)\), etc., are the first, second, third, and so on derivatives of the function at point \(a\), and \(n!\) denotes the factorial of \(n\).

In particular, when \(a=0\), this expansion is called the Maclaurin series.

Example

Getting Started

Add dependency

Add flutter_markdown_latex to your pubspec.yaml dependencies.

Import it
import 'package:flutter_markdown_latex/flutter_markdown_latex.dart';
Render it
// with default text style
MarkdownBody(
  selectable: true,
  data: 'latex: \$c = \\pm\\sqrt{a^2 + b^2}\$',
  builders: {
    'latex': LatexElementBuilder(),
  },
  extensionSet: md.ExtensionSet(
    [LatexBlockSyntax()],
    [LatexInlineSyntax()],
  ),
),

// with custom text style
MarkdownBody(
  selectable: true,
  data: 'latex: \$c = \\pm\\sqrt{a^2 + b^2}\$',
  builders: {
    'latex': LatexElementBuilder(
      textStyle: const TextStyle(color: Colors.blue),
      textScaleFactor: 1.2,
    ),
  },
  extensionSet: md.ExtensionSet(
    [LatexBlockSyntax()],
    [LatexInlineSyntax()],
  ),
),

カテゴリー

依存関係

依存関係一覧 3 件

ソースリポジトリ

このパッケージを使用しているプロジェクト