summaryrefslogtreecommitdiff
path: root/web/tweb/texinput/slidelib.sty
blob: 44a6db7a6949b0bbb614bedda65a09cd6adfb009 (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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
\input verbatim
\shewembeddedspacesfalse
\let \canonicalverbatim = \verbatim
\let \canonicalmitabrev = \mitabrev
\def \verbatim
    {\begingroup \vskip \parskip \everypar = {}\canonicalverbatim}
\def \mitabrev {\canonicalmitabrev \endgroup}

%--------------
\hsize = 210 mm
\vsize = 297 mm
\hoffset = 2 cm
\voffset = 2 cm
\advance \hsize by -2 \hoffset
\advance \vsize by -2 \voffset
%--------------

\newif \iffinalrun

\def \finalrun
    {\finalruntrue
     \font \Textfont = cmss17
     \font \smc = cmtcsc10 at 17pt
     \baselineskip = 20pt
     \medskipamount = 5pt
     \font \inlineverbatimfont = cmtt12 at 17pt
     \font \displayverbatimfont = cmtt12 at 15pt
     \font \footlinefont = cmvtt10
     \font \msam = msam10 at 8pt
     \Textfont}

\def \checkrun
    {\finalrunfalse
     \font \Textfont = cmss10
     \font \smc = cmtcsc10 at 10pt
     \baselineskip = 12pt
     \medskipamount = 3pt
     \font \inlineverbatimfont = cmtt10
     \font \displayverbatimfont = cmtt8
     \font \footlinefont = cmvtt10
     \font \msam = msam10 at 6pt
     \Textfont}

\def \square {\raise 0,2ex\hbox{\msam\char'4}}

\let \FilBreak = \filbreak
\def \filbreak {\nobreak \line {}\FilBreak}

\newtoks \runningfootline
\footline = {\rightline {\footlinefont \the \runningfootline}}

\def \eg {e.g., \ignorespaces}
\def \ie {i.e., \ignorespaces}
\def \cm {\unskip \thinspace cm}
\def \stress #1{#1\/}

\let \canonicalshipout = \shipout
\def \shipout 
    {\advance \hoffset by -0.75 true in
     \advance \voffset by -1.5 true in
     \canonicalshipout}

\newbox \linebox
\newbox \slidebox
\def \slide {\afterassignment \setslide \setbox \slidebox = \hbox}
\def \setslide 
    {\aftergroup \reallysetslide
     \iffinalrun
        \font \thisfont = cmssbx10 at 15pt
        \font \inlineverbatimfont = cmtt12 at 15pt%
     \else
        \font \thisfont = cmssbx10
        \font \inlineverbatimfont = cmtt10%
     \fi
     \thisfont}
\def \reallysetslide
    {\filbreak
     \line {}
     \vfill
     \vskip -\baselineskip
    {\offinterlineskip
     \everypar = {}\noindent
     \copy \slidebox
     \vskip -0.5ex
     \noindent
     \leaders \hrule depth 0.125ex height 0pt\hskip \wd\slidebox\hbox{}
     \iffinalrun
        \vskip -0.625ex
     \else
        \vskip -1ex
     \fi
     \noindent\kern0.5in
     \leaders \hrule height 0.5ex\hskip 2in\hbox{}
     \medskip}
    }

\parindent = 0pt
\parskip = 1ex

\everypar = {\hangindent = 1em
             \hangafter = 1 
             \pretolerance = 9999
             \rightskip = 0pt plus 0.2\hsize
             \parfillskip = 0pt plus 0.8\hsize
             \linepenalty = 10000
             \hbox to \hangindent {\square\hfil}%
            }

%%% defs

\def \TuG {{\smc TUG}\spacefactor = 1000 }
\def \gust
    {{\smc GUST}\spacefactor = 1000 }

%%% now active punctuation is defined

\catcode `\^^M = \active %
\def ^^M{ }
\def \next {\let \spacechar = }
{\aftergroup \next} %

\def \activepunctuation #1%
    {\catcode `#1 = \active
     \lccode `\^^M = `#1
     \long \def \analysenextchar %
               {\afterassignment \analysechar \let \nextchar = }
     \lowercase {\global \def ^^M}{#1\analysenextchar}
     \def \analysechar %
         {\ifx \nextchar \spacechar %
              \def \next { \analysenextchar}%
          \else \ifx \nextchar ^^M%
                   \let \next = \par %
                \else %
                   \let \next = \nextchar %
                \fi %
          \fi %
          \next %
         }
    }

\activepunctuation :
\activepunctuation ;
\activepunctuation .
\activepunctuation ?
\activepunctuation !

\def \LP {L\kern-0,1emP}
\runningfootline {TUG\thinspace '95 / \folio}

\endinput