From 71b38ef4b645d159383b9039b45bd5b20039eb60 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 21 Aug 2018 21:52:16 +0000
Subject: gentombow (21aug18)

git-svn-id: svn://tug.org/texlive/trunk@48449 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/gentombow/gentombow.sty | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/gentombow/gentombow.sty')

diff --git a/Master/texmf-dist/tex/latex/gentombow/gentombow.sty b/Master/texmf-dist/tex/latex/gentombow/gentombow.sty
index c8fe79d0849..94f84d3cac7 100644
--- a/Master/texmf-dist/tex/latex/gentombow/gentombow.sty
+++ b/Master/texmf-dist/tex/latex/gentombow/gentombow.sty
@@ -8,7 +8,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{gentombow}
-    [2018/05/17 v0.9g Generate crop mark 'tombow']
+    [2018/08/20 v0.9h Generate crop mark 'tombow']
 \def\pxgtmb@pkgname{gentombow}
 \@namedef{ver@pxgentombow.sty}{}% fake
 
@@ -18,7 +18,7 @@
 %% supported engines
 % case 2: pdfLaTeX etc.
 % case 1: pLaTeX2e <2018-04-01>+2 or older
-% case 0: newer pLaTeX2e
+% case 0: pLaTeX2e <2018-05-20> or newer
 \ifx\pfmtversion\@undefined
   \@ifpackageloaded{luatexja}{}{\chardef\pxgtmb@errlevel=\tw@}
 \fi
@@ -430,6 +430,7 @@
 \pxgtmb@addpapersize[a3]{letter}{8.5in}{11in}
 \pxgtmb@addpapersize[a3]{legal}{8.5in}{14in}
 \pxgtmb@addpapersize[a4]{executive}{7.25in}{10.5in}
+\pxgtmb@addpapersize[a5]{hagaki}{100mm}{148mm}
 
 %% package options part 4
 \def\pxgtmb@pdfbox@status{0}
@@ -664,6 +665,10 @@
 
 %% patch internal for pdfpages to work with tombow
 %% (tested on pdfpages 2017/10/31 v0.5l)
+%% Note the code is the same as that of pxpdfpages.sty,
+%% but reserved here since gentombow.sty can be used on
+%% any LaTeX format
+%% (cf. pxpdfpages.sty is restricted to (u)pLaTeX)
 \def\pxgtmb@patch@pdfpages{%
   \RequirePackage{etoolbox}
   \patchcmd{\AM@output}{%
@@ -679,7 +684,14 @@
   }
   {\PackageInfo{\pxgtmb@pkgname}{Patch for pdfpages applied}}
   {\PackageWarningNoLine{\pxgtmb@pkgname}{Patch for pdfpages failed}}%
-  }
+}
+%% however, if running (u)pLaTeX, use pxpdfpages.sty if available
+\ifx\pfmtname\@undefined\else
+  \IfFileExists{pxpdfpages.sty}{%
+    \def\pxgtmb@patch@pdfpages{\RequirePackage{pxpdfpages}}%
+  }{}
+\fi
+%% do it
 \AtBeginDocument{\@ifpackageloaded{pdfpages}{\pxgtmb@patch@pdfpages}{}}
 
 \endinput
-- 
cgit v1.2.3

