summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/seminar/latex/seminar.bug
blob: a0aafe664fc0a5f04ab959361e67c9843b0ac1e7 (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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
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
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%%
%% BEGIN seminar.bug
% LAST MODIFIED: December 1997
% The latest version of this file can be obtained from Princeton.EDU.

% This file list some bugs and latebreaking news for seminar.sty,
% version 1.0, released April 1, 1993.

% 1. Typo in the user's guide: \espfslidesize should be \epsfslidesize.

% 2. fancyheadings.sty does not work well with slides.
%    WORKAROUND: Ignore the footnote in the User's Guide that discusses this.
%    Instead:
%
%     - If you want the width of the header to be "\textwidth"
%       (the usual state of affairs), then put
%
%          \renewcommand{\headwidth}{\textwidth}
%
%       in the preamble and do not change "\headwidth" after that.
%
%     - If you want to set the width to something else, then you have to scale
%       it appropriately. E.g., use
%
%          \setslidelength{\headwidth}{<dim>}
%
%       or, if are using the "fancy" page style with both the article and
%       slides formats, use
%          \ifarticle
%            \setartlength{\headwidth}{<dim1>}
%          \else
%            \setslidelength{\headwidth}{<dim2>}
%          \fi

% 3. Some people prefer that the headers/footers automatically adjust their
%    size to the width of the framed slide (I don't, which I guess is why
%    seminar.sty does not work this way.) I have added an option for this.
%    Put the command
%
%      \autoslidemarginstrue
%
%    in the preamble. You must also input this file (seminar.bug), which
%    contains the patch.

% 4. The optional argument in \twoup[int] does not work with the
%    portrait option and slides format.
%    PATCH: Input this file.

% 5. Slide labels can come out in the wrong size font.
%    PATCH: Input this file.

% 6. When \newslide is used inside a list environment, subsequent nested
%    list environments can have the wrong line width.
%    PATCH: Input this file.

% 7. \overlaypagestyle and \layerpagestyle commands ignored.
%    PATCH: Input this file, AFTER inputting semlayer.sty.

% 8. boxedEPS.tex won't work inside slide environments (because seminar.sty
%    erroneously modifies \read so that it is preceded by \immediate).
%    PATCH: Input this file.

%%%% PATCHES

\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11

% 3.
\newif\ifautoslidemargins
\ifarticle\else
  \def\output@slide{%
    \begingroup
      \hoffset=-\inverseslidesmag in
      \voffset=-\inverseslidesmag in
      \setslidelength\@tempdima{%
        \ifportrait\paperwidth\else\paperheight\fi}%
      \setslidelength\@tempdimb{%
        \ifportrait\paperheight\else\paperwidth\fi}%
      \ifrotateheaders
        \@ifrotateslide{%
          \dimen@=\@tempdima
          \@tempdima=\@tempdimb
          \@tempdimb=\dimen@}%
      \fi
      % \oddsidemargin, \evensidemargin, \headheight, \footheight
      % used for scratch:
      % Some page styles like to know \textwidth:
      \setslidelength\headheight\slidetopmargin
      \setslidelength\footheight\slidebottommargin
      \ifautoslidemargins
        \textwidth=\wd\@slidebox
        \oddsidemargin=\@tempdima
        \advance\oddsidemargin-\textwidth
        \divide\oddsidemargin 2
      \else
        \setslidelength\oddsidemargin\slideleftmargin
        \setslidelength\evensidemargin\sliderightmargin
        \textwidth=\@tempdima
        \advance\textwidth-\oddsidemargin
        \advance\textwidth-\evensidemargin
      \fi
      \setbox\@slidebox=\hbox to \@tempdima{%
        \kern\oddsidemargin
        \vbox to\@tempdimb{%
          \ifnum\fancyput@flag>-1
            \hbox{\kern-\oddsidemargin\do@fancyput}%
          \fi
          \let\label\@gobble
          \let\index\@gobble
          \let\glossary\@gobble
          \vbox to\headheight{%
            \vfill
            \hbox{%
              \slideheadfont\relax\strut
              \hbox to\textwidth{\@oddhead}}%
            \kern\z@}%
          \vfill
          \hbox to\textwidth{\hss\box\@slidebox\hss}%
          \vfill
          \vbox to\footheight{%
            \hbox{%
              \slidefootfont\relax\strut
              \hbox to\textwidth{\@oddfoot}}%
            \vfill}}%
        \hss}%
      \ifrotateheaders\@ifrotateslide\rotate@slide\fi
      \insert@specials
      \shipout\box\@slidebox
    \endgroup
    \let\firstmark\botmark}
  \@ifundefined{fancyput@flag}{\def\fancyput@flag{-1}}{}
\fi

% 4.
\ifarticle\else
  \ifportrait
    \def\@twoup[#1]{%
      \@tempcnta=\the@slidesmag\relax
      \@tempcntb=\@tempcnta
      \advance\@tempcntb by #1\relax
      \advance\@tempcntb by -3\relax
      \ifnum\@tempcntb>-6\relax
        \@@input 2up.tex
        \source{\@magstep\@tempcnta}{\paperwidth}{\paperheight}%
        \target{\@magstep\@tempcntb}{\paperheight}{\paperwidth}%
        \printlandscapetrue
      \else
        \@seminarerr{Slides magnification is too low for
          \string\twoup\space to handle}\@eha
      \fi
      \def\slidesmag##1{\@semtwoupmagerr\slidesmag}}
  \fi
\fi

% 5.
\def\reset@slideoutput{%
  \let\par\@@par
  \reset@font
  \normalsize
  \def\baselinestretch{1}%
  \@nameuse{1\@ptsize @semptsize}%
  \catcode`\ =10
  \let\-\@dischyph \let\'\@acci \let\`\@accii \let\=\@acciii}

% 6.
\def\extraslideheight#1{%
  \@tempdima #1\relax
  \edef\X@SlideHeight{\number\@tempdima sp}
  \ifslide\set@slideheight\fi}
\def\set@slideheight{%
  \iflandscape
    \vsize=\inverseslidesmag\slideheight
  \else
    \vsize=\inverseslidesmag\slidewidth
  \fi
  \edef\slide@vsize{\number\vsize sp}%
  \textheight\vsize
  \advance\vsize\X@SlideHeight\relax}
\def\newslide{%
  \par\penalty-\@M
  \def\do##1{\setcounter{##1}\z@}\slide@reset
  \the\before@newslide}

% 7. Must be input after semlayer.sty.
\def\layer@prep{%
  \ifarticle\else\pagestyle{\layer@pagestyle}\fi
  \let\thepage\thelayer
  \ifx\thelayerframe\@empty\else\let\theslideframe\thelayerframe\fi
  \let\slidelabel\layerlabel}
\def\overlay@prep{%
  \ifarticle\else\pagestyle{\overlay@pagestyle}\fi
  \let\thepage\theoverlay
  \ifx\theoverlayframe\@empty\else\let\theslideframe\theoverlayframe\fi
  \let\slidelabel\overlaylabel}


\catcode`\@=\TheAtCode\relax
\endinput
%% END seminar.bug