texlive[47076] Master/texmf-dist: plantuml (22mar18)

commits+karl at tug.org commits+karl at tug.org
Thu Mar 22 22:43:32 CET 2018


Revision: 47076
          http://tug.org/svn/texlive?view=revision&revision=47076
Author:   karl
Date:     2018-03-22 22:43:32 +0100 (Thu, 22 Mar 2018)
Log Message:
-----------
plantuml (22mar18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/plantuml/README.md
    trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md
    trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--latex.tex
    trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--svg.tex
    trunk/Master/texmf-dist/doc/lualatex/plantuml/plantuml.pdf

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations.png
    trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations.tex
    trunk/Master/texmf-dist/doc/lualatex/plantuml/example-minimal.png

Added: trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md	2018-03-22 21:43:32 UTC (rev 47076)
@@ -0,0 +1,31 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/)
+and this project adheres to [Semantic Versioning](http://semver.org/).
+
+## [0.2.1] - 2017-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] - 2017-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
+
+Initial public release
+
+[Unreleased]: https://github.com/latextemplates/plantuml/compare/0.2.1...HEAD
+[0.2.1]: https://github.com/latextemplates/plantuml/compare/0.2.0...0.2.1
+[0.2.0]: https://github.com/latextemplates/plantuml/compare/0.1.0...0.2.0


Property changes on: trunk/Master/texmf-dist/doc/lualatex/plantuml/CHANGELOG.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/lualatex/plantuml/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/README.md	2018-03-22 16:17:51 UTC (rev 47075)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/README.md	2018-03-22 21:43:32 UTC (rev 47076)
@@ -7,88 +7,3 @@
 
 Currently, this project runs with [lualatex](http://www.luatex.org/) only.
 Check [issue #1](https://github.com/latextemplates/plantuml/issues/1) for the current state of affairs for support pdflatex.
-
-## Preconditions
-
-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`.
-   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.
-4. In case you want to have the images as PDFs (and not using TikZ or PNG), ensure that `inkscape.exe` and `pdfcrop` are in your path.
-   You can get inkscape using `choco install inkscape`.
-   `pdfcrop` should be part of your latex distribution.
-
-## Examples
-
-### Minimal Example
-
-**LaTeX source:**
-
-```latex
-\documentclass{scrartcl}
-\usepackage{plantuml}
-\begin{document}
-\begin{plantuml}
-  @startuml
-  Alice -> Bob: test
-  @enduml
-\end{plantuml}
-\end{document}
-```
-
-**Compilation:** `lualatex -shell-escape example-minimal`
-
-**Result:**
-
-![example minimal](example-minimal.png)
-
-### Example Class Relations Rendered using SVG
-
-**LaTeX source:**
-
-```latex
-\documentclass{scrartcl}
-\usepackage{graphics}
-\usepackage{epstopdf}
-\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{%
-  inkscape -z -D --file=#1 --export-pdf=\jobname-plantuml-svg.pdf &&
-  pdfcrop \jobname-plantuml-svg.pdf \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}
-```
-
-**Compilation:** `lualatex -shell-escape example-class-relations`
-
-**Result:**
-
-![example minimal](example-class-relations.png)
-
-## Installation
-
-Your latex distribution should take care.
-
-For manual installation, copy `plantuml.*` to your local texmf folder in the subdirectoy `tex/latex/plantuml`.
-See [the discussion at tex.sx](https://tex.stackexchange.com/q/27982/9075) for the concrete location of the folder on your system.
-
-## Development
-
-### Releasing
-
-- `ctanify --notds plantuml.sty plantuml.lua README.md "*.png" "example-*.tex"`
-
-## License
-
-`SPDX-License-Identifier: LPPL-1.3c+`

Added: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--latex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--latex.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--latex.tex	2018-03-22 21:43:32 UTC (rev 47076)
@@ -0,0 +1,19 @@
+\documentclass{scrartcl}
+
+\usepackage{graphics}
+
+\usepackage[output=latex]{plantuml}
+% Have sans serif font at each tikz diagram. Source: https://tex.stackexchange.com/a/4888/9075
+\tikzstyle{every picture}+=[font=\sffamily]
+
+\begin{document}
+\begin{plantuml}
+ at startuml
+class Car
+
+Driver - Car : drives >
+Car *- Wheel : have 4 >
+Car -- Person : < owns
+ at enduml
+\end{plantuml}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--latex.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--svg.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--svg.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations--svg.tex	2018-03-22 21:43:32 UTC (rev 47076)
@@ -0,0 +1,26 @@
+\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.
+% We just include the SVG as is.
+\usepackage{epstopdf}
+\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{%
+  inkscape -z --file=#1 --export-pdf=\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}


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

Deleted: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations.tex	2018-03-22 16:17:51 UTC (rev 47075)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/example-class-relations.tex	2018-03-22 21:43:32 UTC (rev 47076)
@@ -1,29 +0,0 @@
-\documentclass{scrartcl}
-
-\usepackage{graphics}
-
-% Enables inclusion of SVG graphics - 1:1 approach
-% This is NOT the approach of http://www.ctan.org/tex-archive/info/svg-inkscape,
-% which allows text in SVG to be typeset using LaTeX
-% We just include the SVG as is
-\usepackage{epstopdf}
-\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{%
-  inkscape -z -D --file=#1 --export-pdf=\jobname-plantuml-svg.pdf &&
-  %due to https://bugs.launchpad.net/inkscape/+bug/1754167 we need to use pdfcrop
-  pdfcrop \jobname-plantuml-svg.pdf \OutputFile
-}
-
-\usepackage[output=svg]{plantuml}
-%\usepackage[output=latex]{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}

Deleted: trunk/Master/texmf-dist/doc/lualatex/plantuml/example-minimal.png
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/lualatex/plantuml/plantuml.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/lualatex/plantuml/plantuml.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/plantuml/plantuml.pdf	2018-03-22 16:17:51 UTC (rev 47075)
+++ trunk/Master/texmf-dist/doc/lualatex/plantuml/plantuml.pdf	2018-03-22 21:43:32 UTC (rev 47076)

Property changes on: trunk/Master/texmf-dist/doc/lualatex/plantuml/plantuml.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty	2018-03-22 16:17:51 UTC (rev 47075)
+++ trunk/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty	2018-03-22 21:43:32 UTC (rev 47076)
@@ -3,7 +3,7 @@
 %% SPDX-License-Identifier: LPPL-1.3c+
 \NeedsTeXFormat{LaTeX2e}\relax
 \ProvidesPackage{plantuml}
-  [2018/03/08 v0.1.0
+  [2018/03/21 v0.2.1
   Embed PlantUML diagrams in latex documents.]
 
 % Required by PlantUML LaTeX output
@@ -41,18 +41,26 @@
 \def\maxwidth#1{\ifdim\Gin at nat@width>#1 #1\else\Gin at nat@width\fi}
 \makeatother
 
+\ExplSyntaxOn
+\let\PlantUmlMode\l_plantuml_mode
+\ExplSyntaxOff
+
+\newcounter{PlantUmlFigureNumber}
+
 \ifluatex
-  \ExplSyntaxOn
-  \let\PlantUmlMode\l_plantuml_mode
-  \ExplSyntaxOff
   \RequirePackage{luacode}
-  \makeatletter
-  \ifcase\pdf at shellescape
-    \message{No shell escape. PlantUML cannot be called. Start lualatex with -shell-escape.}
-    \newenvironment{plantuml}{%
-      No shell escape. PlantUML cannot be called. Start lualatex with -shell-escape.
-    }{}
-  \or
+\else
+  \RequirePackage[usefamily=bash]{pythontex}
+\fi
+
+\makeatletter
+\ifcase\pdf at shellescape
+  \message{No shell escape. PlantUML cannot be called. Start pdflatex/lualatex with -shell-escape.}
+  \newenvironment{plantuml}{%
+    No shell escape. PlantUML cannot be called. Start pdflatex/lualatex with -shell-escape.
+  }{}
+\or
+  \ifluatex
     \directlua{
       local plantUmlJar = os.getenv("PLANTUML_JAR")
       if not plantUmlJar then
@@ -59,10 +67,12 @@
         texio.write_nl("Environment variable PLANTUML_JAR not set.")
       end
     }
-    \NewDocumentEnvironment{plantuml}{}{%
-      \VerbatimOut{\jobname-plantuml.txt}}
-    {%
-      \endVerbatimOut
+  \fi
+  \NewDocumentEnvironment{plantuml}{}{%
+    \VerbatimOut{\jobname-plantuml.txt}}
+  {%
+    \endVerbatimOut
+    \ifluatex
       \directlua{
         local jobname=\luastring{\jobname}
         local plantUmlMode=\luastring{\PlantUmlMode}
@@ -69,22 +79,24 @@
         require("plantuml.lua")
         convertPlantUmlToTikz(jobname, plantUmlMode)
       }
-      \ifthenelse{\equal{\PlantUmlMode}{latex}}{
-        \begin{adjustbox}{max width=\linewidth}
-          \input{\jobname-plantuml.latex}
-        \end{adjustbox}
-      }{
-        \includegraphics[width=\maxwidth{\textwidth}]{\jobname-plantuml.\PlantUmlMode}
-      }
+    \else
+      \stepcounter{PlantUmlFigureNumber}
+      %TODO: Execute pyhton here
+      \typeout{*** plantuml only works with lualatex ***}
+    \fi
+    \ifthenelse{\equal{\PlantUmlMode}{latex}}{
+      \begin{adjustbox}{max width=\linewidth}
+        \input{\jobname-plantuml.latex}
+      \end{adjustbox}
+    }{
+      \includegraphics[width=\maxwidth{\textwidth}]{\jobname-plantuml.\PlantUmlMode}
     }
-  \or
-    \message{Restricted shell escape. PlantUML cannot be called. Start lualatex with -shell-escape.}
-    \newenvironment{plantuml}{%
-      Restricted shell escape. PlantUML cannot be called. Start lualatex with -shell-escape.
-    }{}
-  \fi
-  \makeatother
-\else
-  \typeout{*** plantuml only works with lualatex ***}
+  }
+\or
+  \message{Restricted shell escape. PlantUML cannot be called. Start pdflatex/lualatex with -shell-escape.}
+  \newenvironment{plantuml}{%
+    Restricted shell escape. PlantUML cannot be called. Start pdflatex/lualatex with -shell-escape.
+  }{}
 \fi
+\makeatother
 



More information about the tex-live-commits mailing list