# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.7.0] - 2026-06-29

### Added

- Added support for `pdflatex`. PlantUML is now driven directly via shell escape, mirroring the LuaLaTeX path (same `plantuml.jar` invocation and MD5-based source caching). [#1](https://github.com/koppor/plantuml/issues/1)
- Added [architecture decision record 0001](docs/decisions/0001-support-pdflatex-via-shell-escape.md) explaining why pdfLaTeX is driven via shell escape rather than via `hvextern`, `pythontex`, or `bashful`. [#1](https://github.com/koppor/plantuml/issues/1)
- Added `example-class-visibility--latex.tex`, `example-class-visibility--png.tex`, and `example-class-visibility--svg.tex` demonstrating class member visibility, including the protected marker `#`, which is written as-is (the diagram body is verbatim, so no LaTeX escaping). [#24](https://github.com/koppor/plantuml/issues/24)
- Added support for rendering `png` and `svg` diagrams through a [PlantUML server](https://github.com/plantuml/plantuml-server) over HTTP, configured via the `server` package option or the `PLANTUML_SERVER` environment variable. This needs only `curl`, not a local `plantuml.jar`/Java, which is convenient on CI. The source is sent hex-encoded (the `~h` server marker). `latex`/TikZ output cannot be produced by a server and continues to use the local jar. Includes `example-server--png.tex` and `example-server--svg.tex`. [#6](https://github.com/koppor/plantuml/issues/6)
- Documented and tested that `@startuml`/`@enduml` are optional: when the diagram body omits them, PlantUML adds them automatically, so the `plantuml` environment may contain just the diagram. All examples now omit the markers. [#4](https://github.com/koppor/plantuml/issues/4)
- Added `\plantumlinput{<file>}` to render a diagram from an external PlantUML source file (like minted's `\inputminted` and listings' `\lstinputlisting`). It honors the `output` mode and reuses the same caching, server, and `-output-directory` handling as the `plantuml` environment, on both LuaLaTeX and pdfLaTeX. Includes `example-input-file.tex`. [#3](https://github.com/koppor/plantuml/issues/3)
- Added a global PlantUML preamble (e.g. `skinparam` styling) applied to every diagram, set inline via the `plantumlpreamble` environment or from a file via `\plantumlpreamblefile{<file>}`. The local jar applies it through PlantUML's `-config`; the server prepends it to the source. The preamble is folded into the diagram cache key, so changing it regenerates the diagrams. Includes `example-preamble.tex`. [#5](https://github.com/koppor/plantuml/issues/5)
- Documented and tested that diagrams work in `beamer`: a frame containing a `plantuml` environment just needs to be declared `[fragile]` (the environment is verbatim). Added `example-beamer.tex` using the `moloch` theme. [#11](https://github.com/koppor/plantuml/issues/11)
- Added `caption`, `label`, and `float` options for diagrams: a numbered, `\ref`-able caption that is typeset in place by default (like listings' `caption=`, avoiding the erratic placement of a bare `figure`) or in a floating `figure` with `float`. `\plantumlinput` takes them as an optional argument; for the `plantuml` environment they are set with `\plantumlset{...}` (a verbatim environment cannot carry an optional argument). Includes `example-caption.tex`. [#8](https://github.com/koppor/plantuml/issues/8)

### Changed

- Diagram text in `latex`/TikZ output is now rendered sans-serif by default (via the new `\PlantUmlTikzFont`, overridable with `\renewcommand`), matching the font PlantUML uses to size the boxes so the text fits with even margins instead of overflowing or sitting off-centre under the document's serif font. Includes `example-mindmap.tex`. [#14](https://github.com/koppor/plantuml/issues/14)
- Generated diagrams are now cached by a content hash (minted/memoize style): each diagram is written to `plantuml-<md5>-converted-to.<ext>` and PlantUML (or the server) is invoked only when no file for that hash exists yet. Identical, repeated, or reordered diagrams reuse the cached output, so recompiles are fast and only edited diagrams are regenerated. The `-converted-to` suffix keeps the files covered by the standard TeX `.gitignore` (`*-converted-to.*`), so no extra ignore entry is needed. [#2](https://github.com/koppor/plantuml/issues/2)
- A diagram that cannot be generated (for example when `PLANTUML_JAR` is not set, no server is configured, or PlantUML fails) no longer aborts the LaTeX run. A visible placeholder is typeset in the document instead, similar to a missing reference. [#16](https://github.com/koppor/plantuml/issues/16)
- The README preview images are now sharp vector SVG instead of raster PNG, and the README's `example-minimal.tex` / `example-class-relations--svg.tex` use the `cerulean-outline` PlantUML theme for a cleaner look than the colourful default. `release.sh` installs `librsvg2-bin` so pandoc can embed the SVGs when building `plantuml.pdf`.

### Fixed

- Fixed `Unable to access jarfile` when `PLANTUML_JAR` contains spaces (e.g. `C:\Program Files (x86)\PlantUML\plantuml.jar`) on the LuaLaTeX path, by quoting the jar path in the PlantUML invocation. The pdfLaTeX path already quoted it. [#7](https://github.com/koppor/plantuml/issues/7)
- Fixed `lualatex` failing with `I can't write on file '…-plantuml.txt'` under the paranoid `openout_any=p` setting (the default of local TeX Live and MiKTeX installations). The generated source file is now written with a relative path whenever possible, falling back to the absolute working directory only when the write is redirected (e.g. by Overleaf's output directory), so the Overleaf fix keeps working. [#47](https://github.com/koppor/plantuml/issues/47), [#50](https://github.com/koppor/plantuml/issues/50), [#42](https://github.com/koppor/plantuml/pull/42)
- Fixed PlantUML diagrams not being found when LaTeX is run with `-output-directory`. The generated source is now read from, and the diagram written to, that directory (located via `TEXMF_OUTPUT_DIRECTORY`). The variable is additionally cleared for the PlantUML subprocess, which otherwise hangs when it holds a relative path. Works for both `lualatex` and `pdflatex`. [#27](https://github.com/koppor/plantuml/issues/27)
- Fixed garbled text in the SVG examples by exporting text as paths (`--export-text-to-path`) in the Inkscape conversion rule, making the rendering independent of the fonts available to Inkscape. [#25](https://github.com/koppor/plantuml/issues/25)

### Removed

- Removed the unused, never-wired-up `pythontex` dependency from the non-LuaTeX code path. [#1](https://github.com/koppor/plantuml/issues/1)

## [0.6.0] - 2025-05-13

### Fixed

- Fixed infinite loop when using `latexmk` with SVG output, by executing PlantUML only if the code is changed. [#49](https://github.com/koppor/plantuml/pull/49)
- Fixed Incorrect file name when file name is specified after `@startuml`. [#49](https://github.com/koppor/plantuml/pull/49#issuecomment-2867843869)

## [0.5.1] - 2025-05-09

### Fixed

- Filenames with white spaces are now properly handled. [#31](https://github.com/koppor/plantuml/issues/31)

## [0.5.0] - 2025-01-08

### Fixed

- Fixed overleaf compilation. [#34](https://github.com/koppor/plantuml/issues/34)

## [0.4.0] - 2024-09-17

### Fixed

- Updated command-line parameters for PlantUML to fit PlantUML v1.2023.0 changes. [#36](https://github.com/koppor/plantuml/issues/36)
- Updated command-line parameters for Inkscape. [#33](https://github.com/koppor/plantuml/pull/33)
- Works if multiple diagrams are present. [#15](https://github.com/koppor/plantuml/issues/15), [#17](https://github.com/koppor/plantuml/issues/17)

## [0.3.2] - 2023-05-12

### Changed

- Updated file extension for including diagrams to `.tex` to align with changes
  introduced in PlantUML v1.2023.0. This change is not backwards compatible with
  older versions of PlantUML. [#29](https://github.com/koppor/plantuml/pull/29)

## [0.3.1] - 2020-05-19

### Fixed

- Added `-Djava.awt.headless=true` parameter to the call of `plantuml.jar` so it runs silently without interference
 the current focus

## [0.3.0] - 2019-09-23

### Added

- Added support for UTF-8 filenames.
- Added `example-component-diagram.tex`. Refs [#9](https://github.com/koppor/plantuml/issues/9).

## [0.2.3] - 2018-06-04

### Added

- Add `release.sh` to CTAN upload

### Removed

- Removed `\usepackage{aeguill}` as (1) PlantUML seems not to rely on it any more and (2) [it is obsolete and should not be used anymore](https://tex.stackexchange.com/a/5901/9075).

## [0.2.2] - 2018-03-22

### Changed

- Added version number in generated `plantuml.pdf`.
- Do not strip down `README.md` for CTAN anymore and provide "*.png" for generation of `plantuml.pdf`.

## [0.2.1] - 2018-03-21

### Fixed

- Added short version of `README.md` to CTAN distribution again, because of [CTAN rules](https://mirror.informatik.hs-fulda.de/tex-archive/help/ctan/CTAN-upload-addendum.html#readme).

## [0.2.0] - 2018-03-20

### Changed

- `README.md` is not distributed to CTAN anymore, because `plantuml.pdf` is distributed to follow latex software conventions to name the manual according to the name of the package.
  `plantuml.pdf` generated out of `README.md`.
- Removed call to `pdfcrop` is not necessary anymore, because inkscape is called without `-D` for svg convertion.

### Added

- `release.sh` for creating a release.

## [0.1.0] - 2018-03-08

### Added

- Initial public release

[Unreleased]: https://github.com/koppor/plantuml/compare/0.7.0...HEAD
[0.7.0]: https://github.com/koppor/plantuml/compare/0.6.0...0.7.0
[0.6.0]: https://github.com/koppor/plantuml/compare/0.5.1...0.6.0
[0.5.1]: https://github.com/koppor/plantuml/compare/0.5.0...0.5.1
[0.5.0]: https://github.com/koppor/plantuml/compare/0.4.0...0.5.0
[0.4.0]: https://github.com/koppor/plantuml/compare/0.3.2...0.4.0
[0.3.2]: https://github.com/koppor/plantuml/compare/0.3.1...0.3.2
[0.3.1]: https://github.com/koppor/plantuml/compare/0.3.0...0.3.1
[0.3.0]: https://github.com/koppor/plantuml/compare/0.2.3...0.3.0
[0.2.3]: https://github.com/koppor/plantuml/compare/0.2.2...0.2.3
[0.2.2]: https://github.com/koppor/plantuml/compare/0.2.1...0.2.2
[0.2.1]: https://github.com/koppor/plantuml/compare/0.2.0...0.2.1
[0.2.0]: https://github.com/koppor/plantuml/compare/0.1.0...0.2.0
[0.1.0]: https://github.com/koppor/plantuml/releases/tag/0.1.0

<!-- markdownlint-disable-file MD024 -->
