You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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
Added architecture decision record 0001 explaining why pdfLaTeX is driven via shell escape rather than via hvextern, pythontex, or bashful. #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
Added support for rendering png and svg diagrams through a 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
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
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
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
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
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
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
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
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
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
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, #50, #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
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
Removed
Removed the unused, never-wired-up pythontex dependency from the non-LuaTeX code path. #1