diff options
author | Karl Berry <karl@freefriends.org> | 2011-01-03 00:19:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-01-03 00:19:10 +0000 |
commit | db93bade3297f62b26ec2429216b594f5ffb29fe (patch) | |
tree | 97e2563ac3bfe1ba4c064b21edb2a7810db6f2a5 /Master/texmf-dist/tex/latex/turnthepage | |
parent | 14e63d2839a9294ddac0a976e33e8eabd87e0eba (diff) |
new latex package turnthepage (1jan11)
git-svn-id: svn://tug.org/texlive/trunk@20908 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/turnthepage')
-rwxr-xr-x | Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty b/Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty new file mode 100755 index 00000000000..dae7cec1d86 --- /dev/null +++ b/Master/texmf-dist/tex/latex/turnthepage/turnthepage.sty @@ -0,0 +1,38 @@ +%% This is file `turnthepage.sty' v1.0 by Merciadri Luca. +% Thanks to Marc van Dongen for his help. + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{turnthepage}[2011/01/01 Indicating to turn the page] +\PackageInfo{turnthepage}{This is turnthepage.} +\RequirePackage{atbegshi} +\RequirePackage{refcount} +\RequirePackage{picture} +\RequirePackage{lastpage} + +\DeclareOption{short}{% +\providecommand{\turnthepage}{/\ldots} +} + +\DeclareOption{long}{% +\providecommand{\turnthepage}{\textit{Turn the page.}} +} + +\AtBeginShipout{% +\AtBeginShipoutUpperLeft{% + \ifodd\thepage% + \ifnum\getpagerefnumber{LastPage}>\thepage% + \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% +}} + +\ProcessOptions +\relax
\ No newline at end of file |