samwilson/commonmark-latex
最新稳定版本:1.1.0
Composer 安装命令:
composer require samwilson/commonmark-latex
包简介
A CommonMark extension for rendering Markdown to LaTeX.
README 文档
README
An extension to League/CommonMark for rendering Markdown to LaTeX.
This extension is in the list of community extensions to CommonMark.
Installation
Install with Composer:
$ composer require samwilson/commonmark-latex
Usage
<?php $environment = new \League\CommonMark\Environment\Environment(); // Add the core extension. $environment->addExtension(new \League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension\CommonMarkCoreExtension()); // Add the LaTeX extension. $environment->addExtension(new \Samwilson\CommonMarkLatex\LatexRendererExtension()); $converter = new \League\CommonMark\MarkdownConverter($environment); $latex = $converter->convert('*Markdown* content goes here!')->getContent());
License
Copyright © 2022 Sam Wilson https://samwilson.id.au/
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/
Kudos
- The League/CommonMark package (of course!).
- Simple_shapes_example.png Test image by User:Scarce is Public Domain.
- cebe/markdown-latex for inspiration and some of the test files.
统计信息
- 总下载量: 2.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: gpl-3.0-or-later
- 更新时间: 2022-07-12