texlive[46446] Master: graphicxpsd (26jan18)

commits+karl at tug.org commits+karl at tug.org
Fri Jan 26 23:42:27 CET 2018


Revision: 46446
          http://tug.org/svn/texlive?view=revision&revision=46446
Author:   karl
Date:     2018-01-26 23:42:27 +0100 (Fri, 26 Jan 2018)
Log Message:
-----------
graphicxpsd (26jan18)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/graphicxpsd/
    trunk/Master/texmf-dist/doc/latex/graphicxpsd/LICENSE
    trunk/Master/texmf-dist/doc/latex/graphicxpsd/README.md
    trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf
    trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex
    trunk/Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex
    trunk/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd
    trunk/Master/texmf-dist/tex/latex/graphicxpsd/
    trunk/Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty
    trunk/Master/tlpkg/tlpsrc/graphicxpsd.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/graphicxpsd/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphicxpsd/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/graphicxpsd/LICENSE	2018-01-26 22:42:27 UTC (rev 46446)
@@ -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.

Added: trunk/Master/texmf-dist/doc/latex/graphicxpsd/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphicxpsd/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/graphicxpsd/README.md	2018-01-26 22:42:27 UTC (rev 46446)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/graphicxpsd/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf	2018-01-26 02:49:25 UTC (rev 46445)
+++ trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf	2018-01-26 22:42:27 UTC (rev 46446)

Property changes on: trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex	2018-01-26 22:42:27 UTC (rev 46446)
@@ -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}


Property changes on: trunk/Master/texmf-dist/doc/latex/graphicxpsd/graphicxpsd.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex	2018-01-26 22:42:27 UTC (rev 46446)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/graphicxpsd/test-gin-rule-psd.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd	2018-01-26 02:49:25 UTC (rev 46445)
+++ trunk/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd	2018-01-26 22:42:27 UTC (rev 46446)

Property changes on: trunk/Master/texmf-dist/doc/latex/graphicxpsd/tigerpsdfmt.psd
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty	2018-01-26 22:42:27 UTC (rev 46446)
@@ -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 at gmail.com, munepi at 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 at error{\PackageError{graphicxpsd}}
+\def\gfxpsd at warning{\PackageWarning{graphicxpsd}}
+\def\gfxpsd at warningnoline{\PackageWarningNoLine{graphicxpsd}}
+\def\gfxpsd at info{\PackageInfo{graphicxpsd}}
+
+%% support major graphicx drivers
+\newif\if at gfxpsd@dvipdfmx \@gfxpsd at dvipdfmxfalse
+\newif\if at gfxpsd@pdftex \@gfxpsd at pdftexfalse
+\DeclareOption{dvipdfmx}{\@gfxpsd at dvipdfmxtrue\@gfxpsd at pdftexfalse}
+\DeclareOption{xetex}{\@gfxpsd at dvipdfmxtrue\@gfxpsd at pdftexfalse}
+\DeclareOption{luatex}{\@gfxpsd at dvipdfmxfalse\@gfxpsd at pdftextrue}
+\DeclareOption{pdftex}{\@gfxpsd at dvipdfmxfalse\@gfxpsd at pdftextrue}
+
+%% support two psd-to-pdf command: sips (Darwin/macOS), convert (ImageMagick)
+\def\@gfxpsd at psdtopdf{sips}%% as default
+\DeclareOption{imagemagick}{\gdef\@gfxpsd at psdtopdf{convert}}
+\DeclareOption{sips}{\gdef\@gfxpsd at psdtopdf{sips}}
+
+\ProcessOptions\relax
+
+%% support the extension .psd (psdtopdf)
+\if at gfxpsd@dvipdfmx
+  \@namedef{Gin at rule@.PSD}#1{{psdtopdf}{.xbb}{#1}}
+  \@namedef{Gin at rule@.psd}#1{{psdtopdf}{.xbb}{#1}}
+\else\if at gfxpsd@pdftex
+  \@namedef{Gin at rule@.PSD}#1{{psdtopdf}{.pdf}{#1}}
+  \@namedef{Gin at rule@.psd}#1{{psdtopdf}{.pdf}{#1}}
+\else
+  \grnchry at 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 at psdtopdf\Ginclude at pdf
+
+%% compatibility for TL16 or lower version
+\@ifundefined{GPT at space}{%
+  \def\GPT at 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 at Gread@pdf\Gread at pdf
+\def\Gread at psdtopdf#1{%
+  \typeout{converting: \Gin at base\Gin at ext\GPT at space -> \Gin at base4gfxpsd.pdf}%
+  \def\gfxpsd at tmp{sips}\ifx\@gfxpsd at psdtopdf\gfxpsd at tmp
+    \ShellEscape{sips -s format pdf \Gin at base\Gin at ext\GPT at space --out \Gin at base4gfxpsd.pdf}%
+  \else\def\gfxpsd at tmp{convert}\ifx\@gfxpsd at psdtopdf\gfxpsd at tmp
+    \ShellEscape{convert \Gin at base\Gin at ext\GPT at space\Gin at base4gfxpsd.pdf}%
+  \fi\fi
+  %% renamed inside: foo.psd -> foo4gfxpsd.pdf
+  \let\clone at Gin@base\Gin at base
+  \def\Gin at base{\clone at Gin@base4gfxpsd}%
+  \def\Gin at ext{.pdf}%
+% \typeout{!!! #1}%%=> tigerpsdfmt4gfxpsd.xbb
+% \typeout{!!! \Gin at base\Gin at ext}%%=> tigerpsdfmt4gfxpsd.pdf
+  \clone at Gread@pdf{#1}}
+
+\endinput
+%%
+%% End of file `graphicxpsd.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/graphicxpsd/graphicxpsd.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-01-26 02:49:25 UTC (rev 46445)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-01-26 22:42:27 UTC (rev 46446)
@@ -307,7 +307,8 @@
     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

Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2018-01-26 02:49:25 UTC (rev 46445)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2018-01-26 22:42:27 UTC (rev 46446)
@@ -56,6 +56,7 @@
 depend gnuplottex
 depend gradientframe
 depend grafcet
+depend graphicxpsd
 depend graphviz
 depend gtrlib-largetrees
 depend harveyballs

Added: trunk/Master/tlpkg/tlpsrc/graphicxpsd.tlpsrc
===================================================================


More information about the tex-live-commits mailing list