| 1 |
%% port-sample-slide.tex |
| 2 |
%% Copyright 2013 Behzad Salimi |
| 3 |
% |
| 4 |
% This work may be distributed and/or modified under the |
| 5 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 6 |
% of this license or any later version. |
| 7 |
% The latest version of this license is in |
| 8 |
% http://www.latex-project.org/lppl.txt |
| 9 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 10 |
% version 2005/12/01 or later. |
| 11 |
% |
| 12 |
% This work has the LPPL maintenance status `maintained'. |
| 13 |
% |
| 14 |
% The Current Maintainer of this work is Behzad Salimi |
| 15 |
% sites.google.com/site/quadratures |
| 16 |
% |
| 17 |
% This work consists of the files: |
| 18 |
% |
| 19 |
% land-sample-slide.pdf |
| 20 |
% land-sample-slide.tex |
| 21 |
% port-sample-slide.pdf |
| 22 |
% port-sample-slide.tex |
| 23 |
% sslides.cls |
| 24 |
|
| 25 |
\documentclass{sslides} |
| 26 |
\usepackage{graphics} |
| 27 |
|
| 28 |
\addtolength{\topmargin}{-15mm} |
| 29 |
\setlength{\textheight}{9.25in} |
| 30 |
\setlength{\textwidth}{7.00in} |
| 31 |
\setlength{\oddsidemargin}{-0.25in} |
| 32 |
% \addtolength{\headheight}{4mm} |
| 33 |
% \setlength\evensidemargin{0mm} |
| 34 |
% \setlength{\parindent}{0mm} |
| 35 |
% \addtolength{\parskip}{2mm} |
| 36 |
|
| 37 |
\renewcommand{\thefootnote}{\fnsymbol{footnote}} |
| 38 |
\newcommand{\foot}[1]{\footnote{#1}% |
| 39 |
\ifthenelse{\value{footnote}=9}{\setcounter{footnote}{0}}{}} |
| 40 |
|
| 41 |
\newsavebox{\tl} |
| 42 |
\newcommand{\topleft}[1]{\savebox{\tl}{\tiny #1}} |
| 43 |
\newcommand{\tleft}{\usebox{\tl}} |
| 44 |
\newsavebox{\tc} |
| 45 |
\newcommand{\topcenter}[1]{\savebox{\tc}{\tiny #1}} |
| 46 |
\newcommand{\tcenter}{\usebox{\tc}} |
| 47 |
\newsavebox{\tr} |
| 48 |
\newcommand{\topright}[1]{\savebox{\tr}{\tiny #1}} |
| 49 |
\newcommand{\tright}{\usebox{\tr}} |
| 50 |
|
| 51 |
\newsavebox{\bl} |
| 52 |
\newcommand{\footleft}[1]{\savebox{\bl}{\tiny #1}} |
| 53 |
\newcommand{\bleft}{\usebox{\bl}} |
| 54 |
\newsavebox{\bc} |
| 55 |
\newcommand{\footcenter}[1]{\savebox{\bc}{\tiny #1}} |
| 56 |
\newcommand{\bcenter}{\usebox{\bc}} |
| 57 |
|
| 58 |
% \newsavebox{\br} |
| 59 |
% \newcommand{\footright}[1]{\savebox{\br}{\tiny #1}} |
| 60 |
% \newcommand{\bright}{\usebox{\br}} |
| 61 |
% uncomment above three lines to use \footright{} |
| 62 |
|
| 63 |
|
| 64 |
% Use this portion to create any header or footer style. |
| 65 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 66 |
\oddh{% |
| 67 |
\parbox[t]{\textwidth}{% |
| 68 |
{\makebox[10mm][l]{\tleft}\hfill\makebox[10mm][c]{\tcenter} |
| 69 |
\hfill\makebox[10mm][r]{\tright}}\\[-9mm] |
| 70 |
\makebox[0mm]{\ }\hrulefill}} |
| 71 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 72 |
\oddf{\parbox[b]{\textwidth}{\hrulefill\vspace{-5mm}\newline% |
| 73 |
{\makebox[10mm][l]{\bleft}\hfill\makebox[10mm][c]{\bcenter}\hfill |
| 74 |
\makebox[10mm][r]{\tiny\theslide}}}} |
| 75 |
% \makebox[10mm][r]{\bright}}}} % replace with the line above, |
| 76 |
% then use \footright{...} for a fixed field in the right footer |
| 77 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 78 |
|
| 79 |
% commands to set header/footer: |
| 80 |
% \topleft{} |
| 81 |
% \topcenter{} |
| 82 |
% \topright{} |
| 83 |
% \footleft{} |
| 84 |
% \footcenter{} |
| 85 |
% \footright{} |
| 86 |
|
| 87 |
% \onlyslides{3} |
| 88 |
\begin{document} |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
\begin{slide} |
| 93 |
\thispagestyle{empty} |
| 94 |
|
| 95 |
\begin{center} |
| 96 |
{\large\LaTeX\\ |
| 97 |
Slide Class\\ |
| 98 |
with\\ |
| 99 |
Header and Footer}\\[7mm] |
| 100 |
\normalfont\normalsize |
| 101 |
Behzad Salimi\\[1mm] |
| 102 |
{\small sites.google.com/site/quadratures} |
| 103 |
\end{center} |
| 104 |
|
| 105 |
\ |
| 106 |
|
| 107 |
\centerline{Abstract} |
| 108 |
\vspace{-7mm} |
| 109 |
A simple slide ``documentclass" to use the standard \LaTeX\ |
| 110 |
slide class with the added option of including header and footer. |
| 111 |
|
| 112 |
\end{slide} |
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
\topleft{\raisebox{1mm}{\LaTeX}} |
| 117 |
\topcenter{sslides class} |
| 118 |
\topright{\today} |
| 119 |
\footleft{sites.google.com/site/quadratures} |
| 120 |
% \footcenter{x} |
| 121 |
%\footright{\theslide} % this position is reserved to advance page number |
| 122 |
\begin{slide} |
| 123 |
\centerline{\textbf{\LaTeX\ slides with header/footer}} |
| 124 |
|
| 125 |
The standard \LaTeX\ {\tt slide} class offers a very clean, sharp |
| 126 |
and easy-to-read font for slides. However, the standard class does |
| 127 |
not have a provision for including header and footer on slides. |
| 128 |
|
| 129 |
The slide class {\tt sslides} allows creation of arbitrary header |
| 130 |
and footer while preserving all of the functionality of the |
| 131 |
standard {\tt slide} class. |
| 132 |
|
| 133 |
\LaTeX\ code can be used to generate any header and footer. The |
| 134 |
{\tt .tex} file for this manual provides a simple example of |
| 135 |
creating a template to independently specify the left-, center-, |
| 136 |
or right-region of both header and footer. |
| 137 |
|
| 138 |
% In the example file, the right footer region is reserved for page number, but this can |
| 139 |
% be easily changed. |
| 140 |
|
| 141 |
\end{slide} |
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
\topcenter{Example Slide} |
| 153 |
% \footcenter{Example Slide} |
| 154 |
\begin{slide} |
| 155 |
|
| 156 |
\centerline{\textbf{How to use}} |
| 157 |
Copy the class file {\tt sslides.cls} |
| 158 |
% (that came with this package) |
| 159 |
in a directory visible to \LaTeX, for example, the current |
| 160 |
directory where the slide file is run. The following two commands |
| 161 |
in the slide input file generate header and footer:\\ |
| 162 |
{\small\verb+\oddh{ . . . }+\hfill |
| 163 |
{\footnotesize generates text/objects in the header;}\\ |
| 164 |
\verb+\oddf{ . . . }+\hfill |
| 165 |
{\footnotesize generates text/objects in the footer}.}\\ |
| 166 |
The header/footer specified will show on all slides until they are |
| 167 |
changed. |
| 168 |
|
| 169 |
\ |
| 170 |
|
| 171 |
\centerline{\textbf{Example}} |
| 172 |
{\small |
| 173 |
\begin{verbatim} |
| 174 |
\documentclass{sslides} |
| 175 |
\oddh{ header field } |
| 176 |
\oddf{ footer field } |
| 177 |
\begin{slide} |
| 178 |
. . . body of slide . . . |
| 179 |
\end{slide} |
| 180 |
\end{document} |
| 181 |
\end{verbatim} |
| 182 |
} |
| 183 |
\end{slide} |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
\end{document} |
| 210 |
|