| 1 | # Changelog — minted LaTeX package |
| 2 | |
| 3 | |
| 4 | ## v3.8.0 (2026/03/03) |
| 5 | |
| 6 | * Switched to `\str_mdfive_hash:e` and `\file_mdfive_hash:n` for MD5 hashing. |
| 7 | These replace `\pdf@mdfivesum` and `\pdf@filemdfivesum` from the |
| 8 | `pdftexcmds` package. Under LuaTeX, `\pdf@mdfivesum` ignores most |
| 9 | multi-byte code points (code points >= 256 for UTF-8), which can cause hash |
| 10 | collisions and thus incorrect documents (#467). |
| 11 | |
| 12 | `\pdf@mdfivesumnative` provides the desired functionality, but switching to |
| 13 | `\str_mdfive_hash:e` is simpler and allows dropping the `pdftexcmds` |
| 14 | package as a dependency. |
| 15 | |
| 16 | * Updated minimum required `fvextra` to v1.14.0 (2026/02/25), which uses |
| 17 | `\str_mdfive_hash:e` for MD5 hashing. There is now an error instead of a |
| 18 | warning if `fvextra` is outdated. |
| 19 | |
| 20 | * Updated minimum required `latex2pydata` LaTeX package to v0.7.0 |
| 21 | (2026/02/25), which uses `\str_mdfive_hash:e` for MD5 hashing. There is |
| 22 | now an error instead of a warning if the `latex2pydata` LaTeX package is |
| 23 | outdated. |
| 24 | |
| 25 | * Updated minimum required `latexminted` to v0.7.0. |
| 26 | |
| 27 | * `\inputminted` and other input commands are now compatible with the |
| 28 | `import` package (#233, #251). This also improves compatibility with |
| 29 | packages that use `import` internally, such as `subfiles`. |
| 30 | |
| 31 | * File extension parsing for identifying temp files for `highlightmode` |
| 32 | now uses `\file_parse_full_name:nNNN`, which gives more robust results. |
| 33 | When a file has a double file extension, both extensions are checked |
| 34 | separately in identifying temp files. Previously, a double extension was |
| 35 | treated as a single unit (#457). |
| 36 | |
| 37 | * Added command `\MintedRegisterTempFileExtension`. This allows file |
| 38 | extensions for temporary files to be registered so that the files are |
| 39 | handled correctly regardless of `highlightmode`. Added built-in support |
| 40 | for `.tcbtemp` file extension for `tcolorbox` (#456). |
| 41 | |
| 42 | * Added options `rangestartstringline`, `rangestartafterstringline`, |
| 43 | `rangestopstringline`, and `rangestopbeforestringline`. These function |
| 44 | like the `range*string` options, except that they operate on |
| 45 | entire lines rather than immediately at the locations of delimiting |
| 46 | strings. |
| 47 | |
| 48 | * The `minted` LaTeX package version is now passed to `latexminted` so that |
| 49 | `latexminted` can check for compatibility with `minted.sty`. This is |
| 50 | needed in cases when the `minted` LaTeX package is not used with a bundled |
| 51 | `latexminted`. Previously, `minted.sty` checked for compatibility with |
| 52 | `latexminted`, but there was no reverse check. |
| 53 | |
| 54 | * Added package option `cacheignoresfilecontents`. This allows `frozencache` |
| 55 | to function with only the cache. External files accessed by commands like |
| 56 | `\inputminted` are no longer required, since this disables cache |
| 57 | verification for external files (#475). |
| 58 | |
| 59 | * Updated documentation for `frozencache` for `minted` v3 (#475). Improved |
| 60 | error messages for `frozencache`. |
| 61 | |
| 62 | * Added support for `fancyvrb`'s `baseline` option (#476). |
| 63 | |
| 64 | |
| 65 | |
| 66 | ## v3.7.0 (2025/05/14) |
| 67 | |
| 68 | * Added support for the Pygments `tokenmerge` filter and enabled it by |
| 69 | default (#446). This was the default in `minted` v2 but was lost in the |
| 70 | transition to v3. |
| 71 | |
| 72 | * Updated minimum required `fvextra` to 2025/05/14 and added support for new |
| 73 | `fvextra` option `texcomments`. |
| 74 | |
| 75 | * Updated minimum required `latexminted` to v0.6.0. |
| 76 | |
| 77 | * Updated documentation to cover loading `.latexminted_config` config files |
| 78 | from `$XDG_CONFIG_HOME` (#449). |
| 79 | |
| 80 | * Added FAQ documentation on console/REPL lexers (#267, #388). |
| 81 | |
| 82 | |
| 83 | |
| 84 | ## v3.6.0 (2025/03/06) |
| 85 | |
| 86 | * Updated minimum required `latexminted` to v0.5.0. |
| 87 | |
| 88 | * In the `latexminted.py` launcher script, replaced `__version__` with |
| 89 | `__launcher_version__` and switched to date-based versioning to prevent |
| 90 | confusion between the launcher script version and the `latexminted` library |
| 91 | version. |
| 92 | |
| 93 | |
| 94 | |
| 95 | ## v3.5.1 (2025/02/12) |
| 96 | |
| 97 | * Fixed a bug from v3.5.0 related to calculating input line numbers that |
| 98 | caused errors with `\inputminted` (#435). |
| 99 | |
| 100 | |
| 101 | |
| 102 | ## v3.5.0 (2025/02/09) |
| 103 | |
| 104 | * Tab characters in inputted temp files with recognized file extensions are |
| 105 | no longer lost when `highlightmode` is `fastfirst` during the first |
| 106 | compile, or when `highlightmode` is `fast` (#431). |
| 107 | |
| 108 | * For environments such as `minted`, any error messages generated within |
| 109 | Python and passed to LaTeX now refer to the starting line of the |
| 110 | environment, instead of the ending line. This improves debugging for long |
| 111 | environments. |
| 112 | |
| 113 | * Updated minimum required `latexminted` to v0.4.0 (#425). |
| 114 | |
| 115 | |
| 116 | |
| 117 | ## v3.4.0 (2024/11/17) |
| 118 | |
| 119 | * Replaced temp counter with a macro to prevent issues with commands |
| 120 | and environments such as `\text` from `amsmath` that modify counter |
| 121 | behavior (#423). |
| 122 | |
| 123 | * When `highlightmode` causes all code to be highlighted at once, duplicate |
| 124 | highlighting is now detected and skipped. |
| 125 | |
| 126 | |
| 127 | |
| 128 | ## v3.3.0 (2024/11/10) |
| 129 | |
| 130 | * Fixed a bug from v3.2.0 that caused errors with unrestricted shell escape |
| 131 | (#420). |
| 132 | |
| 133 | * Improved error messages mention the possibility of MiKTeX being used with |
| 134 | `-aux-directory` or `-output-directory` without setting a |
| 135 | `TEXMF_OUTPUT_DIRECTORY` environment variable (#419). |
| 136 | |
| 137 | * Updated documentation on shell escape for TeX Live. The `latexminted` |
| 138 | executable has been added to TeX Live's list of trusted executables, so |
| 139 | `-shell-escape` is no longer required. |
| 140 | |
| 141 | * Added support for `fancyvrb` options `reflabel` and `vspace` (#421). |
| 142 | |
| 143 | |
| 144 | |
| 145 | ## v3.2.0 (2024/10/29) |
| 146 | |
| 147 | * Fixed compatibility with `\includeonly` by replacing buffer length counters |
| 148 | with macros (#414). As part of this, the minimum supported `latex2pydata` |
| 149 | LaTeX package is now 0.3.0 and the minimum supported `fvextra` is now |
| 150 | 1.9.0. |
| 151 | |
| 152 | * Added new options that allow keywords to be added to a lexer (#416): |
| 153 | `extrakeywords`, `extrakeywordsconstant`, `extrakeywordsdeclaration`, |
| 154 | `extrakeywordsnamespace`, `extrakeywordspseudo`, `extrakeywordsreserved`, |
| 155 | `extrakeywordstype`. This covers all keyword tokens supported by Pygments |
| 156 | (https://pygments.org/docs/tokens/#keyword-tokens). |
| 157 | |
| 158 | * Many performance improvements. When combined with `latexrestricted` |
| 159 | v0.6.0, these can give a cumulative speedup of over 40% in the case when no |
| 160 | code needs to be highlighted. |
| 161 | |
| 162 | - Temp files and the cache are now only cleaned up when necessary at the |
| 163 | end of the document. Previously, this occurred at the end of each |
| 164 | compile, unnecessarily increasing compile time. |
| 165 | |
| 166 | - In `latexminted.py`, switched from `platform.system()` to `sys.platform` |
| 167 | for better performance in detecting operating system. |
| 168 | |
| 169 | Performance reference: https://github.com/python/cpython/issues/95531. |
| 170 | |
| 171 | - In `latexminted.py` with TeX Live, the value of `TEXMFOUTPUT` is no |
| 172 | longer retrieved with `kpsewhich` unless it is actually used. Also fixed |
| 173 | a bug in parsing `TEXMFOUTPUT` value (whitespace is now stripped). |
| 174 | |
| 175 | * The `debug` package option now records shell escape commands in the log. |
| 176 | |
| 177 | * In config detection, error messages now mention `.errlog.minted` file when |
| 178 | it exists. |
| 179 | |
| 180 | |
| 181 | |
| 182 | ## v3.1.2 (2024/10/07) |
| 183 | |
| 184 | * There is now only a single `\read` allocation for reading temporary files |
| 185 | when `highlightmode` is set to `fast` or `fastfirst`. Previously, there |
| 186 | was one allocation per temp file, which could cause allocation errors when |
| 187 | several temp files were highlighted during the same compile (#413). |
| 188 | |
| 189 | |
| 190 | |
| 191 | ## v3.1.1 (2024/10/03) |
| 192 | |
| 193 | * Fixed bugs in processing temporary files regardless of `highlightmode` from |
| 194 | v3.1.0. With `highlightmode=fastfirst` (default), this would cause an |
| 195 | error during the first compile, but then all subsequent compiles would |
| 196 | complete correctly. |
| 197 | |
| 198 | |
| 199 | |
| 200 | ## v3.1.0 (2024/10/03) |
| 201 | |
| 202 | * All timestamp comparisons that are part of communicating with the |
| 203 | `latexminted` Python executable now use timestamps that have been processed |
| 204 | with `\detokenize` (#405). |
| 205 | |
| 206 | * Option processing now wraps values in curly braces to prevent escaping |
| 207 | issues when options are passed on to other packages for further processing |
| 208 | (#407). |
| 209 | |
| 210 | * Fixed compatibility with `dvilualatex` (#406). |
| 211 | |
| 212 | * Temporary files with common file extensions are now automatically detected |
| 213 | and processed correctly regardless of `highlightmode` (#401). Previously, |
| 214 | `highlightmode=immediate` was needed for working with temp files that are |
| 215 | overwritten or deleted during compilation; the default |
| 216 | `highlightmode=fastfirst` gave an error message during the first compile |
| 217 | but worked correctly during subsequent compiles. |
| 218 | |
| 219 | * Fixed bug when `cache=false`. When caching is disabled, `highlightmode` is |
| 220 | now set to `immediate`. |
| 221 | |
| 222 | * The minimum supported `latexminted` version is now 0.2.0. The new |
| 223 | `latexminted` subcommand `cleantemp` is now used instead of `clean` when |
| 224 | the cache does not require cleaning. This prevents errors when |
| 225 | `cache=false`. |
| 226 | |
| 227 | * Fixed docs for `breakbeforeinrun` and `breakafterinrun` (#408). These had |
| 228 | not been properly updated after `fvextra` renamed the options. |
| 229 | |
| 230 | |
| 231 | |
| 232 | ## v3.0.0 (2024/09/22) |
| 233 | |
| 234 | * Backward compatibility: The new `minted2` package provides the features of |
| 235 | `minted` v2.9, the final release before v3. No additional v2 releases are |
| 236 | planned; no changes to the `minted2` package are expected. |
| 237 | |
| 238 | * `minted` v3 is a complete rewrite from v2.9. `minted` v3 includes |
| 239 | significant changes from `minted` v2 on the LaTeX side, and also uses a new |
| 240 | `minted`-specific Python executable called `latexminted` to perform syntax |
| 241 | highlighting. This executable is specifically designed to meet the |
| 242 | security requirements for restricted shell escape programs. Once it has |
| 243 | passed a security review and is accepted by TeX distributions, it will be |
| 244 | possible to highlight code without `-shell-escape` and its attendant |
| 245 | security vulnerabilities. |
| 246 | |
| 247 | Syntax highlighting is still performed with Pygments, but the `pygmentize` |
| 248 | executable included with Pygments is no longer used. |
| 249 | |
| 250 | * Installing the `minted` package now also installs the `latexminted` Python |
| 251 | executable and all required Python libraries, including Pygments, within |
| 252 | your TeX distribution. These require Python >= 3.8. If the default Python |
| 253 | version on `PATH` is < 3.8, then the `latexminted` Python executable will |
| 254 | attempt to locate a more recent version and run itself with that version in |
| 255 | a subprocess. |
| 256 | |
| 257 | Manually installing Python libraries is only necessary if you want to use |
| 258 | plugin packages for Pygments. In that case, install the `latexminted` |
| 259 | Python package in a Python installation. This automatically installs |
| 260 | `latex2pydata`, `latexrestricted`, and Pygments as dependencies. |
| 261 | `latexminted` is available from the |
| 262 | [Python Package Index (PyPI)](https://pypi.org/project/latexminted/). Then |
| 263 | install plugin packages for Pygments within the same Python installation. |
| 264 | |
| 265 | * The new `latexminted` Python executable is designed to be compatible with |
| 266 | the security requirements for restricted shell escape, so that in the |
| 267 | future TeX distributions can enable `latexminted` without requiring |
| 268 | `-shell-escape`. It is possible to benefit from these enhanced security |
| 269 | capabilities immediately and avoid the need for `-shell-escape`. |
| 270 | |
| 271 | - TeX Live: Copy the variable `shell_escape_commands` from the |
| 272 | distribution `texmf.cnf` (typically something like |
| 273 | `<tex_distro>/texmf-dist/web2c/texmf.cnf`) into the user `texmf.cnf` |
| 274 | (typically something like `<tex_distro>/texmf.cnf`), and then add |
| 275 | `latexminted` to the end of the `shell_escape_commands` list. The |
| 276 | location of the `texmf.cnf` files can be determined by running |
| 277 | `kpsewhich -all texmf.cnf`. |
| 278 | |
| 279 | - MiKTeX: Add a line `AllowedShellCommands[] = latexminted` to the |
| 280 | existing list of allowed commands in `miktex.ini`. You may want to |
| 281 | modify the user-scoped configuration instead of the system-wide |
| 282 | configuration. See the |
| 283 | [MiKTeX documentation](https://docs.miktex.org/manual/miktex.ini.html) |
| 284 | for more details, particularly `initexmf --edit-config-file <file>`. |
| 285 | |
| 286 | * Errors and warnings that occur within Python are now reported as `minted` |
| 287 | package errors and warnings within LaTeX in nearly all cases. It should no |
| 288 | longer be necessary to look through the compile log for Python errors and |
| 289 | warnings. A temp file `*.errlog.minted` containing Python traceback |
| 290 | information is created in some cases when errors cannot be fully reported |
| 291 | within LaTeX or more details may be needed. |
| 292 | |
| 293 | * [`latex2pydata`](https://github.com/gpoore/latex2pydata) is now required |
| 294 | for passing data from LaTeX to Python and then processing it within Python. |
| 295 | This consists of a LaTeX package, available from |
| 296 | [CTAN](https://ctan.org/pkg/latex2pydata), and a Python package, available |
| 297 | from [PyPI](https://pypi.org/project/latex2pydata/). The LaTeX package can |
| 298 | typically be installed with your TeX distribution's package manager. The |
| 299 | Python package is automatically installed within your TeX distribution when |
| 300 | `minted` is installed. |
| 301 | |
| 302 | * On the LaTeX side, all syntax highlighting settings are now serialized in |
| 303 | Python literal format using `latex2pydata` and then saved to a temp file, |
| 304 | which is loaded on the Python side. Settings are no longer passed to the |
| 305 | Python side using command-line arguments. Temp files for passing data to |
| 306 | Python are now named using MD5 hashes, instead of using a sanitized version |
| 307 | of document `\jobname`. This eliminates an entire class of security issues |
| 308 | and bugs related to escaping and quoting command-line arguments (#180, |
| 309 | #276, #298, #322, #338, #354). It also eliminates bugs related to |
| 310 | processing settings as a sequence of command-line options, since |
| 311 | `pygmentize` accumulates some options that are used multiple times rather |
| 312 | than overwriting earlier values with later values (#258, #337). |
| 313 | |
| 314 | * Options are now handled with `pgfkeys` and `pgfopts`, instead of |
| 315 | `keyval` and `kvoptions`. |
| 316 | |
| 317 | * Temporary files are no longer created unless the cache needs to be updated |
| 318 | (or caching is disabled). All MD5 hashing of code now takes place in |
| 319 | memory instead of using one temp file per command/environment. |
| 320 | |
| 321 | All temporary files are cleaned up automatically when compiling completes |
| 322 | without interruption. All temporary files now have names of the form |
| 323 | `_<hash>.<role>.minted`. `<hash>` is an MD5 hash of `\jobname` (if |
| 324 | `\jobname` is wrapped in double or single quotation marks, these are |
| 325 | stripped before the MD5 is computed). `<role>` is the role of the temp |
| 326 | file: `data` (data passed to Python), `config` (detected system |
| 327 | configuration), `style` (highlighting style definition), `highlight` |
| 328 | (highlighted code), or `message` (message passed back to LaTeX by Python |
| 329 | executable). `<role>` can also be `errlog` when the Python executable |
| 330 | encounters an unexpected error that it is not designed to report to the |
| 331 | LaTeX side; this is not automatically cleaned up. There are no more |
| 332 | `<jobname>.pyg` and `<jobname>.out.pyg` files. |
| 333 | |
| 334 | * Several package options are no longer supported and result in errors or |
| 335 | warnings. |
| 336 | |
| 337 | - `finalizecache`: No longer needed. The `frozencache` package option now |
| 338 | uses the regular cache, rather than requiring a new, special cache |
| 339 | containing files with sequentially numbered names (#342). When using |
| 340 | `frozencache` with `-output-directory`, the `cachedir` package option |
| 341 | should be used to specify a full relative path to the cache (for |
| 342 | example, `cachedir=./<output_directory>/_minted`). |
| 343 | |
| 344 | - `outputdir`: No longer needed (#268). TeX Live 2024+ saves a custom |
| 345 | output directory from `-output-directory` in the environment variable |
| 346 | [`TEXMF_OUTPUT_DIRECTORY`](https://tug.org/texinfohtml/web2c.html#Output-file-location). |
| 347 | The environment variable `TEXMF_OUTPUT_DIRECTORY` can be set manually in |
| 348 | other cases. |
| 349 | |
| 350 | - `kpsewhich`: No longer needed. `kpsewhich` is now automatically |
| 351 | invoked as necessary by the `latexminted` Python executable in locating |
| 352 | files. |
| 353 | |
| 354 | - `draft` and `final`: These no longer have any effect and result in a |
| 355 | warning. They will soon be removed altogether. Improvements in caching |
| 356 | have largely eliminated the overhead that `draft` mode was designed to |
| 357 | avoid, while new features that are implemented purely within Python have |
| 358 | made it impossible in some cases to typeset code using only LaTeX. The |
| 359 | new package options `placeholder` and `verbatim` offer alternatives when |
| 360 | maximum compilation speed is needed or the `latexminted` Python |
| 361 | executable is unavailable. |
| 362 | |
| 363 | * New package options: |
| 364 | |
| 365 | - `debug`: Keep temp files from highlighting to aid in debugging. Also |
| 366 | write current file name and line number to log before `\input` of |
| 367 | highlighted code (#348). |
| 368 | |
| 369 | - `highlightmode`: Determines when code is highlighted. The default is |
| 370 | `fastfirst`. If a cache for the document exists, then code is |
| 371 | highlighted immediately. If a cache for the document does not exist, |
| 372 | then typeset a placeholder instead of code and highlight all code at the |
| 373 | end of the document. This will require a second compile before code is |
| 374 | typeset, but because all code is highlighted at once, there is less |
| 375 | overhead and the total time required can be significantly less for |
| 376 | documents that include many code snippets. The alternatives are `fast` |
| 377 | (always highlight at end of document, requiring a second compile) and |
| 378 | `immediate` (always highlight immediately, so no second compile is |
| 379 | needed). `immediate` should be used when typesetting code in external |
| 380 | temp files that are overwritten during compilation. |
| 381 | |
| 382 | When code is highlighted at the end of the document with `fast` or |
| 383 | `fastfirst`, any error and warning messages will refer to a location at |
| 384 | the end of the document rather than the original code location, since |
| 385 | highlighting occurred at the end of the document. In this case, messages |
| 386 | are supplemented with original LaTeX source file names and line numbers |
| 387 | to aid in debugging. |
| 388 | |
| 389 | - `placeholder`: Instead of typesetting code, insert a placeholder. This |
| 390 | is enabled automatically when working with PGF/TikZ externalization. |
| 391 | |
| 392 | - `verbatim`: Instead of highlighting code, attempt to typeset it verbatim |
| 393 | without using the `latexminted` Python executable. This is not |
| 394 | guaranteed to be an accurate representation of the code, since some |
| 395 | features such as `autogobble` require Python. |
| 396 | |
| 397 | * `bgcolor` now uses the new `bgcolor` option from `fvextra` v1.8, rather |
| 398 | than `snugshade*` from `framed`. This resolves incompatibilities between |
| 399 | `bgcolor` and `xleftmargin`/`xrightmargin` (#214), eliminates unneeded |
| 400 | whitespace before/after the background (#220), prevents text from |
| 401 | overflowing the background (#278), and provides uniform background height |
| 402 | for `\mintinline` (#397). Because `bgcolor` now introduces no additional |
| 403 | whitespace or padding, existing documents may require some modification. |
| 404 | |
| 405 | Added new option `bgcolorpadding` for modifying padding in background color |
| 406 | regions. Added new option `bgcolorvphantom` for setting height of |
| 407 | background color in inline contexts. |
| 408 | |
| 409 | * Renamed package options `langlinenos` to `lexerlinenos` and |
| 410 | `inputlanglinenos` to `inputlexerlinenos`. The old names are still |
| 411 | supported. |
| 412 | |
| 413 | * The default cache directory name is now `_minted`. All files within a |
| 414 | directory now share the same cache, instead of having separate per-document |
| 415 | caches. The new `latexminted` Python executable improves cache management |
| 416 | so that a shared cache functions correctly. A cache file that is shared by |
| 417 | multiple documents will not be deleted if one document ceases to use the |
| 418 | file. |
| 419 | |
| 420 | Document-specific caching as in `minted` v2 can be restored using the |
| 421 | package option `cachedir`. For example, for files whose names do not |
| 422 | contain spaces, simply use `cachedir=\detokenize{_minted-}\jobname`. For |
| 423 | files with names that do contain spaces, use a copy of `\jobname` in which |
| 424 | the wrapping quotation marks have been removed or replaced with other |
| 425 | characters and the spaces have been replaced with placeholders such as `_`. |
| 426 | |
| 427 | * Cache file names now take the form `<hash>_highlight.minted` and |
| 428 | `<style>_style.minted`. `<hash>` is a single MD5 hash of code and options, |
| 429 | when serialized in Python literal format. Cache file names no longer use |
| 430 | two concatenated MD5 hashes, one of code and one of options. The cache |
| 431 | directory will also contain files `_<hash>.index.minted`. These list all |
| 432 | cache files used by a given document. In this case, `<hash>` is the MD5 |
| 433 | hash of the document's `\jobname` (if `\jobname` is wrapped in double or |
| 434 | single quotation marks, these are stripped before the MD5 is computed). |
| 435 | |
| 436 | * Highlighting style names must now match the regular expression |
| 437 | `^[0-9A-Za-z_-]+$`. This is checked on the LaTeX side. |
| 438 | |
| 439 | * `\inputminted` is redefined as robust and is usable in movable arguments. |
| 440 | |
| 441 | * `\newminted` now creates an environment that takes an optional argument |
| 442 | consisting of options, instead of taking no argument. It still creates a |
| 443 | starred `*` environment variant that takes a mandatory argument consisting |
| 444 | of options, but this is only retained for backward-compatibility purposes. |
| 445 | |
| 446 | * Improved fallback behavior in the event of errors. If code cannot be |
| 447 | highlighted, it is automatically typeset with a verbatim approximation if |
| 448 | possible and otherwise replaced by a placeholder. If a highlighting style |
| 449 | definition cannot be generated, it is automatically replaced with the |
| 450 | default style if available, and otherwise a built-in style with no syntax |
| 451 | highlighting is used. |
| 452 | |
| 453 | * File encoding changes: |
| 454 | |
| 455 | - The new `latexminted` executable assumes that LaTeX output files are |
| 456 | UTF-8, and saves highlighted code as UTF-8. That is, LaTeX should be |
| 457 | configured so that everything is UTF-8. |
| 458 | |
| 459 | - The `encoding` option now defaults to UTF-8. It is only used in decoding |
| 460 | files for `\inputminted` and commands based on it. |
| 461 | |
| 462 | - The `outencoding` option is no longer supported. |
| 463 | |
| 464 | * Added new options for including ranges of code based on literal string |
| 465 | delimiters or regular expressions. These work with all commands and |
| 466 | environments, including `\inputminted`. |
| 467 | |
| 468 | - `rangestartstring`: Select code starting with this string. |
| 469 | |
| 470 | - `rangestartafterstring`: Select code starting immediately after this |
| 471 | string. |
| 472 | |
| 473 | - `rangestopstring`: Select code ending with this string. |
| 474 | |
| 475 | - `rangestopbeforestring`: Select code ending immediately before this |
| 476 | string. |
| 477 | |
| 478 | - `rangeregex`: Select code that matches this regular expression. |
| 479 | |
| 480 | - `rangeregexmatchnumber` [default=`1`]: If there are multiple |
| 481 | non-overlapping matches for `rangeregex`, this determines which is |
| 482 | used. |
| 483 | |
| 484 | - `rangeregexdotall` [default=`false`]: `.` matches any character |
| 485 | including the newline. |
| 486 | |
| 487 | - `rangeregexmultiline` [default=`false`]: `^` and `$` match at |
| 488 | internal newlines, not just at the start/end of the string. |
| 489 | |
| 490 | If line numbers are displayed, they are based on the range of code that is |
| 491 | selected; code that is discarded in selecting the range is not considered |
| 492 | in calculating line numbers. |
| 493 | |
| 494 | String values and regular expressions can be set using text with backslash |
| 495 | escapes, in a manner analogous to regular (non-raw) Python strings. Any |
| 496 | ASCII symbols and punctuation, including those that have special LaTeX |
| 497 | meaning, can be backslash escaped. For example, `rangeregex=\\\\.` is |
| 498 | processed like the Python string `"\\\\."`, becoming the literal text |
| 499 | `\\.`, which is then interpreted as the regular expression for a literal |
| 500 | backslash followed by any character. Alternatively, string values and |
| 501 | regular expressions can be set using a single macro that, when fully |
| 502 | expanded (`\edef`), gives the desired literal text. For example, |
| 503 | `\def\pattern{\detokenize{\\.}}` and then `rangeregex=\pattern` would be |
| 504 | equivalent to `rangeregex=\\\\.`. |
| 505 | |
| 506 | * There is now official support for custom lexers. Custom lexers that are |
| 507 | installed as Pygments [plugins](https://pygments.org/docs/plugins/) have |
| 508 | always been supported, since Pygments can find them automatically. |
| 509 | However, custom lexers in the form of `*.py` files in the document |
| 510 | directory have not officially been supported. |
| 511 | |
| 512 | Custom lexers can be specified in place of builtin lexers. For example, |
| 513 | `\inputminted{lexer.py}{<file>}` or |
| 514 | `\inputminted{./path/lexer.py:LexerClass}{<file>}`. |
| 515 | |
| 516 | Custom lexers in the form of `*.py` files are not automatically enabled, |
| 517 | since they are equivalent to arbitrary code execution and are thus a |
| 518 | significant security risk. To enable custom lexers, create a file |
| 519 | `.latexminted_config`. This can be in your home directory (as found by |
| 520 | Python's `pathlib.Path.home()`) or in `TEXMFHOME`; if this file is found in |
| 521 | both locations, settings from the TeX location overwrite settings from the |
| 522 | home directory. It is also possible to enable a `.latexminted_config` file |
| 523 | in your document directory; see the documentation for |
| 524 | `.latexminted_config`. This file must contain data in Python literal, |
| 525 | JSON, or TOML format. TOML requires Python >= 3.11. The data must contain |
| 526 | an entry equivalent to this Python data: |
| 527 | ``` |
| 528 | { |
| 529 | "custom_lexers": { |
| 530 | "<lexer file name>": "<SHA-256 hash of lexer file>" |
| 531 | } |
| 532 | } |
| 533 | ``` |
| 534 | `<lexer file name>` is just the name of the file, with no path or class |
| 535 | included. For example, for `./path/lexer.py:LexerClass` it would be just |
| 536 | `lexer.py`. Any number of file names and hashes can be provided. |
| 537 | |
| 538 | * Enhancements of existing options: |
| 539 | |
| 540 | - `codetagify` now supports comma-delimited lists of strings, not just |
| 541 | space-delimited lists (#126). |
| 542 | |
| 543 | * New options: |
| 544 | |
| 545 | - `envname`: Name of the environment that wraps typeset code. By default, |
| 546 | it is `Verbatim` in block contexts and `VerbEnv` in inline contexts. |
| 547 | This is compatible with `fancyvrb`'s `BVerbatim` (#281). |
| 548 | |
| 549 | Implementation note: Code is actually wrapped a `MintedVerbatim` |
| 550 | environment, and then this is redefined to be equivalent to `envname` |
| 551 | (see the new option `literalenvname`). |
| 552 | |
| 553 | - `literalenvname`: This is the name of the environment that literally |
| 554 | appears in highlighted code output as a wrapper around the code. By |
| 555 | default it is `MintedVerbatim`. This environment is redefined to be |
| 556 | equivalent to the current value of `envname`. There should be few if any |
| 557 | situations where modifying `literalenvname` rather than `envname` is |
| 558 | actually necessary. |
| 559 | |
| 560 | - `literatecomment`: This is for compatibility with literate programming |
| 561 | formats, such as the `.dtx` format commonly used for writing LaTeX |
| 562 | packages. If all lines of code begin with `<literatecomment>`, then |
| 563 | `<literatecomment>` is removed from the beginning of all lines. For |
| 564 | example, for `.dtx`, `literatecomment=\%`. |
| 565 | |
| 566 | - `listparameters`: Previously unsupported `fancyvrb` option (#256). |
| 567 | |
| 568 | - `breakanywhereinlinestretch`: New `fvextra` option. |
| 569 | |
| 570 | * `gobble` is now applied to code before syntax highlighting and no longer |
| 571 | uses the Pygments `gobble` filter, which operates on the token stream |
| 572 | generated by a lexer. This makes `gobble` and `autogobble` behave in the |
| 573 | same manner. The Pygments `gobble` filter is still accessible via the new |
| 574 | option `gobblefilter` (#379). |
| 575 | |
| 576 | * Standard catcodes are now enforced in reading the optional argument of |
| 577 | environments that wrap Pygments output. This prevents issues with |
| 578 | `babel`'s `magyar` (#382). |
| 579 | |
| 580 | |
| 581 | |
| 582 | ## v2.9 (2023/12/18) |
| 583 | |
| 584 | * This is expected to be the last release of `minted` v2.x. If so, it will |
| 585 | then become the new package `minted2` for backward compatibility. |
| 586 | |
| 587 | * Added new option `ignorelexererrors`. When lexer errors are shown in |
| 588 | highlighted output (default), they are typically displayed as red boxes |
| 589 | that surround the relevant text. When lexer errors are ignored, the |
| 590 | literal text that caused lexer errors is shown but there is no indication |
| 591 | that it caused errors (#374). |
| 592 | |
| 593 | * There is now a warning if `fvextra` version is less than 1.5. |
| 594 | |
| 595 | |
| 596 | |
| 597 | ## v2.8 (2023/09/12) |
| 598 | |
| 599 | * Under non-Windows operating systems, detect executables with `command -v` |
| 600 | rather than `which` to provide better cross-platform support (#345). |
| 601 | |
| 602 | * Added new package option `inputlanglinenos`. This extends the existing |
| 603 | `langlinenos` to cover `\inputminted` as well (#361). |
| 604 | |
| 605 | * Improved and updated Pygments documentation (#339). |
| 606 | |
| 607 | * Improved `\mintinline` documentation to address packages that redefine |
| 608 | `\section` (#368). |
| 609 | |
| 610 | * Added support for `fvextra` options `breakafterinrun` and |
| 611 | `breakbeforeinrun` (#358). In `fvextra` version 1.5, `breakaftergroup` |
| 612 | and `breakbeforegroup` were renamed to `breakafterinrun` and |
| 613 | `breakbeforeinrun` to avoid naming ambiguity with new options. The old |
| 614 | options `breakaftergroup` and `breakbeforegroup` are no longer supported. |
| 615 | |
| 616 | * Added `DEPENDS.txt` (#331). |
| 617 | |
| 618 | * Removed unnecessary dependency on `calc` package (#313). |
| 619 | |
| 620 | * Added documentation in FAQ about copy and paste limitations (#302). |
| 621 | |
| 622 | * Added note on `text` lexer to documentation (#274). |
| 623 | |
| 624 | |
| 625 | |
| 626 | ## v2.7 (2022/12/12) |
| 627 | |
| 628 | * Reimplemented `\mintinline` to use `fvextra`'s argument reading and |
| 629 | processing macros, and to use `fvextra`'s `\Verb` internally. |
| 630 | `\mintinline` now works with all line breaking options supported by |
| 631 | `fvextra`'s `\Verb`, including `breakanywhere` (#329, #340). It now |
| 632 | gives better results when used inside other commands, since it uses |
| 633 | `fvextra`'s retokenization macros. It is now compatible with `hyperref` |
| 634 | for PDF strings such as bookmarks. |
| 635 | |
| 636 | * Reimplemented `\newmintinline` based on new `\mintinline`. |
| 637 | |
| 638 | * Reimplemented `\mint` to use `fvextra`'s argument reading and processing |
| 639 | macros. It now gives better results when used inside other commands, |
| 640 | since it uses `fvextra`'s retokenization macros. Fixed a bug that caused |
| 641 | a continued paragraph after `\mint` to be indented (#218). |
| 642 | |
| 643 | * Reimplemented `\newmint` based on new `\mint`. Commands created with |
| 644 | `\newmint` can now use curly braces as delimiters, just like `\mint` |
| 645 | (#254). |
| 646 | |
| 647 | * Settings passed to `pygmentize` as command-line options are now quoted. |
| 648 | This prevents `escapeinside` characters from being interpreted as special |
| 649 | shell characters (#179, #262). |
| 650 | |
| 651 | * Fixed bug with `autogobble` that produced incorrect dedent when using |
| 652 | `lastline` with the lines beyond `lastline` having less indentation than |
| 653 | the selected range (#326). |
| 654 | |
| 655 | * Fixed unintended line breaks after hyphens under LuaTeX (#263). |
| 656 | |
| 657 | * Added warning to documentation of `\inputminted` regarding filenames |
| 658 | and shell command execution (#338). |
| 659 | |
| 660 | |
| 661 | |
| 662 | ## v2.6 (2021/12/24) |
| 663 | |
| 664 | * `autogobble` automatically uses `python` or `python3` executables, |
| 665 | depending on availability, instead of requiring `python`. A custom |
| 666 | executable can be specified by redefining `\MintedPython` (#277, #287). |
| 667 | |
| 668 | * Fixed `autogobble` compatibility with `fancyvrb` 4.0+ (#315, #316). |
| 669 | |
| 670 | * Pygments style names may now contain arbitrary non-whitespace characters. |
| 671 | Previously, style names containing digits and some punctuation characters |
| 672 | were incompatible (#210, #294, #299, #317). Pygments macros are now only |
| 673 | defined just before use locally within `minted` commands and environments, |
| 674 | rather than globally. Pygments macros now always use a `\PYG` prefix |
| 675 | regardless of style, rather than a prefix of the form `\PYG<style>` (for |
| 676 | example, what was previously `\PYGdefault` is now simply `\PYG`). |
| 677 | |
| 678 | * Removed Python-based MD5 hashing for XeTeX, which was necessary before |
| 679 | XeTeX added `\mdfivesum` in 2017. |
| 680 | |
| 681 | * The default for `stripnl` is now `false`, so that original code is |
| 682 | preserved exactly by default (#198). |
| 683 | |
| 684 | * Added support for `fontencoding` option from `fvextra` (#208). |
| 685 | |
| 686 | * Added note to FAQ about getting `texi2pdf` to work with `minted` given |
| 687 | `texi2pdf`'s assumptions about temp files (#186). |
| 688 | |
| 689 | * Reimplemented `bgcolor` option to be compatible with `color` package. |
| 690 | |
| 691 | |
| 692 | |
| 693 | ## v2.5 (2017/07/19) |
| 694 | |
| 695 | * The default placement for the `listing` float is now `tbp` instead of `h`, |
| 696 | to parallel `figure` and `table` and also avoid warnings caused by `h` |
| 697 | (#165). The documentation now contains information about changing default |
| 698 | placement. The `float` package is no longer loaded when the `newfloat` |
| 699 | package option is used. |
| 700 | |
| 701 | * Added support for `*nchars` options from `fvextra` v1.3 that allow setting |
| 702 | `breaklines`-related indentation in terms of a number of characters, rather |
| 703 | than as a fixed dimension. |
| 704 | |
| 705 | * Fixed incompatibility with `babel magyar` (#158). |
| 706 | |
| 707 | * Added support for `beamer` overlays with `beameroverlays` option (#155). |
| 708 | |
| 709 | * Comments in the Pygments LaTeX style files no longer appear as literal |
| 710 | text when `minted` is used in `.dtx` files (#161). |
| 711 | |
| 712 | * `autogobble` now works with package option `kpsewhich` (#151). Under |
| 713 | Windows, the `kpsewhich` option no longer requires PowerShell. |
| 714 | |
| 715 | * Fixed a bug that prevented `finalizecache` from working with `outputdir` |
| 716 | (#149). |
| 717 | |
| 718 | * Fixed a bug with `firstline` and `lastline` that prevented them from |
| 719 | working with the `minted` environment (#145). |
| 720 | |
| 721 | * Added note on `breqn` conflicts to FAQ (#163). |
| 722 | |
| 723 | |
| 724 | |
| 725 | ## v2.4.1 (2016/10/31) |
| 726 | |
| 727 | * Single quotation marks in `\jobname` are now replaced with underscores in |
| 728 | `\minted@jobname` to prevent quoting errors (#137). |
| 729 | |
| 730 | * The `autogobble` option now takes `firstline` and `lastline` into account |
| 731 | (#130). |
| 732 | |
| 733 | * Fixed `numberblanklines`, which had been lost in the transition to v2.0+ |
| 734 | (#135). |
| 735 | |
| 736 | |
| 737 | |
| 738 | ## v2.4 (2016/07/20) |
| 739 | |
| 740 | * Line breaking and all associated options are now completely delegated to |
| 741 | `fvextra`. |
| 742 | |
| 743 | * Fixed a bug from v2.2 that could cause the first command or environment to |
| 744 | vanish when `cache=false` (related to work on `\MintedPygmentize`). |
| 745 | |
| 746 | |
| 747 | |
| 748 | ## v2.3 (2016/07/14) |
| 749 | |
| 750 | * The `fvextra` package is now required. `fvextra` extends and patches |
| 751 | `fancyvrb`, and includes improved versions of `fancyvrb` extensions that |
| 752 | were formerly in `minted`. |
| 753 | |
| 754 | * As part of `fvextra`, the `upquote` package is always loaded. `fvextra` |
| 755 | brings the new option `curlyquotes`, which allows curly single quotation |
| 756 | marks instead of the literal backtick and typewriter single quotation mark |
| 757 | produced by `upquote`. This allows the default `upquote` behavior to be |
| 758 | disabled when desired. |
| 759 | |
| 760 | * Thanks to `fvextra`, the options `breakbefore`, `breakafter`, and |
| 761 | `breakanywhere` are now compatible with non-ASCII characters under |
| 762 | pdfTeX (#123). |
| 763 | |
| 764 | * Thanks to `fvextra`, `obeytabs` no longer causes lines in multi-line |
| 765 | comments or strings to vanish (#88), and is now compatible with |
| 766 | `breaklines` (#99). `obeytabs` will now always give correct results with |
| 767 | tabs used for indentation. However, tab stops are not guaranteed to be |
| 768 | correct for tabs in the midst of text. |
| 769 | |
| 770 | * `fvextra` brings the new options `space`, `spacecolor`, `tab`, and |
| 771 | `tabcolor` that allow these characters and their colors to be redefined |
| 772 | (#98). The tab may now be redefined to a flexible-width character such |
| 773 | as `\rightarrowfill`. The visible tab will now always be black by default, |
| 774 | instead of changing colors depending on whether it is part of indentation |
| 775 | for a multiline string or comment. |
| 776 | |
| 777 | * `fvextra` brings the new options `highlightcolor` and `highlightlines`, |
| 778 | which allow single lines or ranges of lines to be highlighted based on line |
| 779 | number (#124). |
| 780 | |
| 781 | * `fvextra` brings the new options `numberfirstline`, `stepnumberfromfirst`, |
| 782 | and `stepnumberoffsetvalues` that provide better control over line |
| 783 | numbering when `stepnumber` is not 1. |
| 784 | |
| 785 | * Fixed a bug from v2.2.2 that prevented `upquote` from working. |
| 786 | |
| 787 | |
| 788 | |
| 789 | ## v2.2.2 (2016/06/21) |
| 790 | |
| 791 | * Fixed a bug introduced in v2.2 that prevented setting the Pygments style in |
| 792 | the preamble. Style definitions are now more compatible with using |
| 793 | `\MintedPygmentize` to call a custom `pygmentize`. |
| 794 | |
| 795 | |
| 796 | |
| 797 | ## v2.2.1 (2016/06/15) |
| 798 | |
| 799 | * The `shellesc` package is loaded before `ifplatform` and other packages |
| 800 | that might invoke `\write18` (#112). |
| 801 | |
| 802 | * When caching is enabled, XeTeX uses the new `\mdfivesum` macro from TeX |
| 803 | Live 2016 to hash cache content, rather than using `\ShellEscape` with |
| 804 | Python to perform hashing. |
| 805 | |
| 806 | |
| 807 | |
| 808 | ## v2.2 (2016/06/08) |
| 809 | |
| 810 | * All uses of `\ShellEscape` (`\write18`) no longer wrap file names and paths |
| 811 | with double quotes. This allows a cache directory to be specified relative |
| 812 | to a user's home directory, for example, `~/minted_cache`. `cachedir` and |
| 813 | `outputdir` paths containing spaces will now require explicit quoting of |
| 814 | the parts of the paths that contain spaces, since `minted` no longer |
| 815 | supplies quoting. See the updated documentation for examples (#89). |
| 816 | |
| 817 | * Added `breakbefore`, `breakbeforegroup`, `breakbeforesymbolpre`, and |
| 818 | `breakbeforesymbolpost`. These parallel `breakafter*`. It is possible to |
| 819 | use `breakbefore` and `breakafter` for the same character, so long as |
| 820 | `breakbeforegroup` and `breakaftergroup` have the same setting (#117). |
| 821 | |
| 822 | * Added package options `finalizecache` and `frozencache`. These allow the |
| 823 | cache to be prepared for (`finalizecache`) and then used (`frozencache`) in |
| 824 | an environment in which `-shell-escape`, Python, and/or Pygments are not |
| 825 | available. Note that this only works if `minted` content does not need to |
| 826 | be modified, and if no settings that depend on Pygments or Python need to |
| 827 | be changed (#113). |
| 828 | |
| 829 | * Style names containing hyphens and underscores (`paraiso-light`, |
| 830 | `paraiso-dark`, `algol_nu`) now work (#111). |
| 831 | |
| 832 | * The `shellesc` package is now loaded, when available, for compatibility |
| 833 | with LuaTeX 0.87+ (TeX Live 2016+, etc.). `\ShellEscape` is now used |
| 834 | everywhere instead of `\immediate\write18`. If `shellesc` is not available, |
| 835 | then a `\ShellEscape` macro is created. When `shellesc` is loaded, there |
| 836 | is a check for versions before v0.01c to patch a bug in v0.01b (present in |
| 837 | TeX Live 2015) (#112). |
| 838 | |
| 839 | * The `bgcolor` option now uses the `snugshade*` environment from the `framed` |
| 840 | package, so `bgcolor` is now compatible with page breaks. When `bgcolor` |
| 841 | is in use, immediately preceding text will no longer push the `minted` |
| 842 | environment into the margin, and there is now adequate spacing from |
| 843 | surrounding text (#121). |
| 844 | |
| 845 | * Added missing support for `fancyvrb`'s `labelposition` (#102). |
| 846 | |
| 847 | * Improved fix for TikZ externalization, thanks to Patrick Vogt (#73). |
| 848 | |
| 849 | * Fixed `breakautoindent`; it was disabled in version 2.1 due to a bug in |
| 850 | `breakanywhere`. |
| 851 | |
| 852 | * Properly fixed handling of `\MintedPygmentize` (#62). |
| 853 | |
| 854 | * Added note on incompatibility of `breaklines` and `obeytabs` options. |
| 855 | Trying to use these together will now result in a package error (#99). |
| 856 | Added note on issues with `obeytabs` and multiline comments (#88). Due to |
| 857 | the various `obeytabs` issues, the docs now discourage using `obeytabs`. |
| 858 | |
| 859 | * Added note to FAQ on `fancybox` and `fancyvrb` conflict (#87). |
| 860 | |
| 861 | * Added note to docs on the need for `\VerbatimEnvironment` in environment |
| 862 | definitions based on `minted` environments. |
| 863 | |
| 864 | |
| 865 | |
| 866 | ## v2.1 (2015/09/09) |
| 867 | |
| 868 | * Changing the highlighting style now no longer involves re-highlighting |
| 869 | code. Style may be changed with almost no overhead. |
| 870 | |
| 871 | * Improved control of automatic line breaks. New option `breakanywhere` |
| 872 | allows line breaks anywhere when `breaklines=true`. The pre-break and |
| 873 | post-break symbols for these types of breaks may be set with |
| 874 | `breakanywheresymbolpre` and `breakanywheresymbolpost` (#79). New option |
| 875 | `breakafter` allows specifying characters after which line breaks are |
| 876 | allowed. Breaks between adjacent, identical characters may be controlled |
| 877 | with `breakaftergroup`. The pre-break and post-break symbols for these |
| 878 | types of breaks may be set with `breakaftersymbolpre` and |
| 879 | `breakaftersymbolpost`. |
| 880 | |
| 881 | * `breakbytoken` now only breaks lines between tokens that are separated by |
| 882 | spaces, matching the documentation. The new option `breakbytokenanywhere` |
| 883 | allows for breaking between tokens that are immediately adjacent. Fixed a |
| 884 | bug in `\mintinline` that produced a following linebreak when |
| 885 | `\mintinline` was the first thing in a paragraph and `breakbytoken` was |
| 886 | true (#77). |
| 887 | |
| 888 | * Fixed a bug in draft mode option handling for `\inputminted` (#75). |
| 889 | |
| 890 | * Fixed a bug with `\MintedPygmentize` when a custom `pygmentize` was |
| 891 | specified and there was no `pygmentize` on the default path (#62). |
| 892 | |
| 893 | * Added note to docs on caching large numbers of code blocks under OS X (#78). |
| 894 | |
| 895 | * Added discussion of current limitations of `texcomments` (#66) and |
| 896 | `escapeinside` (#70). |
| 897 | |
| 898 | * PGF/Ti*k*Z externalization is automatically detected and supported |
| 899 | (#73). |
| 900 | |
| 901 | * The package is now compatible with LaTeX files whose names contain spaces (#85). |
| 902 | |
| 903 | |
| 904 | |
| 905 | ## v2.0 (2015/01/31) |
| 906 | |
| 907 | * Added the compatibility package `minted1`, which provides the `minted` 1.7 |
| 908 | code. This may be loaded when 1.7 compatibility is required. This package |
| 909 | works with other packages that `\RequirePackage{minted}`, so long as it is |
| 910 | loaded first. |
| 911 | |
| 912 | * Moved all old `\changes` into `changelog`. |
| 913 | |
| 914 | |
| 915 | |
| 916 | ## Development releases for 2.0 (2014-January 2015) |
| 917 | |
| 918 | * Caching is now on by default. |
| 919 | |
| 920 | * Fixed a bug that prevented compiling under Windows when file names |
| 921 | contained commas. |
| 922 | |
| 923 | * Added `breaksymbolleft`, `breaksymbolsepleft`, |
| 924 | `breaksymbolindentleft`, `breaksymbolright`, `breaksymbolsepright`, |
| 925 | and `breaksymbolindentright` options. `breaksymbol`, |
| 926 | `breaksymbolsep`, and `breaksymbolindent` are now aliases for the |
| 927 | correspondent `*left` options. |
| 928 | |
| 929 | * Added `kpsewhich` package option. This uses `kpsewhich` to locate |
| 930 | the files that are to be highlighted. This provides compatibility |
| 931 | with build tools like `texi2pdf` that function by modifying |
| 932 | `TEXINPUTS` (#25). |
| 933 | |
| 934 | * Fixed a bug that prevented `\inputminted` from working with `outputdir`. |
| 935 | |
| 936 | * Added informative error messages when Pygments output is missing. |
| 937 | |
| 938 | * Added `final` package option (opposite of `draft`). |
| 939 | |
| 940 | * Renamed the default cache directory to `_minted-<jobname>` (replaced |
| 941 | leading period with underscore). The leading period caused the cache |
| 942 | directory to be hidden on many systems, which was a potential source |
| 943 | of confusion. |
| 944 | |
| 945 | * `breaklines` and `breakbytoken` now work with `\mintinline` (#31). |
| 946 | |
| 947 | * `bgcolor` may now be set through `\setminted` and `\setmintedinline`. |
| 948 | |
| 949 | * When math is enabled via `texcomments`, `mathescape`, or |
| 950 | `escapeinside`, space characters now behave as in normal math by |
| 951 | vanishing, instead of appearing as literal spaces. Math need no |
| 952 | longer be specially formatted to avoid undesired spaces. |
| 953 | |
| 954 | * In default value of `\listoflistingscaption`, capitalized “Listings” so that |
| 955 | capitalization is consistent with default values for other lists |
| 956 | (figures, tables, algorithms, etc.). |
| 957 | |
| 958 | * Added `newfloat` package option that creates the `listing` |
| 959 | environment using `newfloat` rather than `float`, thus providing |
| 960 | better compatibility with the `caption` package (#12). |
| 961 | |
| 962 | * Added support for Pygments option `stripall`. |
| 963 | |
| 964 | * Added `breakbytoken` option that prevents `breaklines` from breaking |
| 965 | lines within Pygments tokens. |
| 966 | |
| 967 | * `\mintinline` uses a `\colorbox` when `bgcolor` is set, to give more |
| 968 | reasonable behavior (#57). |
| 969 | |
| 970 | * For PHP, `\mintinline` automatically begins with `startinline=true` (#23). |
| 971 | |
| 972 | * Fixed a bug that threw off line numbering in `minted` when |
| 973 | `langlinenos=false` and `firstnumber=last`. Fixed a bug in `\mintinline` that |
| 974 | threw off subsequent line numbering when `langlinenos=false` and |
| 975 | `firstnumber=last`. |
| 976 | |
| 977 | * Improved behavior of `\mint` and `\mintinline` in `draft` mode. |
| 978 | |
| 979 | * The `\mint` command now has the additional capability to take code |
| 980 | delimited by paired curly braces `{}`. |
| 981 | |
| 982 | * It is now possible to set options only for `\mintinline` using the new |
| 983 | `\setmintedinline` command. Inline options override options specified via |
| 984 | `\setminted`. |
| 985 | |
| 986 | * Completely rewrote option handling. `fancyvrb` options are now handled on the |
| 987 | LaTeX side directly, rather than being passed to Pygments and then |
| 988 | returned. This makes caching more efficient, since code is no longer |
| 989 | rehighlighted just because options changed. |
| 990 | |
| 991 | * Fixed buffer size error caused by using `cache` with a very large |
| 992 | number of files (#61). |
| 993 | |
| 994 | * Fixed `autogobble` bug that caused failure under some operating |
| 995 | systems. |
| 996 | |
| 997 | * Added support for `escapeinside` (requires Pygments 2.0+; #38). |
| 998 | |
| 999 | * Fixed issues with XeTeX and caching (#40). |
| 1000 | |
| 1001 | * The `upquote` package now works correctly with single quotes when |
| 1002 | using Pygments 1.6+ (#34). |
| 1003 | |
| 1004 | * Fixed caching incompatibility with Linux and OS X under xelatex |
| 1005 | (#18 and #42). |
| 1006 | |
| 1007 | * Fixed `autogobble` incompatibility with Linux and OS X. |
| 1008 | |
| 1009 | * `\mintinline` and derived commands are now robust, via `\newrobustcmd` |
| 1010 | from `etoolbox`. |
| 1011 | |
| 1012 | * Unused styles are now cleaned up when caching. |
| 1013 | |
| 1014 | * Fixed a bug that could interfere with caching (#24). |
| 1015 | |
| 1016 | * Added `draft` package option (#39). This typesets all code using |
| 1017 | `fancyvrb`; Pygments is not used. This trades syntax highlighting |
| 1018 | for maximum speed in compiling. |
| 1019 | |
| 1020 | * Added automatic line breaking with `breaklines` and related options |
| 1021 | (#1). |
| 1022 | |
| 1023 | * Fixed a bug with boolean options that needed a False argument to |
| 1024 | cooperate with `\setminted` (#48). |
| 1025 | |
| 1026 | |
| 1027 | |
| 1028 | ## v2.0-alpha3 (2013/12/21) |
| 1029 | |
| 1030 | * Added `autogobble` option. This sends code through Python's |
| 1031 | `textwrap.dedent()` to remove common leading whitespace. |
| 1032 | |
| 1033 | * Added package option `cachedir`. This allows the directory in which |
| 1034 | cached content is saved to be specified. |
| 1035 | |
| 1036 | * Added package option `outputdir`. This allows an output directory for |
| 1037 | temporary files to be specified, so that the package can work with |
| 1038 | LaTeX's `-output-directory` command-line option. |
| 1039 | |
| 1040 | * The `kvoptions` package is now required. It is needed to process |
| 1041 | key-value package options, such as the new `cachedir` option. |
| 1042 | |
| 1043 | * Many small improvements, including better handling of paths under |
| 1044 | Windows and improved key system. |
| 1045 | |
| 1046 | |
| 1047 | |
| 1048 | ## v2.0-alpha2 (2013/08/21) |
| 1049 | |
| 1050 | * `\DeleteFile` now only deletes files if they do indeed exist. This |
| 1051 | eliminates warning messages due to missing files. |
| 1052 | |
| 1053 | * Fixed a bug in the definition of `\DeleteFile` for non-Windows systems. |
| 1054 | |
| 1055 | * Added support for Pygments option `stripnl`. |
| 1056 | |
| 1057 | * Settings macros that were previously defined globally are now defined |
| 1058 | locally, so that `\setminted` may be confined by `\begingroup...\endgroup` |
| 1059 | as expected. |
| 1060 | |
| 1061 | * Macro definitions for a given style are now loaded only once per document, |
| 1062 | rather than once per command/environment. This works even without caching. |
| 1063 | |
| 1064 | * A custom script/executable may now be substituted for `pygmentize` by |
| 1065 | redefining `\MintedPygmentize`. |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | ## v2.0alpha (2013/07/30) |
| 1070 | |
| 1071 | * Added the package option `cache`. This significantly increases |
| 1072 | compilation speed by caching old output. For example, compiling the |
| 1073 | documentation is around 5x faster. |
| 1074 | |
| 1075 | * New inline command `\mintinline`. Custom versions can be created via |
| 1076 | `\newmintinline`. The command works inside other commands (for example, |
| 1077 | footnotes) in most situations, so long as the percent and hash |
| 1078 | characters are avoided. |
| 1079 | |
| 1080 | * The new `\setminted` command allows options to be specified at the |
| 1081 | document and language levels. |
| 1082 | |
| 1083 | * All extended characters (Unicode, etc.) supported by `inputenc` now |
| 1084 | work under the pdfTeX engine. This involved using `\detokenize` on |
| 1085 | everything prior to saving. |
| 1086 | |
| 1087 | * New package option `langlinenos` allows line numbering to pick up |
| 1088 | where it left off for a given language when `firstnumber=last`. |
| 1089 | |
| 1090 | * New options, including `style`, `encoding`, `outencoding`, |
| 1091 | `codetagify`, `keywordcase`, `texcomments` (same as `texcl`), |
| 1092 | `python3` (for the `PythonConsoleLexer`), and `numbers`. |
| 1093 | |
| 1094 | * `\usemintedstyle` now takes an optional argument to specify the style for a |
| 1095 | particular language, and works anywhere in the document. |
| 1096 | |
| 1097 | * `xcolor` is only loaded if `color` isn’t, preventing potential |
| 1098 | package clashes. |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | ## v1.7 (2011/09/17) |
| 1103 | |
| 1104 | * Options for float placement added [2011/09/12] |
| 1105 | |
| 1106 | * Fixed `tabsize` option [2011/08/30] |
| 1107 | |
| 1108 | * More robust detection of the `-shell-escape` option [2011/01/21] |
| 1109 | |
| 1110 | * Added the `label` option [2011/01/04] |
| 1111 | |
| 1112 | * Installation instructions added [2010/03/16] |
| 1113 | |
| 1114 | * Minimal working example added [2010/03/16] |
| 1115 | |
| 1116 | * Added PHP-specific options [2010/03/14] |
| 1117 | |
| 1118 | * Removed unportable flag from Unix shell command [2010/02/16] |
| 1119 | |
| 1120 | |
| 1121 | ## v1.6 (2010/01/31) |
| 1122 | |
| 1123 | * Added font-related options [2010/01/27] |
| 1124 | |
| 1125 | * Windows support added [2010/01/27] |
| 1126 | |
| 1127 | * Added command shortcuts [2010/01/22] |
| 1128 | |
| 1129 | * Simpler versioning scheme [2010/01/22] |
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | ## v0.1.5 (2010/01/13) |
| 1134 | |
| 1135 | * Added `fillcolor` option [2010/01/10] |
| 1136 | |
| 1137 | * Added float support [2010/01/10] |
| 1138 | |
| 1139 | * Fixed `firstnumber` option [2010/01/10] |
| 1140 | |
| 1141 | * Removed `caption` option [2010/01/10] |
| 1142 | |
| 1143 | |
| 1144 | |
| 1145 | ## v0.0.4 (2010/01/08) |
| 1146 | |
| 1147 | * Initial version [2010/01/08] |