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 stars Tracking Chart

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 获取建议、功能请求和错误报告。

Overview

Name With Ownergpoore/minted
Primary LanguageTeX
Program languageTeX (Language Count: 4)
PlatformLinux, Mac, Windows
License:
Release Count15
Last Release Namev2.9 (Posted on 2023-12-18 08:40:55)
First Release Namev2.0-alpha2 (Posted on )
Created At2013-04-08 17:12:03
Pushed At2023-12-20 20:25:30
Last Commit At
Stargazers Count1.7k
Watchers Count22
Fork Count125
Commits Count170
Has Issues Enabled
Issues Count385
Issue Open Count71
Pull Requests Count1
Pull Requests Open Count0
Pull Requests Close Count7
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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.

To the top