summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/orientation/orientation.sty
blob: e5f47922ba61f4ed76da9439689624b3a52dc9ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
\ProvidesPackage{orientation}[orientation 1.0]
% orientation package by Daniel Benjamin Miller <dbmiller@dbmiller.org>
% Made available under the CC-Zero Dedication, 2021
% For more info: https://creativecommons.org/publicdomain/zero/1.0/
\RequirePackage{everypage}
\makeatletter
\newcommand{\thispagelandscape}{\special{ps:[{ThisPage} <</Rotate 90>> /PUT pdfmark true}}
\newcommand{\thispageupsidedown}{\special{ps:[{ThisPage} <</Rotate 180>> /PUT pdfmark true}}
\newcommand{\thispagecounterlandscape}{\special{ps:[{ThisPage} <</Rotate 270>> /PUT pdfmark true}}
\newcommand{\thispageportrait}{\special{ps:[{ThisPage} <</Rotate 0>> /PUT pdfmark true}}
\newcommand{\setlandscape}{\AddEverypageHook{\special{ps:[{ThisPage} <</Rotate 90>> /PUT pdfmark true}}}
\newcommand{\setcounterlandscape}{\AddEverypageHook{\special{ps:[{ThisPage} <</Rotate 270>> /PUT pdfmark true}}}
\newcommand{\setupsidedown}{\AddEverypageHook{\special{ps:[{ThisPage} <</Rotate 180>> /PUT pdfmark true}}}
\newcommand{\setportrait}{\AddEverypageHook{\special{ps:[{ThisPage} <</Rotate 0>> /PUT pdfmark true}}}
\endinput