summaryrefslogtreecommitdiff
path: root/macros/generic/occam/PlainEx2/harvtst.doc
blob: db5134f2f3654c22820dbe74d9bc93ed2e6d8083 (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


  %%%%%  harvtst.doc


HARVTST.DIR CONTENTS AND DOCUMENTATION:

harvmac.occ               20K  
harvmac.tex               20K 
harvtst.doc               2K 
W.sty                     6K 
W.tex                     68K
witten94.tex              68K

Other tools needed (from Occam)

auditor.tex               18K 
defstrip
occam.spc

This is a sample application of the Occam utility.

A) INPUT files were 
 --- harvmac.tex Paul Ginsparg's preprint macro package based on
Plain TeX and designed for physics preprints.
 --- witten.tex a preprint of Edward Witten, posted in November 1994
on Ginsparg's preprint server tp://xxx.lanl.gov.

B) OUTPUT files were:
 --- W.sty essentially a subset of those macros in harvmac.tex
that are needed in witten.tex
 --- W.tex essentially witten.tex with unused macros eliminated
from the header; there is no change at all in the body of the article.

C) TOOL files (from the Occam distribution) were:
--- auditor.tex TeX utility
--- "defstrip" TeX utility currently a Mac QUEDM macro package. 
--- harvmac.occ a version of harvmac.tex in Occam format as
described in occam.spc and below.  This file would normally be
supplied by the macro file's author, since it should be carefully
prepared, and can serve all users of harvmac.tex

   The aim is to to get (C) from (A) + (B).  What good is that?
--- If a publisher wants to use macros from harvmac.tex
but is not familiar with that package, then use of W.sty
will save him time.
--- W.sty is so simple and small (10% of the whole or less than
average sales tax in the 1990's) that it can be archived with
W.tex; then future changes to harvmac.tex will not cause
disruption.

   Here is the transformation recipe.

 --- Make a copy WW.sty of harvmac.occ and append the macro
header of witten94.tex to it.  Save witten94.tex as W.tex after
replacing its header by 

 ------------

 %Paper: ftp://xxx.lanl.gov//hep-th/9411102
 %From: WITTEN@sns.ias.edu
 %Date: 14 Nov 1994 22:09:04 -0400 (EDT)
 
  \input WW.sty  %% unsimplified style file
  %\input W.sty  %% simplified style file
  %% input one of two
 
 \Title{hep-th/9411102, IASSNS-HEP-94-96}
 etc.

 ------------------------

 --- append to WW.sty format, the header macros of
witten94.tex at the end, formatting as as occam.spc
indicates, namely as follows:

 ------------------------

\Def\underarrow#1{\vbox{\ialign{##\crcr$\hfil\displaystyle
   {#1}\hfil$\crcr\noalign{\kern1pt
   \nointerlineskip}$\longrightarrow$\crcr}}}%_
  % use of underarrow
  %A~~~\underarrow{a}~~~B
  \newcount\figno \figno=0

 \Def\fig#1#2#3{%
 \par\begingroup\parindent=0pt\leftskip=1cm
 \rightskip=1cm\parindent=0pt
 \baselineskip=11pt
 \global\advance\figno by 1
 \midinsert
 \epsfxsize=#3
 \centerline{\epsfbox{#2}}%
 \vskip 12pt
 {\bf Fig. \the\figno:} #1\par
 \endinsert\endgroup\par
 }%_

 \Def\figlabel#1{\xdef#1{\the\figno}}%_
 \Def\encadremath#1{\vbox{\hrule\hbox{\vrule\kern8pt\vbox{\kern8pt
   \hbox{$\displaystyle #1$}\kern8pt}
   \kern8pt\vrule}\hrule}}%_
 
 \overfullrule=0pt
 
 %macros
 %
 \Def\tilde{\widetilde}%_
 \Def\bar{\overline}%_
 \Def\np#1#2#3{Nucl. Phys. {\bf B#1} (#2) #3}%_
 \Def\pl#1#2#3{Phys. Lett. {\bf #1B} (#2) #3}%_
 \Def\prl#1#2#3{Phys. Rev. Lett.{\bf #1} (#2) #3}%_
 \Def\physrev#1#2#3{Phys. Rev. {\bf D#1} (#2) #3}%_
 \Def\ap#1#2#3{Ann. Phys. {\bf #1} (#2) #3}%_
 \Def\prep#1#2#3{Phys. Rep. {\bf #1} (#2) #3}%_
 \Def\rmp#1#2#3{Rev. Mod. Phys. {\bf #1} (#2) #3}%_
 \Def\cmp#1#2#3{Comm. Math. Phys. {\bf #1} (#2) #3}%_
 \Def\mpl#1#2#3{Mod. Phys. Lett. {\bf #1} (#2) #3}%_
 \Def\Lam#1{\Lambda_{#1}}%_
 \Def\pf{{\rm Pf ~}}%_
 \Font\zfont = cmss10 %scaled \magstep1 %_
 \Font\litfont = cmr6 %_
 \Font\fvfont=cmr5 %_
 \Def\bigone{\hbox{1\kern -.23em {\rm l}}}%_
 \Def\ZZ{\hbox{\zfont Z\kern-.4emZ}}%_
 \Def\half{{\litfont {1 \over 2}}}%_
 \Def\mx#1{m_{\hbox{\fvfont #1}}}%_
 \Def\gx#1{g_{\hbox{\fvfont #1}}}%_
 \Def\gG{{\cal G}}%_
 \Def\lamlam#1{\langle S_{#1}\rangle}%_
 \Def\CM{{\cal M}}%_
 \Def\Re{{\rm Re ~}}%_
 \Def\Im{{\rm Im ~}}%_
 \Def\lfm#1{\medskip\noindent\item{#1}}%_

 ------------------------

Headers like this usually contain a high proportion unused macros.
This example is no exception.

 --- compose under Plain TeX the file W.tex. Note that the file
auditor.tex is called to examine which macros of WW.sty
are really used.

 --- "defstrip" the file WW.sty in the presence of the resulting list
of macros audit.lst. (The "defstrip" macros currently operate under
QEDM; ultimately "defstrip" will be a TeX utility and TeX will replace
QEDM.)  The result is a simplified macro file; call it output1. Put
output1 back through "defstrip" once to get output2. The second pass
gains an extra 10% of compactness and perfect tidyness; it uses
the file audit.lst as modified by the first pass; beware that
audit.lst is changing slightly as some * become # but one can 
always get back to the original by changing all # to *. Save the final
output as W.sty.  In general, the number of passes needed is the number
of stars on the final macro \ITERATIONCOUNTER in audit.lst.


 --- change the header of W.tex to input W.sty rather than WW.sty:

 %\input WW.sty
 \input W.sty

Then compose the file W.tex under Plain TeX, checking that the
printed result is unchanged.

 --- the (tiny!) shrunken form of the header material from
witten94.tex can now be restored to the header of W.tex; it is indeed
best to separate the Ginsparg macros from IAS macros.