1 |
cnh |
1.1 |
%% |
2 |
|
|
%% This is file `ldump.sty', |
3 |
|
|
%% |
4 |
|
|
%% for creating dumps of LaTeX formats, with all packages |
5 |
|
|
%% loaded and most package options activated. |
6 |
|
|
%% |
7 |
|
|
%% by Ross Moore <ross@mpce.mq.edu.au> |
8 |
|
|
%% version 1.0 created: 95/09/16 |
9 |
|
|
%% |
10 |
|
|
%% version 1.1 revised: 97/08/23 |
11 |
|
|
%% for compatibility with LaTeX-2e, up to 1997/02/21 |
12 |
|
|
%% |
13 |
|
|
%% version 1.2 revised: 97/09/25 |
14 |
|
|
%% has pre-loading of math-fonts information |
15 |
|
|
%% |
16 |
|
|
%% version 1.3 revised: 97/10/02 |
17 |
|
|
%% relax 2nd + later occurrences of \latexdump |
18 |
|
|
%% |
19 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
20 |
|
|
\NeedsTeXFormat{LaTeX2e} |
21 |
|
|
\ProvidesPackage{ldump} [1997/10/02 v1.3 |
22 |
|
|
LaTeX environment dumps] |
23 |
|
|
\DeclareOption{nodump}{\AtBeginDocument{\let\dump=\relax}} |
24 |
|
|
|
25 |
|
|
% |
26 |
|
|
% Designed for versions up to {1997/02/21} |
27 |
|
|
% |
28 |
|
|
% compatibility with version {1994/06/01} |
29 |
|
|
% ... |
30 |
|
|
\ifx\every@math@size\undefined |
31 |
|
|
\let\every@math@size=\every@size \fi |
32 |
|
|
% |
33 |
|
|
% |
34 |
|
|
% compatibility with version {1994/12/01} |
35 |
|
|
% ... |
36 |
|
|
\ifx\G@refundefinedfalse\undefined |
37 |
|
|
\def\G@refundefinedfalse{\let\@refundefined\relax}\fi |
38 |
|
|
\ifx\@multiplelabelsfalse\undefined |
39 |
|
|
\def\@multiplelabelsfalse{\let\@multiplelabels\relax}\fi |
40 |
|
|
% |
41 |
|
|
% |
42 |
|
|
% This is the replacement for \document |
43 |
|
|
% |
44 |
|
|
\def\ldump@document{\endgroup |
45 |
|
|
\ifx\@unusedoptionlist\@empty\else |
46 |
|
|
\@latex@warning@no@line{Unused global option(s):^^J% |
47 |
|
|
\@spaces[\@unusedoptionlist]}% |
48 |
|
|
\fi |
49 |
|
|
\@colht\textheight |
50 |
|
|
\@colroom\textheight \vsize\textheight |
51 |
|
|
\columnwidth\textwidth |
52 |
|
|
\@clubpenalty\clubpenalty |
53 |
|
|
\if@twocolumn |
54 |
|
|
\advance\columnwidth -\columnsep |
55 |
|
|
\divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue |
56 |
|
|
\fi |
57 |
|
|
\hsize\columnwidth \linewidth\hsize |
58 |
|
|
% |
59 |
|
|
% Check the fonts now if there's no \latexdump command |
60 |
|
|
% Nevertheless there is a 2nd check later for |
61 |
|
|
% any new fonts added subsequently. |
62 |
|
|
% |
63 |
|
|
\ifx\has@ldump\relax\else\expandafter\process@table\fi |
64 |
|
|
% |
65 |
|
|
% copy the reference to \@begindocumenthook |
66 |
|
|
% empty \@begindocumenthook and use the copy. |
67 |
|
|
% kill them both when done. |
68 |
|
|
% |
69 |
|
|
\let\@begindocumenthook@=\@begindocumenthook |
70 |
|
|
%%% Why \global ? (versions 1995+ ) |
71 |
|
|
\global\let\@begindocumenthook\@empty |
72 |
|
|
\@begindocumenthook@ |
73 |
|
|
%%% Why \global ? (versions 1995+ ) |
74 |
|
|
\global\let\@begindocumenthook\@undefined |
75 |
|
|
\let\@begindocumenthook@\@undefined |
76 |
|
|
% |
77 |
|
|
\begingroup\@floatplacement\@dblfloatplacement |
78 |
|
|
\makeatletter\let\@writefile\@gobbletwo |
79 |
|
|
%% \global \let \@multiplelabels \relax |
80 |
|
|
\global\@multiplelabelsfalse |
81 |
|
|
\@input{\jobname.aux}% |
82 |
|
|
\endgroup |
83 |
|
|
\if@filesw |
84 |
|
|
\immediate\openout\@mainaux\jobname.aux |
85 |
|
|
\immediate\write\@mainaux{\relax}% |
86 |
|
|
\fi |
87 |
|
|
% |
88 |
|
|
% 2nd font check if there's no \latexdump command |
89 |
|
|
% |
90 |
|
|
\ifx\has@ldump\relax\else\expandafter\process@table\fi |
91 |
|
|
% |
92 |
|
|
\let\glb@currsize\@empty %% Force math initialisation. |
93 |
|
|
\normalsize \the\every@math@size |
94 |
|
|
\everypar{}% |
95 |
|
|
%% |
96 |
|
|
%% this part is for compatibility with a |
97 |
|
|
%% patchlevel of LaTeX (1997/02/21) |
98 |
|
|
%%%%%%%%%% |
99 |
|
|
\ifx\normalsfcodes\@empty |
100 |
|
|
\ifnum\sfcode`\.=\@m |
101 |
|
|
\let\normalsfcodes\frenchspacing |
102 |
|
|
\else |
103 |
|
|
\let\normalsfcodes\nonfrenchspacing |
104 |
|
|
\fi |
105 |
|
|
\fi |
106 |
|
|
%%%%%%%%%% |
107 |
|
|
\@noskipsecfalse |
108 |
|
|
%% \let \@refundefined \relax |
109 |
|
|
\G@refundefinedfalse |
110 |
|
|
\let\AtBeginDocument\@firstofone |
111 |
|
|
% |
112 |
|
|
% execute the code in \@fterbegindocumenthook |
113 |
|
|
% then kill the hook |
114 |
|
|
% |
115 |
|
|
%% \@begindocumenthook |
116 |
|
|
%%% Why \global ? (versions 1995+ ) |
117 |
|
|
%% \global\let\@begindocumenthook\@undefined |
118 |
|
|
\@fterbegindocumenthook |
119 |
|
|
%%% Why \global ? (versions 1995+ ) |
120 |
|
|
\global\let\@fterbegindocumenthook\@undefined |
121 |
|
|
% |
122 |
|
|
% |
123 |
|
|
\ifdim\topskip<1sp \global\topskip1sp\relax\fi |
124 |
|
|
\ifx\@maxdepth\undefined |
125 |
|
|
\else \global\@maxdepth\maxdepth \fi |
126 |
|
|
% |
127 |
|
|
\ifx\@listfiles\@undefined |
128 |
|
|
\global\let\@filelist\relax |
129 |
|
|
\global\let\@addtofilelist\@gobble |
130 |
|
|
\fi |
131 |
|
|
%%% Why \global ? (version (1997/02/21) ) |
132 |
|
|
\gdef\do##1{\global\let ##1\@notprerr}% |
133 |
|
|
\@preamblecmds |
134 |
|
|
\global\let \@nodocument \relax |
135 |
|
|
\global\let\do\noexpand |
136 |
|
|
\ignorespaces} |
137 |
|
|
% |
138 |
|
|
% establish the hook, and its user-interface. |
139 |
|
|
% |
140 |
|
|
\let\@fterbegindocumenthook=\@empty |
141 |
|
|
\def\AfterBeginDocument{\g@addto@macro\@fterbegindocumenthook} |
142 |
|
|
% |
143 |
|
|
% |
144 |
|
|
% This is the replacement for |\documentclass| on reruns... |
145 |
|
|
% |
146 |
|
|
\long\def\ldump@skiptobegin#1\latexdump{% |
147 |
|
|
\let\latexdump=\relax} |
148 |
|
|
% |
149 |
|
|
% ...and this installs it all on the first run |
150 |
|
|
% |
151 |
|
|
\def\latexdump{% |
152 |
|
|
\let\has@ldump=\relax |
153 |
|
|
\let\latexdump=\relax |
154 |
|
|
\let\document=\ldump@document |
155 |
|
|
\let\documentclass=\ldump@skiptobegin |
156 |
|
|
\let\documentstyle=\ldump@skiptobegin |
157 |
|
|
\ifx\AtBeginDocument\@notprerr\expandafter\dump |
158 |
|
|
\else |
159 |
|
|
\AtBeginDocument{\ldump@checkfonts\csname dump\endcsname}% |
160 |
|
|
\AfterBeginDocument{}% |
161 |
|
|
\fi } |
162 |
|
|
% |
163 |
|
|
% This initiates the main font-loading, just prior to \dump |
164 |
|
|
% |
165 |
|
|
\def\ldump@checkfonts{\process@table |
166 |
|
|
\let\cdp@list=\@empty |
167 |
|
|
\check@mathfonts\relax } |
168 |
|
|
% |
169 |
|
|
% |
170 |
|
|
% |
171 |
|
|
\@onlypreamble\ldump@skiptobegin |
172 |
|
|
\@onlypreamble\ldump@document |
173 |
|
|
\@onlypreamble\latexdump |
174 |
|
|
\@onlypreamble\ldump@checkfonts |
175 |
|
|
% |
176 |
|
|
% |
177 |
|
|
\ProcessOptions* |
178 |
|
|
\endinput |
179 |
|
|
%% |
180 |
|
|
%% End of file `ldump.sty'. |