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 | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty b/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty index 834510c55b1..99eff83f22f 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty @@ -8,20 +8,27 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{pxgentombow} - [2017/07/23 v0.7 Generate crop mark 'tombow'] + [2017/12/17 v0.9 Generate crop mark 'tombow'] \def\pxgtmb@pkgname{pxgentombow} -%% error status -\chardef\pxgtmb@errlevel=\z@ +%% error status (shared with gentombow.sty) +\ifx\pxgtmb@errlevel\@undefined + \chardef\pxgtmb@errlevel=\z@ +\fi %% 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 + \ifx\pxgtmb@emu@pkgname\@undefined % gentombow.sty not loaded + \PackageError{\pxgtmb@pkgname}{% + Only pLaTeX, upLaTeX and LuaTeX-ja are supported!\MessageBreak + Please use `gentombow' package instead}\@ehc + \expandafter\expandafter\expandafter\endinput\expandafter + \fi +\else + \@namedef{ver@gentombow.sty}{}% fake \fi %% import from jsclasses @@ -29,11 +36,23 @@ \@tempcnta\hour \multiply\@tempcnta 60\relax \minute\time \advance\minute-\@tempcnta +\ifnum\mag=\@m\else + % if BXjscls is detected and \mag != 1000, + % the layout will be definitely broken + \ifx\bxjs@param@mag\@undefined\else + \PackageError{\pxgtmb@pkgname}{% + It seems you are using Japanese `BXjscls'\MessageBreak + (bxjsarticle, bxjsbook, bxjsreport, etc.) or\MessageBreak + some derived class. Try adding `nomag' or\MessageBreak + `nomag*' to the class option list}\@ehc + \fi +\fi + %% this package will use tombo feature in pLaTeX kernel % 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 + % if jsclasses is detected and \mag != 1000, 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. @@ -47,6 +66,7 @@ derived class. Please add `tombow' or `tombo'\MessageBreak to the class option list}\@ehc \fi \fi + % BXjscls is already checked above, no check here \PackageInfo\pxgtmb@pkgname{tombow feature enabled by \pxgtmb@pkgname} \fi \tombowtrue %\tombowdatetrue %% enabled by tombowdate option |