summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/turnthepage
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-25 22:31:24 +0000
committerKarl Berry <karl@freefriends.org>2011-03-25 22:31:24 +0000
commit3923279f3c33488793532b77f5881847f1ebfb7d (patch)
tree725ed44969341e4036d15fea0bc50dac84ede746 /Master/texmf-dist/tex/latex/turnthepage
parentac38de9eb4cacad853fe6c6cdff98321a4e0a2a2 (diff)
turnthepath 1.3a (24mar11)
git-svn-id: svn://tug.org/texlive/trunk@21829 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/turnthepage')
-rw-r--r--Master/texmf-dist/tex/latex/turnthepage/turnpageetex.sty59
-rw-r--r--Master/texmf-dist/tex/latex/turnthepage/turnpagewoetex.sty61
-rw-r--r--Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty76
3 files changed, 150 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/turnthepage/turnpageetex.sty b/Master/texmf-dist/tex/latex/turnthepage/turnpageetex.sty
new file mode 100644
index 00000000000..16c225574e0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/turnthepage/turnpageetex.sty
@@ -0,0 +1,59 @@
+% This is file `turnpageetex.sty' v1.3a by Merciadri Luca.
+% Thanks to Marc van Dongen and Martin Muench for their help.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{turnpageetex}[2011/03/24 1.3a
+ Indicating to turn the page (LM)]
+
+\PackageInfo{turnpageetex}{This is turnthepage with using e-TeX.}
+
+\RequirePackage{atbegshi}
+\RequirePackage{picture}
+\RequirePackage{zref-abspage}
+\RequirePackage{zref-lastpage}
+
+\ifx\turnthepage\undefined
+ \DeclareOption{short}{\providecommand{\turnthepage}{/\ldots}}
+ \DeclareOption{english}{\providecommand{\turnthepage}{\textit{Turn the page.}}}
+ \DeclareOption{francais}{\providecommand{\turnthepage}{\textit{Tournez la page.}}}
+ \DeclareOption{nederlands}{\providecommand{\turnthepage}{\textit{Sla de pagina om.}}}
+ \DeclareOption{deutsch}{\providecommand{\turnthepage}{\textit{Bitte wenden.}}}
+\else
+ \newcommand{\turnp@agewarn}{%
+ \PackageWarning{turnpageetex}{Command turnthepage was already defined.\MessageBreak%
+ Now redefining it.}}
+ \DeclareOption{short}{\turnp@agewarn \renewcommand{\turnthepage}{/\ldots}}
+ \DeclareOption{english}{\turnp@agewarn \renewcommand{\turnthepage}{\textit{Turn the page.}}}
+ \DeclareOption{francais}{\turnp@agewarn \renewcommand{\turnthepage}{\textit{Tournez la page.}}}
+ \DeclareOption{nederlands}{\turnp@agewarn \renewcommand{\turnthepage}{\textit{Sla de pagina om.}}}
+ \DeclareOption{deutsch}{\turnp@agewarn \renewcommand{\turnthepage}{\textit{Bitte wenden.}}}
+\fi
+
+\ProcessOptions
+
+\ifx\turnthepage\undefined
+ \providecommand{\turnthepage}{ }
+ \PackageWarning{turnpageetex}{No option for package turnthepage\MessageBreak%
+ (or turnpageetex) choosen!\MessageBreak%
+ There will be no information regarding\MessageBreak%
+ the need to turn the page!\MessageBreak%
+ }
+\fi
+
+\AtBeginShipout{%
+\AtBeginShipoutUpperLeft{%
+ \ifodd\c@page
+ \ifnum\zref@extract{LastPage}{abspage}>\c@abspage
+ \dimen1=1in
+ \advance\dimen1 by \textwidth
+ \advance\dimen1 by \oddsidemargin
+ \dimen3=1in
+ \advance\dimen3 by \topmargin
+ \advance\dimen3 by \headheight
+ \advance\dimen3 by \headsep
+ \advance\dimen3 by \textheight
+ \advance\dimen3 by \footskip
+ \put(\dimen1,-\dimen3){\llap{\turnthepage}}%
+ \fi%
+ \fi%
+}}
diff --git a/Master/texmf-dist/tex/latex/turnthepage/turnpagewoetex.sty b/Master/texmf-dist/tex/latex/turnthepage/turnpagewoetex.sty
new file mode 100644
index 00000000000..5f6b8b0c7b0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/turnthepage/turnpagewoetex.sty
@@ -0,0 +1,61 @@
+% This is file `turnpagewoetex.sty' v1.3a by Merciadri Luca.
+% Thanks to Marc van Dongen and Martin Muench for their help.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{turnpagewoetex}[2011/03/24 1.3a
+ Indicating to turn the page (LM)]
+
+\PackageInfo{turnpagewoetex}{This is turnthepage without using e-TeX.}
+
+\RequirePackage{atbegshi}
+\RequirePackage{picture}
+\RequirePackage{alphalph}
+\RequirePackage{pagesLTS}
+
+\ifx\turnthepage\undefined
+ \DeclareOption{short}{\providecommand{\turnthepage}{/\ldots}}
+ \DeclareOption{english}{\providecommand{\turnthepage}{\textit{Turn the page.}}}
+ \DeclareOption{francais}{\providecommand{\turnthepage}{\textit{Tournez la page.}}}
+ \DeclareOption{nederlands}{\providecommand{\turnthepage}{\textit{Sla de pagina om.}}}
+ \DeclareOption{deutsch}{\providecommand{\turnthepage}{\textit{Bitte wenden.}}}
+\else
+ \newcommand{\turnp@agewarn}{%
+ \PackageWarning{turnpageetex}{Command turnthepage was already defined.\MessageBreak%
+ Now redefining it.}}
+ \DeclareOption{short}{\turnp@agewarn \renewcommand{\turnthepage}{/\ldots}}
+ \DeclareOption{english}{\turnp@agewarn \renewcommand{\turnthepage}{\textit{Turn the page.}}}
+ \DeclareOption{francais}{\turnp@agewarn \renewcommand{\turnthepage}{\textit{Tournez la page.}}}
+ \DeclareOption{nederlands}{\turnp@agewarn \renewcommand{\turnthepage}{\textit{Sla de pagina om.}}}
+ \DeclareOption{deutsch}{\turnp@agewarn \renewcommand{\turnthepage}{\textit{Bitte wenden.}}}
+\fi
+
+\ProcessOptions
+
+\ifx\turnthepage\undefined
+ \providecommand{\turnthepage}{ }
+ \PackageWarning{turnpagewoetex}{No option for package turnthepage\MessageBreak%
+ (or turnpagewoetex) choosen!\MessageBreak%
+ There will be no information regarding\MessageBreak%
+ the need to turn the page!\MessageBreak%
+ }
+\fi
+
+\AtBeginShipout{%
+\AtBeginShipoutUpperLeft{%
+ \ifodd\value{CurrentPage}
+ % The \value{CurrentPage} is already 1 higher than the current page number here.
+ \else
+ \ifnum\value{pagesLTS.pagenr}>\value{CurrentPage}
+ \dimen1=1in
+ \advance\dimen1 by \textwidth
+ \advance\dimen1 by \oddsidemargin
+ \dimen3=1in
+ \advance\dimen3 by \topmargin
+ \advance\dimen3 by \headheight
+ \advance\dimen3 by \headsep
+ \advance\dimen3 by \textheight
+ \advance\dimen3 by \footskip
+ \put(\dimen1,-\dimen3){\llap{\turnthepage}}%
+ \fi%
+ \fi%
+}} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty b/Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty
index d987e55f87b..554cd6fce20 100644
--- a/Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty
+++ b/Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty
@@ -1,50 +1,34 @@
-%% This is file `turnthepage.sty' v1.2 by Merciadri Luca.
-% Thanks to Marc van Dongen for his help.
+% This is file `turnthepage.sty' v1.3a by Merciadri Luca.
+% Thanks to Marc van Dongen and Martin Muench for their help.
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{turnthepage}[2011/01/31 Indicating to turn the page]
-\PackageInfo{turnthepage}{This is turnthepage.}
-\RequirePackage{atbegshi}
-\RequirePackage{picture}
-\RequirePackage{zref-abspage}
-\RequirePackage{zref-lastpage}
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{turnthepage}[2011/03/24 v1.3a
+ Loading turnthepage package (LM)]
-\DeclareOption{short}{%
-\providecommand{\turnthepage}{/\ldots}
-}
-
-\DeclareOption{english}{%
-\providecommand{\turnthepage}{\textit{Turn the page.}}
-}
-
-\DeclareOption{francais}{%
-\providecommand{\turnthepage}{\textit{Tournez la page.}}
-}
-
-\DeclareOption{nederlands}{%
-\providecommand{\turnthepage}{\textit{Sla de pagina om.}}
-}
-
-\DeclareOption{deutsch}{%
-\providecommand{\turnthepage}{\textit{Bitte wenden.}}
-}
-
-\AtBeginShipout{%
-\AtBeginShipoutUpperLeft{%
- \ifodd\c@page
- \ifnum\zref@extract{LastPage}{abspage}>\c@abspage
- \dimen1=1in
- \advance\dimen1 by \textwidth
- \advance\dimen1 by \oddsidemargin
- \dimen3=1in
- \advance\dimen3 by \topmargin
- \advance\dimen3 by \headheight
- \advance\dimen3 by \headsep
- \advance\dimen3 by \textheight
- \advance\dimen3 by \footskip
- \put(\dimen1,-\dimen3){\llap{\turnthepage}}%
- \fi\fi%
-}}
+\DeclareOption{short}{\providecommand{\turnp@geoption}{short}}
+\DeclareOption{english}{\providecommand{\turnp@geoption}{english}}
+\DeclareOption{francais}{\providecommand{\turnp@geoption}{francais}}
+\DeclareOption{nederlands}{\providecommand{\turnp@geoption}{nederlands}}
+\DeclareOption{deutsch}{\providecommand{\turnp@geoption}{deutsch}}
\ProcessOptions
-\relax
+
+\ifx\turnp@geoption\undefined
+ \providecommand{\turnp@geoption}{ }
+\fi
+
+\newif\ifetex
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname eTeXversion\endcsname\relax
+ \etexfalse
+\else
+ \etextrue
+\fi
+
+\ifetex
+ \PackageInfo{turnthepage}{e-TeX found, loading package turnpageetex.}
+ \RequirePackage[\turnp@geoption]{turnpageetex}
+\else
+ \PackageInfo{turnthepage}{e-TeX not found, loading package turnpagewoetex.}
+ \RequirePackage[\turnp@geoption]{turnpagewoetex}
+\fi \ No newline at end of file