summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/platex-tools
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-05 22:46:01 +0000
committerKarl Berry <karl@freefriends.org>2017-05-05 22:46:01 +0000
commitaa9f58cd7bdffb2529e82e736476df8a7acaa70e (patch)
tree06ec5c8fe1bfee3f78c0f6c9bab26c25968c85a2 /Master/texmf-dist/tex/latex/platex-tools
parent4ca61c73d74fbd1cbad127bc6048b53c32520b2b (diff)
platex-tools (5may17)
git-svn-id: svn://tug.org/texlive/trunk@44208 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/platex-tools')
-rw-r--r--Master/texmf-dist/tex/latex/platex-tools/pxeverysel.sty3
-rw-r--r--Master/texmf-dist/tex/latex/platex-tools/pxftnright.sty56
-rw-r--r--Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty232
3 files changed, 266 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxeverysel.sty b/Master/texmf-dist/tex/latex/platex-tools/pxeverysel.sty
index b2cc13f916b..c18b6f3bdf5 100644
--- a/Master/texmf-dist/tex/latex/platex-tools/pxeverysel.sty
+++ b/Master/texmf-dist/tex/latex/platex-tools/pxeverysel.sty
@@ -12,7 +12,7 @@
%% package declaration
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pxeverysel}
- [2016/12/28 v0.5 Patch to everysel for (u)pLaTeX]
+ [2017/03/02 v0.6 Patch to everysel for (u)pLaTeX]
%% previous code for ctex support has been removed in v0.5,
%% as ctex has depended on pxeverysel since 2016/12/27 v2.4.7
@@ -117,6 +117,7 @@
\def\pxys@postproc{%
% revert the hack for disabling duplicate font info
\expandafter\let\csname ver@tracefnt.sty\endcsname\pxys@ver@tracefnt
+ \let\pxys@ver@tracefnt\@undefined
% post handling of everysel routine
\let\CheckCommand\pxys@CheckCommand
\let\pxys@CheckCommand\@undefined
diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxftnright.sty b/Master/texmf-dist/tex/latex/platex-tools/pxftnright.sty
index f16fa403624..2b5d4382b41 100644
--- a/Master/texmf-dist/tex/latex/platex-tools/pxftnright.sty
+++ b/Master/texmf-dist/tex/latex/platex-tools/pxftnright.sty
@@ -16,13 +16,14 @@
% * \@makefntext is redefined
% (incompatible with some pLaTeX classes)
% * \footnotesep is not suitable for vertical typesetting
-% (rather a problem of \strutbox in pLaTeX2e kernel?)
+% when used with pLaTeX 2016/11/29 or earlier
+% (rather a problem of \strutbox in pLaTeX2e kernel)
% so, this package provides patches.
%
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{pxftnright}
- [2016/09/07 v1.0 footnote layout package for pLaTeX]
+ [2017/02/28 v1.1 footnote layout package for pLaTeX]
%% save \@makefntext definition from pLaTeX class
\@ifpackageloaded{ftnright}{%
@@ -36,7 +37,7 @@
\RequirePackage{ftnright}
%% patches for ftnright to work fine with pLaTeX
-%% This code is based on pLaTeX2e 2016/09/03 community ed.
+%% This code is based on pLaTeX2e 2017/04/08 community ed.
\def\@startcolumn{%
\ifx\@deferlist\@empty
@@ -91,34 +92,41 @@
formatted page.}%
\fi
\fi
+%%%%% change for pLaTeX (bottom float first)
\xdef\@freelist{\@freelist\@midlist}%
\global \let \@midlist \@empty
\@combinefloats
+ \let\pltx@textbottom\@textbottom %%% pLaTeX
+ \if@firstcolumn\else
+ \ifvoid\footins\else
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \unvbox \@outputbox
+ \@textbottom %%% pLaTeX
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color@endgroup
+ }%
+ \let\@textbottom\relax %%% pLaTeX
+ \fi
+ \fi
+%%%%%
\ifvbox\@kludgeins
\@makespecialcolbox
\else
-%%%%% change for pLaTeX (import from \@makecol in plcore)
- \setbox\@outputbox \vbox to\@colht {%
- \boxmaxdepth\maxdepth
- \@texttop
- \dimen@ \dp\@outputbox
- \unvbox \@outputbox
- \iftdir\vbox{\hskip\z@}\fi
- \vskip -\dimen@
- \@textbottom
- \if@firstcolumn\else
- \ifvoid\footins\else % for pLaTeX
- \vskip \skip\footins
- \color@begingroup
- \normalcolor
- \footnoterule
- \unvbox \footins
- \color@endgroup
- \fi
- \fi
- }%
-%%%%%
+ \setbox\@outputbox\vbox to\@colht
+ {\boxmaxdepth\maxdepth
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \iftdir\vbox{\hskip\z@}\fi %%% pLaTeX
+ \vskip -\dimen@
+ \@textbottom}%
\fi
+ \let\@textbottom\pltx@textbottom %%% pLaTeX
\global\maxdepth\@maxdepth
}
diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty b/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty
new file mode 100644
index 00000000000..0a183c6481f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty
@@ -0,0 +1,232 @@
+% pxgentombow.sty
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{pxgentombow}
+ [2017/05/05 v0.5 Generate crop mark 'tombow']
+\def\pxgtmb@pkgname{pxgentombow}
+
+%% import from jsclasses
+\hour\time \divide\hour by 60\relax
+\@tempcnta\hour \multiply\@tempcnta 60\relax
+\minute\time \advance\minute-\@tempcnta
+
+%% 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
+ \PackageInfo\pxgtmb@pkgname{tombow feature enabled by \pxgtmb@pkgname}
+\fi
+\tombowtrue %\tombowdatetrue %% enabled by tombowdate option
+\setlength{\@tombowwidth}{.1\p@}%
+
+%% import from jsclasses
+\@bannertoken{%
+ \jobname\space(\number\year-\two@digits\month-\two@digits\day
+ \space\two@digits\hour:\two@digits\minute)}
+
+%% prepare dimension
+\ifx\stockheight\@undefined \newdimen\stockheight \fi
+\ifx\stockwidth\@undefined \newdimen\stockwidth \fi
+
+%% prepare flag
+\newif\ifpxgtmb@switch \pxgtmb@switchfalse
+\newif\ifpxgtmb@landscape \pxgtmb@landscapefalse
+
+%% package options part 1
+\DeclareOption{tombowdate}{\tombowdatetrue}
+\DeclareOption{notombowdate}{\tombowdatefalse}
+
+%% register a list of candidate papersize
+% * \pxgtmb@addpapersize[<tombowname>]{<papername>}{<shorter edge>}{<longer edge>}
+% used for declaration of papersize.
+% when no option is specified (that is, \ifpxgtmb@switch = \iffalse),
+% also used for automatic stocksize determination.
+% * if <tombowname> = \@empty, the next <papername> is assumed.
+% * if <tombowname> = n, stocksize is set to papersize + 2in.
+\def\pxgtmb@addpapersize{\@ifnextchar[{\pxgtmb@addp@persize}{\pxgtmb@addp@persize[\@empty]}}
+\def\pxgtmb@addp@persize[#1]#2#3#4{%
+ % get current papersize and search through known standard in ascending order
+ \ifx\pxgtmb@guessedtombow\@empty
+ \ifx\pxgtmb@guessedpaper\@empty
+ % shorter edge -> \@tempdima, longer edge -> \@tempdimb
+ \ifdim\paperwidth>\paperheight\relax
+ \pxgtmb@landscapetrue
+ \@tempdima\paperheight \@tempdimb\paperwidth
+ \else
+ \pxgtmb@landscapefalse
+ \@tempdima\paperwidth \@tempdimb\paperheight
+ \fi
+ % \@ovri and \@ovro are used temporarily (safe enough)
+ \@ovri=#3\relax
+ \@ovro=#4\relax
+ % if \mag != 1000 and \inv@mag is defined, assume jsclasses-style \mag employment
+ \ifnum\mag=\@m\else \ifx\inv@mag\@undefined\else
+ \@ovri=\inv@mag\@ovri\relax
+ \@ovro=\inv@mag\@ovro\relax
+ \fi \fi
+ % compare
+ \ifdim\@tempdima=\@ovri\relax \ifdim\@tempdimb=\@ovro\relax
+ \def\pxgtmb@guessedpaper{#2}%
+ \ifx#1\@empty\else
+ \def\pxgtmb@guessedtombow{#1}%
+ \if n\pxgtmb@guessedtombow\else
+ \ExecuteOptions{tombow-#1}% package defaults to tombowdatetrue
+ \pxgtmb@switchfalse
+ \fi
+ \fi
+ \fi \fi
+ \else
+ \def\pxgtmb@guessedtombow{#2}% save for console message
+ \pxgtmb@setstock{#3}{#4}% set stockwidth/height
+ \fi\fi
+ \DeclareOption{tombow-#2}{%
+ \pxgtmb@switchtrue
+ \tombowdatetrue
+ \pxgtmb@setstock{#3}{#4}%
+ }%
+ \DeclareOption{tombo-#2}{%
+ \pxgtmb@switchtrue
+ \tombowdatefalse
+ \pxgtmb@setstock{#3}{#4}%
+ }%
+ \DeclareOption{mentuke-#2}{%
+ \pxgtmb@switchtrue
+ \tombowdatefalse
+ \setlength{\@tombowwidth}{\z@}%
+ \pxgtmb@setstock{#3}{#4}%
+ }%
+}
+\def\pxgtmb@setstock#1#2{%
+ \ifpxgtmb@landscape
+ \setlength\stockwidth{#2}%
+ \setlength\stockheight{#1}%
+ \else
+ \setlength\stockwidth{#1}%
+ \setlength\stockheight{#2}%
+ \fi
+ % if \mag != 1000 and \inv@mag is defined, assume jsclasses-style \mag employment
+ \ifnum\mag=\@m\else \ifx\inv@mag\@undefined\else
+ \stockwidth=\inv@mag\stockwidth\relax
+ \stockheight=\inv@mag\stockheight\relax
+ \fi \fi
+}%
+\@onlypreamble\pxgtmb@addpapersize
+\@onlypreamble\pxgtmb@addp@persize
+\@onlypreamble\pxgtmb@setstock
+
+%% initialize before search
+\def\pxgtmb@guessedpaper{}
+\def\pxgtmb@guessedtombow{}
+\@onlypreamble\pxgtmb@guessedpaper
+\@onlypreamble\pxgtmb@guessedtombow
+
+%% package options part 2
+% ISO A series <=> JIS B series in the ascending order
+\pxgtmb@addpapersize{a10}{26mm}{37mm}
+\pxgtmb@addpapersize{b10}{32mm}{45mm}
+\pxgtmb@addpapersize{a9}{37mm}{52mm}
+\pxgtmb@addpapersize{b9}{45mm}{64mm}
+\pxgtmb@addpapersize{a8}{52mm}{74mm}
+\pxgtmb@addpapersize{b8}{64mm}{91mm}
+\pxgtmb@addpapersize{a7}{74mm}{105mm}
+\pxgtmb@addpapersize{b7}{91mm}{128mm}
+\pxgtmb@addpapersize{a6}{105mm}{148mm}
+\pxgtmb@addpapersize{b6}{128mm}{182mm}
+\pxgtmb@addpapersize{a5}{148mm}{210mm}
+\pxgtmb@addpapersize{b5}{182mm}{257mm}
+\pxgtmb@addpapersize{a4}{210mm}{297mm}
+\pxgtmb@addpapersize{b4}{257mm}{364mm}
+\pxgtmb@addpapersize{a3}{297mm}{420mm}
+\pxgtmb@addpapersize{b3}{364mm}{515mm}
+\pxgtmb@addpapersize{a2}{420mm}{594mm}
+\pxgtmb@addpapersize{b2}{515mm}{728mm}
+\pxgtmb@addpapersize{a1}{594mm}{841mm}
+\pxgtmb@addpapersize{b1}{728mm}{1030mm}
+\pxgtmb@addpapersize[n]{a0}{841mm}{1189mm}
+\pxgtmb@addpapersize[n]{b0}{1030mm}{1456mm}
+
+%% package options part 3
+% ISO C series
+\pxgtmb@addpapersize[a9]{c10}{28mm}{40mm}
+\pxgtmb@addpapersize[a8]{c9}{40mm}{57mm}
+\pxgtmb@addpapersize[a7]{c8}{57mm}{81mm}
+\pxgtmb@addpapersize[a6]{c7}{81mm}{114mm}
+\pxgtmb@addpapersize[a5]{c6}{114mm}{162mm}
+\pxgtmb@addpapersize[a4]{c5}{162mm}{229mm}
+\pxgtmb@addpapersize[a3]{c4}{229mm}{354mm}
+\pxgtmb@addpapersize[a2]{c3}{324mm}{458mm}
+\pxgtmb@addpapersize[a1]{c2}{458mm}{648mm}
+\pxgtmb@addpapersize[a0]{c1}{648mm}{917mm}
+\pxgtmb@addpapersize[n]{c0}{917mm}{1297mm}
+% misc
+\pxgtmb@addpapersize[b4]{a4j}{210mm}{297mm}
+\pxgtmb@addpapersize[b5]{a5j}{148mm}{210mm}
+\pxgtmb@addpapersize[a3]{b4j}{257mm}{364mm}
+\pxgtmb@addpapersize[a4]{b5j}{182mm}{257mm}
+\pxgtmb@addpapersize[b4]{a4var}{210mm}{283mm}
+\pxgtmb@addpapersize[a4]{b5var}{182mm}{230mm}
+\pxgtmb@addpapersize[a3]{letter}{8.5in}{11in}
+\pxgtmb@addpapersize[a3]{legal}{8.5in}{14in}
+\pxgtmb@addpapersize[a4]{executive}{7.25in}{10.5in}
+
+%% default options
+\ExecuteOptions{tombowdate}% package defaults to tombowdatetrue
+\ProcessOptions
+
+%% display search result
+% if any of explicit size option is specified, \ifpxgtmb@switch = \iftrue.
+% otherwise, automatic size detection should be successful.
+\ifpxgtmb@switch\else
+ % check status
+ \@tempcnta=\z@\relax
+ \ifx\pxgtmb@guessedpaper\@empty
+ \advance\@tempcnta\@ne\relax
+ \fi
+ \ifx\pxgtmb@guessedtombow\@empty
+ \advance\@tempcnta\tw@\relax
+ \else\if n\pxgtmb@guessedtombow
+ \advance\@tempcnta\tw@\relax
+ \fi\fi
+ % message
+ \ifodd\@tempcnta
+ %\PackageWarningNoLine\pxgtmb@pkgname{%
+ % No size option specified, and automatic papersize\MessageBreak
+ % detection also failed}
+ \else
+ \typeout{***** Package \pxgtmb@pkgname\space detected \pxgtmb@guessedpaper paper. *****}
+ \fi
+ \ifnum\@tempcnta>\@ne\relax
+ \PackageWarningNoLine\pxgtmb@pkgname{%
+ Output size cannot be determined. Please add size\MessageBreak
+ option (e.g. `tombow-a4') to specify output size.\MessageBreak
+ Falling back to +1in ..}
+ \stockwidth\paperwidth \advance\stockwidth 2in
+ \stockheight\paperheight \advance\stockheight 2in
+ \else
+ \typeout{***** Now the output size is automatically set to \pxgtmb@guessedtombow. *****}
+ \fi
+\fi
+
+%% warnings
+\ifdim\stockwidth<\paperwidth
+ \PackageWarningNoLine\pxgtmb@pkgname{%
+ \string\stockwidth\space is smaller than \string\paperwidth!\MessageBreak
+ Is this really what you want?}
+\fi
+\ifdim\stockheight<\paperheight
+ \PackageWarningNoLine\pxgtmb@pkgname{%
+ \string\stockheight\space is smaller than \string\paperheight!\MessageBreak
+ Is this really what you want?}
+\fi
+
+%% make tombow box according to (no)tombowdate & \@tombowwidth status
+\maketombowbox
+
+%% shift amount
+\hoffset .5\stockwidth
+\advance\hoffset -.5\paperwidth
+\advance\hoffset-1truein\relax
+\voffset .5\stockheight
+\advance\voffset -.5\paperheight
+\advance\voffset-1truein\relax
+
+\endinput