starsrivers/flarum-mathren
Composer 安装命令:
composer require starsrivers/flarum-mathren
包简介
TeX math rendering for your forum.
README 文档
README
An extension that handles TeX math rendering for your Flarum forum.
Click to view settings screenshot
Features
- Based on KaTeX (the fastest math typesetting library on the web).
- Display expressions as an inline or a block element.
- Compatible with Markdown and BBCode.
- Copy any expression's source code to the clipboard.
- Integration with
flarum/mentionsextension so you can quote expressions with selection. - Works on preview mode.
Installation
composer require starsrivers/flarum-mathren
Updating
composer update starsrivers/flarum-mathren php flarum cache:clear
Usage
Enable the extension.
Block Expressions
Wrap your TeX code with [math] and [/math] or your custom delimiters.
[math]\int_{-\infty}^\infty\hat\xi\,e^{2\pi i\xi x}\,d\xi[/math]
Block expressions will be wrapped with .mathren-block class.
Inline Expressions
Wrap your TeX code with [imath] and [/imath] or your custom delimiters.
Lorem ipsum dolor [imath]\varDelta = b^2-4ac[/imath] sit amet.
Inline expressions will be wrapped with .mathren-inline class.
Ignoring Expressions
If you're willing to show the TeX code with delimiters, there are three options:
- Wrap your expression with `backticks` or
codetag.
- You must set it as an ignored tag from the settings page.
- Wrap your expression with an ignored class.
- You can set ignored classes from the settings page.
- Use a decisive keyword with your expressions.
- The keyword is
ignoreby default. But you can change it or assign multiple keywords from the settings page. You must write one of those keywords inside a BBCode (i.e.[math=keyword]x^3[/math]).
.mathren-ignore class will be added into ignored expression's wrapper by default. But you can change it from the settings page.
Links
starsrivers/flarum-mathren 适用场景与选型建议
starsrivers/flarum-mathren 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 81 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「latex」 「tex」 「expressions」 「mathematics」 「flarum」 「mathren」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 starsrivers/flarum-mathren 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 starsrivers/flarum-mathren 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 starsrivers/flarum-mathren 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
LaTeX formula to PNG
This is a library with a set of utils to execute and get the response from regular expressions
PHP library for (La)TeX abstraction
TeX math rendering for your forum.
Fluent regular expressions in PHP.
Hyphenate is a Statamic addon providing a modifier to hyphenate strings based on the TeX-Hyphenation algorithm provided by the org_heigl/hyphenator package.
统计信息
- 总下载量: 81
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-05