summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/turnthepage/turnthepage.tex
blob: 8a57f4c8fe23a595cbd910d53d6a249f168bf649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
\documentclass[10pt,a4paper,final,makeidx,twosides]{article}

\usepackage{atbegshi,refcount}
\usepackage{picture}

\usepackage{listings}

\usepackage{caption,lastpage}
%\captionsetup{figurename=Figure, tablename=Table}

\renewcommand{\captionfont}{\small}
\renewcommand{\captionlabelfont}{\bfseries}

\usepackage[protrusion=true,draft=false,final,verbose=true,babel=true]{microtype}

\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%
}}

\title{The \textbf{turnthepage} package}
\author{Merciadri Luca, Marc van Dongen}
\date{\today}

\usepackage{makeidx}

%% - HYPERREF PACKAGE - ** MUST be LAST ONE **
\usepackage[a4paper,bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=1,breaklinks=true,colorlinks=true,final,menucolor=red,pdfauthor={Merciadri Luca},pdfcreator={Merciadri Luca},pdfkeywords={math},pdftitle={The turnthepage package},pdfsubject={(La)TeX},pdftoolbar=true]{hyperref}
\hypersetup{urlcolor=red,linkcolor=blue,citecolor=blue,colorlinks=true}

\usepackage{breakurl}


%% -- INDEX GENERATION ACTIVATION --

\makeindex

%% -- INDEX GENERATION ACTIVATION --

\begin{document}


\maketitle

\tableofcontents

\newpage
\section{Introduction}
On some exams' sheets, some professors or lecturers like to indicate to the reader that the `page' can be turned. That avoids oversights to the student, thereby avoiding them cold sweat at the end of the exam, realizing that there were other questions they needed to answer. One might implement a \LaTeX{} mechanism so that each odd page (except the last one, if any) displays a message to turn the page. This mechanism can also be useful for different kinds of documents.

This package should thus be used for exams, or special documents printed `twoside.'

\section{Use}
\subsection{Loading the Package}
To \textit{load the package}, please use
\begin{center}
\begin{verbatim}
\usepackage[options]{turnthepage}
\end{verbatim}
\end{center}
\subsection{Available Options}
Without any option, the package will not be really useful, as it will not perform anything that will be nice for you. Consequently, the \textit{following options are available}:
\begin{itemize}
\item \verb|short|: will display `/\ldots' at the bottom of each odd page, in its right corner, \index{\texttt{short}}
\item \verb|long|: will display `\textit{Turn the page.}' at the bottom of each odd page, in its right corner. \index{\texttt{long}}
\end{itemize}
As the package calls \verb|\turnthepage| where it needs to be placed, you can define \verb|\turnthepage| as you want. For example, if you want a more polite way to say it, you can use
\begin{verbatim}
\renewcommand{\turnthepage}{\itshape Turn the page please.}
\end{verbatim}
after the preamble.

\section{Implementation}
Here is the code of \verb|turnthepage.sty|:
\lstset{language=TEX, basicstyle=\normalsize, keywordstyle=\bfseries, commentstyle=\itshape, keywords={}, emph={}, emphstyle=\bfseries, numbers=left, stringstyle=\ttseries, showstringspaces=false, stepnumber=2, numbersep=5pt, showspaces=false, showtabs=false, backgroundcolor=\color{white}}

%\begin{lstlisting}[frame=single]
\lstinputlisting[lastline=80]{turnthepage.forlisting}
%\end{lstlisting}

\section{Bugs}
There is currently only one `bug:'
\begin{itemize}
 \item Using a \verb|\setcounter| command will produce a missing number error.
\end{itemize}


\section{Version History}
\begin{enumerate}
 \item \verb v1.0 : package is introduced to the \LaTeX{} world (happy new 2011 year!),
\end{enumerate}

\section{Thanks}
Many thanks go to Marc van Dongen for his help at \cite{mvd1}.

\section{Contact}
If you have any question concerning this package (limitations, bugs, \ldots), please contact me at \href{mailto:Luca.Merciadri@student.ulg.ac.be}{Luca.Merciadri@student.ulg.ac.be}.

\newpage

\phantomsection
\printindex
% 
\newpage
\section{References}
\nocite{*}
\bibliographystyle{siam}
%\bibliographystyle{frplain}
%\bibliographystyle{alpha}
\label{biblio}
%\begin{multicols}{2}
\bibliography{turnthepage-bib}

\end{document}