diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/graphicxpsd/LICENSE | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/graphicxpsd/README.md | 28 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf | bin | 0 -> 153318 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex | 73 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex | 50 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd | bin | 0 -> 851751 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty | 87 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 3 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-pictures.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/graphicxpsd.tlpsrc | 0 |
10 files changed, 248 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/graphicxpsd/LICENSE b/Master/texmf-dist/doc/latex/graphicxpsd/LICENSE new file mode 100644 index 00000000000..72d2a71e6fa --- /dev/null +++ b/Master/texmf-dist/doc/latex/graphicxpsd/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2017, 2018 Munehiro Yamamoto + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Master/texmf-dist/doc/latex/graphicxpsd/README.md b/Master/texmf-dist/doc/latex/graphicxpsd/README.md new file mode 100644 index 00000000000..e20f4df7158 --- /dev/null +++ b/Master/texmf-dist/doc/latex/graphicxpsd/README.md @@ -0,0 +1,28 @@ +`graphicxpsd` Package +========== +Adobe Photoshop Data format (PSD) support for graphicx package + +This package provides Adobe Photoshop Data format (PSD) support for graphicx package +with sips (Darwin/macOS)/convert (ImageMagick) command. + + * Major drivers support: `dvipdfmx`, `xetex`, `pdftex`, `luatex` + +## Requirements + + * recent [TeX Live](https://www.tug.org/texlive/) environment + (TeX Live 2012 or higher release version) + * Mac OS X or [ImageMagick](https://www.imagemagick.org/) + +## Installation + +Copy: `graphicxpsd.sty` -> `$TEXMF/tex/platex/graphicxpsd/` + +## License + +This package is licensed under the terms of the MIT License. + + +-------------------- + +Munehiro Yamamoto +https://github.com/munepi diff --git a/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf b/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf Binary files differnew file mode 100644 index 00000000000..47d371390ca --- /dev/null +++ b/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf diff --git a/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex b/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex new file mode 100644 index 00000000000..96d6411efbd --- /dev/null +++ b/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex @@ -0,0 +1,73 @@ +%#!rm -f tigerpsdfmt4* && lualatex -shell-escape graphicxpsd +\documentclass[luatex]{article} +\usepackage{shortvrb}\MakeShortVerb{\|} +\usepackage{graphicx} +\usepackage{graphicxpsd} +\title{\textsf{graphicxpsd} Package} +\author{Munehiro Yamamoto} +\date{2018/01/26 v1.0} +\begin{document} +\maketitle +\begin{abstract} +This package provides Adobe Photoshop Data format (PSD) support +for \textsf{graphicx} package +with \texttt{sips} (Darwin/macOS)/\texttt{convert} (ImageMagick) command. +\end{abstract} + +\section{Motivation} +\texttt{graphicx} package supports already many graphics image formats as bellow. +\begin{itemize} +\item non-vector formats: jpg, png, bmp, and so on +\item PostScript-style formats: eps, ps +\item PDF-style formats: pdf, ai +\end{itemize} +However, it currently does not support Adobe Photoshop Data format (PSD). + +Against that, we developed the \textsf{graphicxpsd} package +to support PSD format via PSD-to-PDF conversion +with the following image converters. +\begin{itemize} +\item \texttt{sips}: pre-installed command in Darwin/macOS +\item \texttt{convert}: bundled command in ImageMagick +\end{itemize} + +\section{Loading \textsf{graphicxpsd} Package} + +Load \textsf{graphicxpsd} package after loading \textsf{graphicx} package. + +\begin{quote} +\begin{verbatim} +\usepackage{graphicx} +\usepackage[<options>]{graphicxpsd} +\end{verbatim} +\end{quote} + +The list of available options is the following. +\begin{itemize} +\item |dvipdfmx|, |xetex|, |pdftex|, |luatex|: supported driver options; +You can also give specific driver option from global option. + +\item |sips| (default), |imagemagick|: supported converter +\end{itemize} + +\section{Example} + +Typeset the following {\LaTeX} document with LuaTeX. + +\begin{quote} +\begin{verbatim} +%#!lualatex -shell-escape +\documentclass[luatex]{article}%%set luatex driver as global option +\usepackage{graphicx} +\usepackage{graphicxpsd} +\begin{document} +\includegraphics{tigerpsdfmt.psd} +\end{document} +\end{verbatim} +\end{quote} + +Then, the result is as below. + +\includegraphics{tigerpsdfmt.psd} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex b/Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex new file mode 100644 index 00000000000..39f4e658bf0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex @@ -0,0 +1,50 @@ +% #!rm -f tigerpsdfmt4* && ptex2pdf -l -u -ot '-shell-escape' -od '-v' test-gin-rule-psd +% #!rm -f tigerpsdfmt4* && xelatex -shell-escape test-gin-rule-psd +% #!rm -f tigerpsdfmt4* && pdflatex -shell-escape test-gin-rule-psd +%#!rm -f tigerpsdfmt4* && lualatex -shell-escape test-gin-rule-psd +\documentclass[luatex]{article}%%set as a global option +\usepackage{graphicx} +\usepackage[% + imagemagick,%default: sips +]{graphicxpsd} +\listfiles +\begin{document} +%% $ file tigerpsdfmt.psd +%% tigerpsdfmt.psd: Adobe Photoshop Image, 550 x 568, RGBA, 4x 8-bit channels +\includegraphics{tigerpsdfmt.psd} +\end{document} + +$ pdfinfo tigerpsdfmt4gfxpsd.pdf +Title: tigerpsdfmt4gfxpsd +Producer: /opt/homebrew/Cellar/imagemagick/7.0.7-15/share/doc/ImageMagick-7//index.html +CreationDate: Sat Jan 27 00:10:51 2018 JST +ModDate: Sat Jan 27 00:10:51 2018 JST +Tagged: no +UserProperties: no +Suspects: no +Form: none +JavaScript: no +Pages: 2 +Encrypted: no +Page size: 99 x 102.24 pts +Page rot: 0 +File size: 1052740 bytes +Optimized: no +PDF version: 1.4 + +$ pdfinfo tigerpsdfmt4gfxpsd.pdf +Producer: Mac OS X 10.13.4 Quartz PDFContext +CreationDate: Fri Jan 26 15:12:13 2018 JST +ModDate: Fri Jan 26 15:12:13 2018 JST +Tagged: no +UserProperties: no +Suspects: no +Form: none +JavaScript: no +Pages: 1 +Encrypted: no +Page size: 99 x 102.24 pts +Page rot: 0 +File size: 112882 bytes +Optimized: no +PDF version: 1.3
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd b/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd Binary files differnew file mode 100644 index 00000000000..6fc50edeb13 --- /dev/null +++ b/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd diff --git a/Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty b/Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty new file mode 100644 index 00000000000..b4d4b9dcab6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty @@ -0,0 +1,87 @@ +% #!rm -f tigerpsdfmt4* && ptex2pdf -l -u -ot '-shell-escape' -od '-v' test-gin-rule-psd +% #!rm -f tigerpsdfmt4* && xelatex -shell-escape test-gin-rule-psd +% #!rm -f tigerpsdfmt4* && pdflatex -shell-escape test-gin-rule-psd +%#!rm -f tigerpsdfmt4* && lualatex -shell-escape test-gin-rule-psd +%% +%% This is file 'graphicxpsd.sty'. +%% +%% Copyright (c) 2017, 2018 Munehiro Yamamoto +%% +%% * e-mail: munepixyz@gmail.com, munepi@greencherry.jp +%% * GitHub: https://github.com/munepi +%% * Twitter: @munepixyz +%% +%% This package is licensed under the terms of the MIT License. +%% +\ProvidesPackage{graphicxpsd} + [2018/01/26 v1.0 Adobe Photoshop Data format (PSD) support for graphicx package + with sips (Darwin/macOS)/convert (ImageMagick) command] + +%% declare package errors +\def\gfxpsd@error{\PackageError{graphicxpsd}} +\def\gfxpsd@warning{\PackageWarning{graphicxpsd}} +\def\gfxpsd@warningnoline{\PackageWarningNoLine{graphicxpsd}} +\def\gfxpsd@info{\PackageInfo{graphicxpsd}} + +%% support major graphicx drivers +\newif\if@gfxpsd@dvipdfmx \@gfxpsd@dvipdfmxfalse +\newif\if@gfxpsd@pdftex \@gfxpsd@pdftexfalse +\DeclareOption{dvipdfmx}{\@gfxpsd@dvipdfmxtrue\@gfxpsd@pdftexfalse} +\DeclareOption{xetex}{\@gfxpsd@dvipdfmxtrue\@gfxpsd@pdftexfalse} +\DeclareOption{luatex}{\@gfxpsd@dvipdfmxfalse\@gfxpsd@pdftextrue} +\DeclareOption{pdftex}{\@gfxpsd@dvipdfmxfalse\@gfxpsd@pdftextrue} + +%% support two psd-to-pdf command: sips (Darwin/macOS), convert (ImageMagick) +\def\@gfxpsd@psdtopdf{sips}%% as default +\DeclareOption{imagemagick}{\gdef\@gfxpsd@psdtopdf{convert}} +\DeclareOption{sips}{\gdef\@gfxpsd@psdtopdf{sips}} + +\ProcessOptions\relax + +%% support the extension .psd (psdtopdf) +\if@gfxpsd@dvipdfmx + \@namedef{Gin@rule@.PSD}#1{{psdtopdf}{.xbb}{#1}} + \@namedef{Gin@rule@.psd}#1{{psdtopdf}{.xbb}{#1}} +\else\if@gfxpsd@pdftex + \@namedef{Gin@rule@.PSD}#1{{psdtopdf}{.pdf}{#1}} + \@namedef{Gin@rule@.psd}#1{{psdtopdf}{.pdf}{#1}} +\else + \grnchry@error{Please choice specific dviware driver from the following list + and set the one as a documentclass option.^^J + available dviware drivers: dvipdfmx, xetex, luatex, pdftex}% +\fi\fi + +%% then, include .psd file as converted PDF +\let\Ginclude@psdtopdf\Ginclude@pdf + +%% compatibility for TL16 or lower version +\@ifundefined{GPT@space}{% + \def\GPT@space{ }% +}{} + +%% check shell escape trigger +\IfFileExists{shellesc.sty}{%%is bundled in TL15 or higher release version +\RequirePackage{shellesc}}{%%otherwise, such TL has no luatex. + \protected\def\ShellEscape{\immediate\write18 }%%compatibility for TL14 or lower version +} + +%% read .psd file +\let\clone@Gread@pdf\Gread@pdf +\def\Gread@psdtopdf#1{% + \typeout{converting: \Gin@base\Gin@ext\GPT@space -> \Gin@base4gfxpsd.pdf}% + \def\gfxpsd@tmp{sips}\ifx\@gfxpsd@psdtopdf\gfxpsd@tmp + \ShellEscape{sips -s format pdf \Gin@base\Gin@ext\GPT@space --out \Gin@base4gfxpsd.pdf}% + \else\def\gfxpsd@tmp{convert}\ifx\@gfxpsd@psdtopdf\gfxpsd@tmp + \ShellEscape{convert \Gin@base\Gin@ext\GPT@space\Gin@base4gfxpsd.pdf}% + \fi\fi + %% renamed inside: foo.psd -> foo4gfxpsd.pdf + \let\clone@Gin@base\Gin@base + \def\Gin@base{\clone@Gin@base4gfxpsd}% + \def\Gin@ext{.pdf}% +% \typeout{!!! #1}%%=> tigerpsdfmt4gfxpsd.xbb +% \typeout{!!! \Gin@base\Gin@ext}%%=> tigerpsdfmt4gfxpsd.pdf + \clone@Gread@pdf{#1}} + +\endinput +%% +%% End of file `graphicxpsd.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 030795341b3..9cf12ea63db 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -307,7 +307,8 @@ my @TLP_working = qw( go gobble gofonts gost gothic gotoh gradientframe gradstudentresume grafcet grant graphbox graphics graphics-cfg graphics-def graphics-pln - graphicx-psmin graphicxbox graphviz grayhints greek-fontenc greek-inputenc + graphicx-psmin graphicxbox graphicxpsd + graphviz grayhints greek-fontenc greek-inputenc greekdates greektex greektonoi greenpoint gregoriotex grfpaste grid grid-system gridset gridslides grotesq grundgesetze gsemthesis gtl gtrlib-largetrees gtrcrd diff --git a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc index 6db30b149d9..94731e4b151 100644 --- a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc @@ -56,6 +56,7 @@ depend gincltex depend gnuplottex depend gradientframe depend grafcet +depend graphicxpsd depend graphviz depend gtrlib-largetrees depend harveyballs diff --git a/Master/tlpkg/tlpsrc/graphicxpsd.tlpsrc b/Master/tlpkg/tlpsrc/graphicxpsd.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/graphicxpsd.tlpsrc |