diff options
author | Karl Berry <karl@freefriends.org> | 2018-10-18 20:28:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-10-18 20:28:01 +0000 |
commit | 0bd86e39a67aaac4274bbf501f97827394ad6a32 (patch) | |
tree | 822b16e7de130dd51208742176071cb8c89944f8 /Master/texmf-dist/tex/latex/ditaa/ditaa.sty | |
parent | 7886a204cd657bd21f4e64ab7125e477a4322494 (diff) |
ditaa (18oct18)
git-svn-id: svn://tug.org/texlive/trunk@48932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ditaa/ditaa.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ditaa/ditaa.sty | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ditaa/ditaa.sty b/Master/texmf-dist/tex/latex/ditaa/ditaa.sty new file mode 100644 index 00000000000..21969353dce --- /dev/null +++ b/Master/texmf-dist/tex/latex/ditaa/ditaa.sty @@ -0,0 +1,47 @@ +% 'ditaa' package +% +% (c) Hiroshi Ukai +% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{ditaa} +[2018/09/27 v0.01 LaTeX package for embedding ditaa style ascii art] + +\RequirePackage{fancyvrb} +\RequirePackage{graphicx} +\RequirePackage{kvoptions} + +\DeclareStringOption[]{imagepath} +\ProcessKeyvalOptions* + +%@formatter:off (This line indicates IntelliJ that formatter should be off before this) +\newenvironment{ditaa}[3][\columnwidth] + { + \def\ditaacaption{#2} + \def\ditaastem{#3} + \def\ditaadir{\ditaa@imagepath/ditaa} + \def\ditaafile{\ditaadir/\ditaastem.ditaa} + \def\ditaafigwidth{#1} + \VerbatimOut{\ditaafile}} + {\endVerbatimOut + \immediate\write18{ditaa -E "\ditaafile" "\ditaadir/\ditaastem.png"} + \begin{figure}[ht] + \begin{center} + \vspace{-1em} + \includegraphics[width=\ditaafigwidth]{\ditaadir/\ditaastem.png} + \vspace{-2em} + \caption{\ditaacaption} + \label{fig:\ditaastem} + \vspace{-1.5em} + \end{center} + \end{figure} + } +%@formatter:on (This line indicates IntelliJ that formatter should be off before this) +%-------------------------------------------------- + +\endinput +%% +%% End of file `ditaa.sty'.
\ No newline at end of file |