texlive[72315] Master/texmf-dist: plantuml (17sep24)

commits+karl at tug.org commits+karl at tug.org
Tue Sep 17 21:56:14 CEST 2024


Revision: 72315
          https://tug.org/svn/texlive?view=revision&revision=72315
Author:   karl
Date:     2024-09-17 21:56:14 +0200 (Tue, 17 Sep 2024)
Log Message:
-----------
plantuml (17sep24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md
    trunk/Master/texmf-dist/doc/lualatex/plantuml/README.md
    trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--svg.tex
    trunk/Master/texmf-dist/doc/lualatex/plantuml/example-component-diagram.tex
    trunk/Master/texmf-dist/doc/lualatex/plantuml/plantuml.pdf
    trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua
    trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/lualatex/plantuml/example-multiple-diagrams-svg.tex

Modified: trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md	2024-09-17 19:56:02 UTC (rev 72314)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md	2024-09-17 19:56:14 UTC (rev 72315)
@@ -5,6 +5,14 @@
 The format is based on [Keep a Changelog](http://keepachangelog.com/)
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
+## [0.4.0] – 2024-09-17
+
+### Fixed
+
+- Updated command-line parameters for inkscape. [#33](https://github.com/koppor/plantuml/pull/33)
+- Updated command-line parameters for plantuml. [#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
@@ -11,7 +19,7 @@
 
 - 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.
+  older versions of PlantUML. [#29](https://github.com/koppor/plantuml/pull/29)
 
 ## [0.3.1] – 2020-05-19
 
@@ -66,7 +74,7 @@
 
 Initial public release
 
-[unreleased]: https://github.com/koppor/plantuml/compare/0.3.2...HEAD
+[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

Modified: trunk/Master/texmf-dist/doc/lualatex/plantuml/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/README.md	2024-09-17 19:56:02 UTC (rev 72314)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/README.md	2024-09-17 19:56:14 UTC (rev 72315)
@@ -14,7 +14,7 @@
 
 1. Environment variable `PLANTUML_JAR` set to the location of `plantuml.jar`.
    You get it from <https://sourceforge.net/projects/plantuml/files/plantuml.jar/download>.
-2. Enviroment variable `GRAPHVIZ_DOT` set to the location of `dot.exe`.
+2. Windows: Environment variable `GRAPHVIZ_DOT` set to the location of `dot.exe`.
    Example: `C:\Program Files (x86)\Graphviz2.38\bin\dot.exe`.
    You can install graphviz using `choco install graphviz`.
 3. lualatex available with command line parameter `-shell-escape` included.
@@ -55,6 +55,29 @@
 \usepackage{graphics}
 \usepackage{epstopdf}
 \epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{
+  inkscape #1 --export-filename=\OutputFile
+}
+\usepackage[output=svg]{plantuml}
+\begin{document}
+\begin{plantuml}
+ at startuml
+class Car
+
+Driver - Car : drives >
+Car *- Wheel : have 4 >
+Car -- Person : < owns
+ at enduml
+\end{plantuml}
+\end{document}
+```
+
+**For older Inkscape use this LaTeX source:**
+
+```latex
+\documentclass{scrartcl}
+\usepackage{graphics}
+\usepackage{epstopdf}
+\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{
   inkscape -z --file=#1 --export-pdf=\OutputFile
 }
 \usepackage[output=svg]{plantuml}

Modified: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--svg.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--svg.tex	2024-09-17 19:56:02 UTC (rev 72314)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--svg.tex	2024-09-17 19:56:14 UTC (rev 72315)
@@ -8,7 +8,7 @@
 % We just include the SVG as is.
 \usepackage{epstopdf}
 \epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{%
-  inkscape -z --file=#1 --export-pdf=\OutputFile
+  inkscape #1 --export-filename=\OutputFile
 }
 
 \usepackage[output=svg]{plantuml}

Modified: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-component-diagram.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/example-component-diagram.tex	2024-09-17 19:56:02 UTC (rev 72314)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/example-component-diagram.tex	2024-09-17 19:56:14 UTC (rev 72315)
@@ -1,6 +1,6 @@
 \documentclass{scrartcl}
+
 \usepackage{graphics}
-
 % Enables inclusion of SVG graphics - 1:1 approach
 % This is NOT the approach of https://ctan.org/pkg/svg-inkscape
 % which allows text in SVG to be typeset using LaTeX.
@@ -7,7 +7,7 @@
 % We just include the SVG as is.
 \usepackage{epstopdf}
 \epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{%
-  inkscape -z --file=#1 --export-pdf=\OutputFile
+  inkscape #1 --export-filename=\OutputFile
 }
 
 \usepackage[output=svg]{plantuml}

Added: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-multiple-diagrams-svg.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/example-multiple-diagrams-svg.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/example-multiple-diagrams-svg.tex	2024-09-17 19:56:14 UTC (rev 72315)
@@ -0,0 +1,42 @@
+\documentclass{scrartcl}
+
+\usepackage{graphics}
+
+\usepackage{epstopdf}
+\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{%
+  inkscape #1 --export-filename=\OutputFile
+}
+
+\usepackage[output=svg]{plantuml}
+
+\begin{document}
+
+	\begin{plantuml}
+		@startuml
+		() "Interface 2" as I2
+		() "Interface 3" as I3
+
+		[component 1] as c1
+		[component 2] as c2
+		[component 3] as c3
+
+		c1 -- I2
+		c1 -- I3
+
+		I2 )-- c2
+		I3 )-- c3
+		@enduml
+	\end{plantuml}
+
+\newpage
+
+	\begin{plantuml}
+		@startuml
+		class Car
+
+		Driver - Car : drives >
+		Car *- Wheel : have 4 >
+		Car -- Person : < owns
+		@enduml
+	\end{plantuml}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-multiple-diagrams-svg.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/lualatex/plantuml/plantuml.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua	2024-09-17 19:56:02 UTC (rev 72314)
+++ trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua	2024-09-17 19:56:14 UTC (rev 72315)
@@ -7,9 +7,6 @@
   local plantUmlSourceFilename = jobname .. "-plantuml.txt"
   local plantUmlTargetFilename = jobname .. "-plantuml." .. mode
 
-  -- delete generated file to ensure they are really recreated
-  os.remove(plantUmlTargetFilename)
-
   if not (lfs.attributes(plantUmlSourceFilename)) then
     texio.write_nl("Source " .. plantUmlSourceFilename .. " does not exist.")
     return
@@ -25,9 +22,15 @@
   local cmd = "java -Djava.awt.headless=true -jar " .. plantUmlJar .. " -charset UTF-8 -t"
   if (mode == "latex") then
     cmd = cmd .. "latex:nopreamble"
+    -- plantuml has changed output format in https://github.com/plantuml/plantuml/pull/1237
+    plantUmlTargetFilename = jobname .. "-plantuml.tex"
   else
     cmd = cmd .. mode
   end
+
+  -- delete generated file to ensure they are really recreated
+  os.remove(plantUmlTargetFilename)
+
   cmd = cmd .. " " .. plantUmlSourceFilename
   texio.write_nl(cmd)
   local handle,error = io.popen(cmd)

Modified: trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty	2024-09-17 19:56:02 UTC (rev 72314)
+++ trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty	2024-09-17 19:56:14 UTC (rev 72315)
@@ -3,7 +3,7 @@
 %% SPDX-License-Identifier: LPPL-1.3c+
 \NeedsTeXFormat{LaTeX2e}\relax
 \ProvidesPackage{plantuml}
-  [2023/05/12 v0.3.2
+  [2024/09/17 v0.4.0
   Embed PlantUML diagrams in latex documents.]
 
 % Required by PlantUML LaTeX output
@@ -24,9 +24,11 @@
 
 \RequirePackage{adjustbox}
 
+\newcounter{PlantUmlFigureNumberSVG}
+\def\UMLcountUp{\stepcounter{PlantUmlFigureNumberSVG} \def\PlantUMLJobname{PlantUML\thePlantUmlFigureNumberSVG}}
 % \jobname has an encoding issue if the .tex filename includes a multibyte string.
 % One needs to redefine PlantUMLJobname to fix it
-\def\PlantUMLJobname{\jobname}
+\def\PlantUMLJobname{\jobname\thePlantUmlFigureNumberSVG}
 
 \ExplSyntaxOn
 \keys_define:nn { plantuml } {
@@ -93,6 +95,7 @@
       \end{adjustbox}
     }{
       \includegraphics[width=\maxwidth{\textwidth}]{\PlantUMLJobname-plantuml.\PlantUmlMode}
+	  \UMLcountUp
     }
   }
 \or
@@ -102,4 +105,3 @@
   }{}
 \fi
 \makeatother
-



More information about the tex-live-commits mailing list.