minted

minted 是一个 LaTeX 包,它使用 Pygments 库提供语法高亮。 可以使用 fancyvrb 自定义突出显示的源代码。(minted is a LaTeX package that provides syntax highlighting using the Pygments library. Highlighted source code can be customized using fancyvrb.)

Github星跟踪图

minted -- 突出显示的LaTeX源代码

概述

minted 是一个 LaTeX 包,它使用 Pygments 库促进表达式语法高亮。 该软件包还提供了使用 fancyvrb 自定义突出显示的源代码输出的选项。

例如,这段代码:

\begin{minted}[mathescape,
               linenos,
               numbersep=5pt,
               gobble=2,
               frame=lines,
               framesep=2mm]{csharp}
string title = "This is a Unicode π in the sky"
/*
Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter
of an $n$-sided regular polygon circumscribing a
circle of diameter $d$.
*/
const double pi = 3.1415926535
\end{minted}

将产生以下渲染:

screenshot

有关示例和安装说明,请参阅文档

可用性

minted 与 TeX Live 和 MiKTeX 一起发布。 它也可以从 CTAN 获得。 无论如何,PythonPygments 需要单独安装。

许可证

可以在 LaTeX Project Public License(LaTeX项目公共许可证)(LPPL)1.3版或更高版本的条件下分发和/或修改此工作。

此外,该项目可以根据 3-Clause ("New") BSD license 的条款进行分发。

请使用项目的 GitHub 站点 https://github.com/gpoore/minted 获取建议、功能请求和错误报告。

概览

名称与所有者gpoore/minted
主编程语言TeX
编程语言TeX (语言数: 4)
平台Linux, Mac, Windows
许可证
发布数15
最新版本名称v2.9 (发布于 2023-12-18 08:40:55)
第一版名称v2.0-alpha2 (发布于 )
创建于2013-04-08 17:12:03
推送于2023-12-20 20:25:30
最后一次提交
星数1.7k
关注者数22
派生数125
提交数170
已启用问题?
问题数384
打开的问题数70
拉请求数1
打开的拉请求数0
关闭的拉请求数7
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

flattr

minted — highlighted source code for LaTeX

Overview

minted is a LaTeX package that facilitates expressive syntax highlighting
using the Pygments library. The package also provides options to customize
the highlighted source code output using fancyvrb.

For instance, this code:

\begin{minted}[mathescape,
               linenos,
               numbersep=5pt,
               gobble=2,
               frame=lines,
               framesep=2mm]{csharp}
string title = "This is a Unicode π in the sky"
/*
Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter
of an $n$-sided regular polygon circumscribing a
circle of diameter $d$.
*/
const double pi = 3.1415926535
\end{minted}

will produce the following rendering:

screenshot

See the documentation
for examples and installation instructions.

Availability

minted is distributed with both TeX Live and MiKTeX. It is also available
from CTAN. In any case,
Python and Pygments
need to be installed separately.

License

This work may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL),
version 1.3 or later.

Additionally, the project may be distributed under the terms of the
3-Clause ("New") BSD license.

Please use the project's GitHub site at https://github.com/gpoore/minted
for suggestions, feature requests, and bug reports.

去到顶部