Debian Codegraph @

texmf-dist/doc/latex/aiaa/pre2004/demos/talk/smptalk.sty

raw
1 %
2 % `smptalk.sty' custom commands and settings used to make slides
3 %
4 % for use with `smptalk.tex' via \usepackage{smptalk}
5 %
6 % this is an example of a `package'. in this case, it merely
7 % defines some macros which are useful when making slides.
8 % one doesn't really need the next three, or the last command
9 % in this package, these are just formalities.
10
11 \NeedsTeXFormat{LaTeX2e}
12 \ProvidesPackage{smptalk}[1997/02/20 v0.1a Sample user-developed package (BK)]
13 \typeout{Package: smptalk v0.1a <1997/02/20> (Bil Kleb)}
14
15 % turn off page numbers:
16
17 \pagestyle{empty}
18
19 % in general, we don't want filled and hyphenated output on slides:
20
21 \raggedright
22
23 % make sure we have the graphicx package loaded
24 % since it is used to include figures:
25
26 \RequirePackage{graphicx}
27
28 % define a command to include figures:
29 % use: \incfig{epsfigure} or \incfig[2in]{epsfigure}
30
31 \newcommand{\incfig}% - name of command
32 [2]% - number of arguments
33 [\linewidth]% - default value for optional 1st argument
34 {% - begin definition
35 \centering% - center figure
36 \includegraphics% - graphicx's include command
37 [width=#1,% - set graphic width
38 keepaspectratio]% - leave aspect ratio alone
39 {#2}% - name of figure
40 }% - end definition
41
42 % un-comment one of the following to use Helvetica or Times
43 % fonts in place of Computer Modern (requires psfont distribution):
44 %\RequirePackage{times}
45 %\RequirePackage{helvetic}
46
47 % redefine an old command to make titles for each slide:
48 % use: \title{This is the Large, Centered Slide Title}
49
50 \renewcommand{\title}% - name of command
51 [1]% - number of arguments
52 {% - begin definition
53 \bgroup% - begin a local group
54 \centering% - turn on centering
55 \large\bf% - select font
56 #1% - insert title text
57 \par% - end a paragraph (skip \parsep)
58 \egroup% - terminate local group
59 }% - complete definition
60
61 % define new itemize-like environment
62 % to make the vertical spacing tighter:
63
64 \newenvironment{items}% - define a new environment
65 {% - begin beginning definition
66 \begin{itemize}% - revamp the itemize environment
67 \raggedright% - don't hyphenate/fill lines
68 \setlength{\itemsep}% - space between items
69 {2pt plus 2pt minus 1pt}% (rubber length)
70 \setlength{\parskip}% - space between list and body
71 {4pt plus 2pt minus 2pt}% (rubber length)
72 \setlength{\parsep}% - paragraphs within items
73 {2pt plus 2pt minus 1pt}% (rubber length)
74 }% - close beginning definition
75 {\end{itemize}}% - ending definition
76
77 % make a description-like environment which
78 % justifies the labels according to an optional
79 % parameter and allows hyphenation of the labels
80
81 \newenvironment{describe}[1][1.25in]%
82 {\begin{list}{}%
83 {\renewcommand{\makelabel}{\describelabel}%
84 \setlength{\labelwidth}{#1}%
85 \setlength{\leftmargin}{\labelwidth}%
86 \addtolength{\leftmargin}{\labelsep}%
87 \setlength{\itemsep}{2pt plus 2pt minus 1pt}%
88 \setlength{\parskip}{4pt plus 2pt minus 2pt}%
89 \setlength{\parsep}{2pt plus 2pt minus 1pt}}}%
90 {\end{list}}
91 \newcommand{\describelabel}[1]%
92 {\raisebox{0pt}[1ex][0pt]{\makebox[\labelwidth][l]%
93 {\parbox[t]{\labelwidth}{\hspace{0pt}\textbf{#1:}}}}}
94
95 % tell them we're through messing around, and get on with it:
96
97 \endinput