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
關注者數21
派生數126
提交數170
已啟用問題?
問題數382
打開的問題數69
拉請求數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.

去到頂部