-
Single quotation marks in
\jobname
are now replaced with underscores in\minted@jobname
to prevent quoting errors (#137). -
The
autogobble
option now takesfirstline
andlastline
into account (#130). -
Fixed
numberblanklines
, which had been lost in the transition to v2.0+ (#135).
-
Line breaking and all associated options are now completely delegated to
fvextra
. -
Fixed a bug from v2.2 that could cause the first command or environment to vanish when
cache=false
(related to work on\MintedPygmentize
).
-
The
fvextra
package is now required.fvextra
extends and patchesfancyvrb
, and includes improved versions offancyvrb
extensions that were formerly inminted
. -
As part of
fvextra
, theupquote
package is always loaded.fvextra
brings the new optioncurlyquotes
, which allows curly single quotation marks instead of the literal backtick and typewriter single quotation mark produced byupquote
. This allows the defaultupquote
behavior to be disabled when desired. -
Thanks to
fvextra
, the optionsbreakbefore
,breakafter
, andbreakanywhere
are now compatible with non-ASCII characters under pdfTeX (#123). -
Thanks to
fvextra
,obeytabs
no longer causes lines in multi-line comments or strings to vanish (#88), and is now compatible withbreaklines
(#99).obeytabs
will now always give correct results with tabs used for indentation. However, tab stops are not guaranteed to be correct for tabs in the midst of text. -
fvextra
brings the new optionsspace
,spacecolor
,tab
, andtabcolor
that allow these characters and their colors to be redefined (#98). The tab may now be redefined to a flexible-width character such as\rightarrowfill
. The visible tab will now always be black by default, instead of changing colors depending on whether it is part of indentation for a multiline string or comment. -
fvextra
brings the new optionshighlightcolor
andhighlightlines
, which allow single lines or ranges of lines to be highlighted based on line number (#124). -
fvextra
brings the new optionsnumberfirstline
,stepnumberfromfirst
, andstepnumberoffsetvalues
that provide better control over line numbering whenstepnumber
is not 1. -
Fixed a bug from v2.2.2 that prevented
upquote
from working.
- Fixed a bug introduced in v2.2 that prevented setting the Pygments style in
the preamble. Style definitions are now more compatible with using
\MintedPygmentize
to call a custompygmentize
.
-
The
shellesc
package is loaded beforeifplatform
and other packages that might invoke\write18
(#112). -
When caching is enabled, XeTeX uses the new
\mdfivesum
macro from TeX Live 2016 to hash cache content, rather than using\ShellEscape
with Python to perform hashing.
-
All uses of
\ShellEscape
(\write18
) no longer wrap file names and paths with double quotes. This allows a cache directory to be specified relative to a user's home directory, for example,~/minted_cache
.cachedir
andoutputdir
paths containing spaces will now require explicit quoting of the parts of the paths that contain spaces, sinceminted
no longer supplies quoting. See the updated documentation for examples (#89). -
Added
breakbefore
,breakbeforegroup
,breakbeforesymbolpre
, andbreakbeforesymbolpost
. These parallelbreakafter*
. It is possible to usebreakbefore
andbreakafter
for the same character, so long asbreakbeforegroup
andbreakaftergroup
have the same setting (#117). -
Added package options
finalizecache
andfrozencache
. These allow the cache to be prepared for (finalizecache
) and then used (frozencache
) in an environment in which-shell-escape
, Python, and/or Pygments are not available. Note that this only works ifminted
content does not need to be modified, and if no settings that depend on Pygments or Python need to be changed (#113). -
Style names containing hyphens and underscores (
paraiso-light
,paraiso-dark
,algol_nu
) now work (#111). -
The
shellesc
package is now loaded, when available, for compatibility with LuaTeX 0.87+ (TeX Live 2016+, etc.).\ShellEscape
is now used everywhere instead of\immediate\write18
. Ifshellesc
is not available, then a\ShellEscape
macro is created. Whenshellesc
is loaded, there is a check for versions before v0.01c to patch a bug in v0.01b (present in TeX Live 2015) (#112). -
The
bgcolor
option now uses thesnugshade*
environment from theframed
package, sobgcolor
is now compatible with page breaks. Whenbgcolor
is in use, immediately preceding text will no longer push theminted
environment into the margin, and there is now adequate spacing from surrounding text (#121). -
Added missing support for
fancyvrb
'slabelposition
(#102). -
Improved fix for TikZ externalization, thanks to Patrick Vogt (#73).
-
Fixed
breakautoindent
; it was disabled in version 2.1 due to a bug inbreakanywhere
. -
Properly fixed handling of
\MintedPygmentize
(#62). -
Added note on incompatibility of
breaklines
andobeytabs
options. Trying to use these together will now result in a package error (#99). Added note on issues withobeytabs
and multiline comments (#88). Due to the variousobeytabs
issues, the docs now discourage usingobeytabs
. -
Added note to FAQ on
fancybox
andfancyvrb
conflict (#87). -
Added note to docs on the need for
\VerbatimEnvironment
in environment definitions based onminted
environments.
-
Changing the highlighting style now no longer involves re-highlighing code. Style may be changed with almost no overhead.
-
Improved control of automatic line breaks. New option
breakanywhere
allows line breaks anywhere whenbreaklines=true
. The pre-break and post-break symbols for these types of breaks may be set withbreakanywheresymbolpre
andbreakanywheresymbolpost
(#79). New optionbreakafter
allows specifying characters after which line breaks are allowed. Breaks between adjacent, identical characters may be controlled withbreakaftergroup
. The pre-break and post-break symbols for these types of breaks may be set withbreakaftersymbolpre
andbreakaftersymbolpost
. -
breakbytoken
now only breaks lines between tokens that are separated by spaces, matching the documentation. The new optionbreakbytokenanywhere
allows for breaking between tokens that are immediately adjacent. Fixed a bug in\mintinline
that produced a following linebreak when\mintinline
was the first thing in a paragraph andbreakbytoken
was true (#77). -
Fixed a bug in draft mode option handling for
\inputminted
(#75). -
Fixed a bug with
\MintedPygmentize
when a custompygmentize
was specified and there was nopygmentize
on the default path (#62). -
Added note to docs on caching large numbers of code blocks under OS X (#78).
-
Added discussion of current limitations of
texcomments
(#66) andescapeinside
(#70). -
PGF/TikZ externalization is automatically detected and supported (#73).
-
The package is now compatible with LaTeX files whose names contain spaces (#85).
-
Added the compatibility package
minted1
, which provides theminted
1.7 code. This may be loaded when 1.7 compatibility is required. This package works with other packages that\RequirePackage{minted}
, so long as it is loaded first. -
Moved all old
\changes
intochangelog
.
-
Caching is now on by default.
-
Fixed a bug that prevented compiling under Windows when file names contained commas.
-
Added
breaksymbolleft
,breaksymbolsepleft
,breaksymbolindentleft
,breaksymbolright
,breaksymbolsepright
, andbreaksymbolindentright
options.breaksymbol
,breaksymbolsep
, andbreaksymbolindent
are now aliases for the correspondent*left
options. -
Added
kpsewhich
package option. This useskpsewhich
to locate the files that are to be highlighted. This provides compatibility with build tools liketexi2pdf
that function by modifyingTEXINPUTS
(#25). -
Fixed a bug that prevented
\inputminted
from working withoutputdir
. -
Added informative error messages when Pygments output is missing.
-
Added
final
package option (opposite ofdraft
). -
Renamed the default cache directory to
_minted-<jobname>
(replaced leading period with underscore). The leading period caused the cache directory to be hidden on many systems, which was a potential source of confusion. -
breaklines
andbreakbytoken
now work with\mintinline
(#31). -
bgcolor
may now be set through\setminted
and\setmintedinline
. -
When math is enabled via
texcomments
,mathescape
, orescapeinside
, space characters now behave as in normal math by vanishing, instead of appearing as literal spaces. Math need no longer be specially formatted to avoid undesired spaces. -
In default value of
\listoflistingscaption
, capitalized “Listings” so that capitalization is consistent with default values for other lists (figures, tables, algorithms, etc.). -
Added
newfloat
package option that creates thelisting
environment usingnewfloat
rather thanfloat
, thus providing better compatibility with thecaption
package (#12). -
Added support for Pygments option
stripall
. -
Added
breakbytoken
option that preventsbreaklines
from breaking lines within Pygments tokens. -
\mintinline
uses a\colorbox
whenbgcolor
is set, to give more reasonable behavior (#57). -
For PHP,
\mintinline
automatically begins withstartinline=true
(#23). -
Fixed a bug that threw off line numbering in
minted
whenlanglinenos=false
andfirstnumber=last
. Fixed a bug in\mintinline
that threw off subsequent line numbering whenlanglinenos=false
andfirstnumber=last
. -
Improved behavior of
\mint
and\mintinline
indraft
mode. -
The
\mint
command now has the additional capability to take code delimited by paired curly braces{}
. -
It is now possible to set options only for
\mintinline
using the new\setmintedinline
command. Inline options override options specified via\setminted
. -
Completely rewrote option handling.
fancyvrb
options are now handled on the LaTeX side directly, rather than being passed to Pygments and then returned. This makes caching more efficient, since code is no longer rehighlighted just because options changed. -
Fixed buffer size error caused by using
cache
with a very large number of files (#61). -
Fixed
autogobble
bug that caused failure under some operating systems. -
Added support for
escapeinside
(requires Pygments 2.0+; #38). -
Fixed issues with XeTeX and caching (#40).
-
The
upquote
package now works correctly with single quotes when using Pygments 1.6+ (#34). -
Fixed caching incompatibility with Linux and OS X under xelatex (#18 and #42).
-
Fixed
autogobble
incompatibility with Linux and OS X. -
\mintinline
and derived commands are now robust, via\newrobustcmd
frometoolbox
. -
Unused styles are now cleaned up when caching.
-
Fixed a bug that could interfere with caching (#24).
-
Added
draft
package option (#39). This typesets all code usingfancyvrb
; Pygments is not used. This trades syntax highlighting for maximum speed in compiling. -
Added automatic line breaking with
breaklines
and related options (#1). -
Fixed a bug with boolean options that needed a False argument to cooperate with
\setminted
(#48).
-
Added
autogobble
option. This sends code through Python'stextwrap.dedent()
to remove common leading whitespace. -
Added package option
cachedir
. This allows the directory in which cached content is saved to be specified. -
Added package option
outputdir
. This allows an output directory for temporary files to be specified, so that the package can work with LaTeX's-output-directory
command-line option. -
The
kvoptions
package is now required. It is needed to process key-value package options, such as the newcachedir
option. -
Many small improvements, including better handling of paths under Windows and improved key system.
-
\DeleteFile
now only deletes files if they do indeed exist. This eliminates warning messages due to missing files. -
Fixed a bug in the definition of
\DeleteFile
for non-Windows systems. -
Added support for Pygments option
stripnl
. -
Settings macros that were previously defined globally are now defined locally, so that
\setminted
may be confined by\begingroup...\endgroup
as expected. -
Macro definitions for a given style are now loaded only once per document, rather than once per command/environment. This works even without caching.
-
A custom script/executable may now be substituted for
pygmentize
by redefining\MintedPygmentize
.
-
Added the package option
cache
. This significantly increases compilation speed by caching old output. For example, compiling the documentation is around 5x faster. -
New inline command
\mintinline
. Custom versions can be created via\newmintinline
. The command works inside other commands (for example, footnotes) in most situations, so long as the percent and hash characters are avoided. -
The new
\setminted
command allows options to be specified at the document and language levels. -
All extended characters (Unicode, etc.) supported by
inputenc
now work under the pdfTeX engine. This involved using\detokenize
on everything prior to saving. -
New package option
langlinenos
allows line numbering to pick up where it left off for a given language whenfirstnumber=last
. -
New options, including
style
,encoding
,outencoding
,codetagify
,keywordcase
,texcomments
(same astexcl
),python3
(for thePythonConsoleLexer
), andnumbers
. -
\usemintedstyle
now takes an optional argument to specify the style for a particular language, and works anywhere in the document. -
xcolor
is only loaded ifcolor
isn’t, preventing potential package clashes.