diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty b/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty index 0a183c6481f..834510c55b1 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty @@ -1,9 +1,29 @@ +% % pxgentombow.sty -\NeedsTeXFormat{pLaTeX2e} +% written by Hironobu Yamashita (@aminophen) +% +% This package is part of the platex-tools bundle. +% https://github.com/aminophen/platex-tools +% + +\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{pxgentombow} - [2017/05/05 v0.5 Generate crop mark 'tombow'] + [2017/07/23 v0.7 Generate crop mark 'tombow'] \def\pxgtmb@pkgname{pxgentombow} +%% error status +\chardef\pxgtmb@errlevel=\z@ + +%% supported engines +\ifx\pfmtversion\@undefined + \@ifpackageloaded{luatexja}{}{\chardef\pxgtmb@errlevel=\@ne} +\fi +\ifnum\pxgtmb@errlevel>\z@ + \PackageError{\pxgtmb@pkgname}{% + Only pLaTeX, upLaTeX and LuaTeX-ja are supported now}\@ehc + \expandafter\endinput +\fi + %% import from jsclasses \hour\time \divide\hour by 60\relax \@tempcnta\hour \multiply\@tempcnta 60\relax @@ -13,6 +33,20 @@ % if tombow-related option is not included in class option list, % show info and enable it now \iftombow\else + % if jsclasses is detected, it's too late + % -- When a size option other than `10pt' is specified, + % jsclasses uses \mag and calculates \oddsidemargin and \topmargin + % differently, depending on tombow status. + % In order to force `jsclasses' to calculate correctly, + % `tombow' or `tombo' is required as a class option. + % ... or, you may add `nomag' or `nomag*' instead. + \ifnum\mag=\@m\else \ifx\inv@mag\@undefined\else + \PackageError{\pxgtmb@pkgname}{% + It seems you are using Japanese `jsclasses'\MessageBreak + (jsarticle, jsbook, jsreport, etc.) or some\MessageBreak + derived class. Please add `tombow' or `tombo'\MessageBreak + to the class option list}\@ehc + \fi \fi \PackageInfo\pxgtmb@pkgname{tombow feature enabled by \pxgtmb@pkgname} \fi \tombowtrue %\tombowdatetrue %% enabled by tombowdate option |