Debian Codegraph @

texmf-dist/doc/latex/pygmentex/CHANGELOG.md

raw
1 # Changelog
2
3 All notable changes to this project will be documented in this file.
4
5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 and this project adheres to Semantic Versioning.
7
8 ## [0.12.1] - 2026-03-19
9
10 ### Fixed
11 - **List Margin Regression (LaTeX)**: Fixed a bug introduced in v0.12 where `pygmented` environments placed inside lists (e.g., `itemize`, `enumerate`, `quotation`) ignored the parent margins and snapped flush to the left page margin. Snippets are now wrapped in a zero-padding `\list` to perfectly inherit `\@totalleftmargin` and `\linewidth` without adding unwanted vertical spacing.
12 - **Complex Option Parsing (Python)**: Rewrote the `parse_opts` function in `pygmentex.py` to be aware of curly brace nesting (`{...}`). This prevents Pygments from incorrectly splitting complex, comma-separated LaTeX arguments (such as `tcolorbox` TikZ overlays) and crashing the compiler.
13
14 ### Changed
15 - **Documentation**: Corrected the link to the compiled manual in `README.md` to point to the new `manual/` subdirectory.
16
17 ---
18
19 ## [0.12] - 2026-03-18
20
21 ### Added
22 - **`autogobble` option**: Introduced a feature that automatically calculates and strips common leading whitespace from code snippets, allowing `pygmented` environments to be indented natively in the LaTeX source.
23 - **Output Directory Support**: The package now actively takes into account the `$TEXMF_OUTPUT_DIRECTORY` environment variable when calling `pygmentex`.
24
25 ### Fixed
26 - **Environment Parsing**: Rewrote the internal `pygmented` environment parser to safely preserve active newlines (`^^M`). This resolves the "Extraneous input" error that occurred when a snippet started immediately on the next line.
27 - **Macro Par-breaks**: The environment option parser is now defined as `\long\def`, safely allowing `\par` commands within complex styling options.
28 - **`\tcbox` Crash**: Injected `parbox=true` locally into inline snippets to shield them from global `\tcbset{parbox=false}` preferences, preventing a critical `\thetcolorboxnumber` collision.
29 - **Python Option Parsing**: The `pygmentex.py` script now aggressively strips whitespace from parsed keys and values, preventing trailing LaTeX spaces (e.g., `[lang=c ]`) from crashing Pygments.
30 - **Missing Import**: Added the missing `ClassNotFound` import to `pygmentex.py`, allowing the script to gracefully report invalid language names rather than throwing a traceback.
31
32 ### Changed
33 - **Python CLI Refactor**: Migrated command-line argument parsing in `pygmentex.py` from the older `getopt` module to the modern `argparse` library.
34 - **LaTeX3 Modernization**: Replaced the custom recursive `\widest` dimension-calculating macro with a modern, scoped `expl3` implementation (`\clist_map_inline:nn`).
35 - **Documentation**: Renamed `README` to `README.md` and comprehensively expanded it. Renamed demo files to explicitly reflect their role as the package manual.
36
37 ---
38
39 ## [0.11] - 2022-08-16
40
41 ### Added
42 - **Automatic Shell Execution**: Added support for `--shell-escape`. When enabled, `pdflatex` will automatically run the `pygmentex` Python script at the end of the compilation, removing the need for a manual intermediate step.
43 - **`.gitignore`**: Added PygmenTeX-specific suffixes (`*.pygmented`, `*.snippets`, `*.tmp`) to the repository ignore list.
44
45 ### Changed
46 - **Command Renaming**: Changed the `\includepygmented` command to `\inputpygmented` for better alignment with standard LaTeX naming conventions.
47 - **Documentation Overhaul**: Extensive documentation tweaks contributed by Barry Rountree. Added a "Requirements" section, a "Debugging" section (with notes about file paths), broke out options into logical subsections, and clarified compilation steps.
48
49 ---
50
51 ## [0.10] - 2020-12-21
52
53 ### Changed
54 - Minor internal updates and rename of demonstration files to `pygmentex_demo.pdf`.
55
56 ---
57
58 ## [0.9] - 2020-02-05
59
60 ### Added
61 - Added a new, simplified example document to ease onboarding for new users.
62
63 ### Changed
64 - **Python 3 Migration**: Fully migrated the external `pygmentex.py` script from Python 2 to Python 3.
65
66 ### Fixed
67 - Updated package dependency name from `fvrb-ex` to the modern `fancyvrb-ex`.
68
69 ---
70
71 ## [0.8] - 2014-08-12
72
73 ### Added
74 - **License**: Officially added LaTeX Project Public License (LPPL) information.
75 - Incorporated backported formatting code from the Pygments development branch.
76
77 ### Changed
78 - **Option Renaming**: Renamed the `texcl` option to `texcomments`, and `style` to `sty`.
79 - Removed the dependency/reference to the `boites` package.
80 - Reworked the enclosing environment mechanism to factor out common code between inline and displayed snippets.
81
82 ### Fixed
83 - Resolved verbatim output errors regarding Unicode characters.
84 - Fixed escaping for specific characters (single quotes, double quotes, and hyphens).
85 - Fixed option parsing logic, particularly for `tabsize`, `fvset`, and line numbering.
86 - Fixed an issue where some languages were unavailable when using less recent versions of the Pygments library.
87
88 ---
89
90 ## [Pre-0.8] - 2012 to 2014
91 *(Initial development and release iterations. See git history for detailed atomic changes regarding the original creation of `pygmentex.sty` and `pygmentex.py`.)*