summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-09-17 19:56:14 +0000
committerKarl Berry <karl@freefriends.org>2024-09-17 19:56:14 +0000
commit24c86d8f923f6049b8f2df20a2d2756c3a34913e (patch)
treee696f25e95ac053a7f217117665edbeb6dcb7c57 /Master/texmf-dist/tex/lualatex
parent72624704e11fac8652023cea69e4da2cced056de (diff)
plantuml (17sep24)
git-svn-id: svn://tug.org/texlive/trunk@72315 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua9
-rw-r--r--Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty8
2 files changed, 11 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua b/Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua
index 7edb923d6b1..8bb14c8abbd 100644
--- a/Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua
+++ b/Master/texmf-dist/tex/lualatex/plantuml/plantuml.lua
@@ -7,9 +7,6 @@ function convertPlantUmlToTikz(jobname, mode)
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 @@ function convertPlantUmlToTikz(jobname, mode)
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)
diff --git a/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty b/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty
index bb978dfa9c6..91c15789e43 100644
--- a/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty
+++ b/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty
@@ -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
-