I've been using groff for years (and still prefer it to LaTeX).  I'm
running on a Slackware Linux box.  In any event, one of the things I use
groff for is to convert various documents into html for my course sites.
The documents were designed to produce postscript, and this always works
as I expect.  Ususally this works fine, but sometimes it fails, for
reasons that I can't figure out.  I've attached a document that
generates postscript properly, specfically by using:

groff -ms -e -t groff.bug.doc > foo.ps

but fails when I try to make html:

groff -e -t -ms -Thtml groff.bug.doc > groff.bug.html
./groff.bug.doc:316: division by zero
./groff.bug.doc:325: fatal error: input stack limit exceeded (probable
infinite loop)

Among other things, there aren't 325 lines in the document.  Any
suggestions?

David


.nr LL 6.0i
.nr PO 1.25i
.nr PS 12
.nr VS 14.4
.EQ
gsize 12
delim $$
ndefine nonmember %{"\o'\(mo/'"}%
tdefine nonmember %{"\o'\(mo/'"}%
ndefine angst %{"A\v'-1m'\h'-1n'\s-2o\s+2\v'1m'"}%
tdefine angst %{"A\v'-1m'\h'-1n'\s-2o\s+2\v'1m'"}%
tdefine ppd '{{fat | back 41 \(ru}}'
ndefine ninf '{- inf}'
tdefine ninf '{- inf}'
ndefine -+ '{up 37 - back 75 down 5 +}'
tdefine -+ '{up 37 - back 75 down 5 +}'
ndefine // '{/ back 35 / }'
tdefine // '{/ back 35 / }'
ndefine <=> '{ ~< back 55 {= back 50{ = back 50{ = back 70 >}}}~}'
tdefine <=> '{ ~< back 55 {= back 50{ = back 50{ = back 70 >}}}~}'
tdefine <-> '{cpile {down 50 -> above up 50 <-}}'
ndefine <-> '{cpile {down 50 -> above up 50 <-}}'
ndefine ndash %-%
tdefine ndash %-%
ndefine 3sprime % ''' %
tdefine 3sprime % ''' %
ndefine 2sprime % '' %
tdefine 2sprime % '' %
ndefine sprime % ' %
tdefine sprime % ' %
ndefine rangle '>'
tdefine rangle '>'
ndefine rangle2 '>'
tdefine rangle2 'down 50 {size 20 >}'
ndefine case ''
tdefine case 'size -2'
ndefine langle '<'
tdefine langle '<'
ndefine langle2 '<'
tdefine langle2 'down 50 {size 20 <}'
ndefine open1 'fat 1'
tdefine open1 'fat 1'
ndefine scrF 'F'
tdefine scrF 'F'
ndefine scrD 'D'
tdefine scrD 'D'
ndefine scrH 'H'
tdefine scrH 'H'
ndefine scrI 'I'
tdefine scrI 'I'
ndefine scrL 'L'
tdefine scrL 'L'
ndefine scrN 'N'
tdefine scrN 'N'
ndefine vec %"\h'-1'\v'-1n'\(->\v'1n'"%
ndefine dyad %"\v'-1n'\h'-1.2'\(<-\h'-0.7'\(->\h'0.1'\v'1n'"%
ndefine approx %{"\v'-0.2m'\(ap\h'-1.0m'\v'+0.4m'\(ap\v'-0.2m'"}%
ndefine cdot %{"\v'-0.4m'\.\v'0.4m'"}%
ndefine ... %{"\v'-0.4m'\...\v'0.4m'"}%
tdefine ... %{"\v'-0.4m'\...\v'0.4m'"}%
ndefine int %{"\v'-0.5m'\(bs\v'1.0m'\h'-1.0m'\(co\v'-0.5m'"}%
ndefine sum '{pile {\(rg above \(ct }}'
ndefine >wig %{"\z>\v'0.75n'\h'\w'\(ap'u*3/16'\(ap\v'-0.75n'"}%
tdefine >wig 
%{">\kz\v'0.75n'\h'((-(\w'>'u)-(\w'\(ap'u))*1/2)'\(ap\v'-0.75n'\h'|\nzu'"}%
tdefine <wig 
%{"<\kz\v'0.75n'\h'((-(\w'<'u)-(\w'\(ap'u))*1/2)'\(ap\v'-0.75n'\h'|\nzu'"}%
ndefine >< %{"\v'0.4m'>\h'-1.0m'\v'-0.8m'<\v'0.4m'"}% 
tdefine >< %{"\v'0.4m'>\h'-1.0m'\v'-0.8m'<\v'0.4m'"}% 
ndefine <> %{"\v'0.4m'<\h'-1.0m'\v'-0.8m'>\v'0.4m'"}% 
tdefine <> %{"\v'0.4m'<\h'-1.0m'\v'-0.8m'>\v'0.4m'"}% 
ndefine dashl '{-~-~-}'
tdefine dashl '{-~-~-}'
ndefine dotted %{"\v'-0.3m'....\v'0.3m'"}%
tdefine dotted %{"\v'-0.3m'....\v'0.3m'"}%
ndefine sline '{up 50 ____}'
tdefine sline '{up 50 ____}'
ndefine dotdash %{"-\v'-0.3m'.\v'0.3m'-\v'-0.3m'.\v'0.3m'-\v'-0.3m'.\v'0.3m'"}%
tdefine dotdash %{"-\v'-0.3m'.\v'0.3m'-\v'-0.3m'.\v'0.3m'-\v'-0.3m'.\v'0.3m'"}%
ndefine hbar %{"h\h'-1.25n'\v'-0.65m'-\v'0.65m'\h'0.25n'"}%
define hbar %{h {back 70 up 28 -} }%
ndefine prop '{\(pt }'
tdefine prop '{\(pt }'
ndefine lcurl 'roman "{"'
tdefine lcurl 'roman "{"'
ndefine rcurl 'roman "}"'
tdefine rcurl 'roman "}"'
ndefine star '{*}'
tdefine star '{*}'
ndefine lstar '{down 25 *}'
tdefine lstar '{down 25 *}'
ndefine umld %"\h'-1.2m'\v'-1.0m'.\h'-0.6m'.\h'-0.2m'\v'1.0m'"%
tdefine umld %"\h'-1.2m'\v'-1.0m'.\h'-0.6m'.\h'-0.2m'\v'1.0m'"%
ndefine osl 'o back 50 /'
tdefine osl 'o back 50 /'
define dsl '{d back 63 up 25 -}'
define cint '{int back 75 o}'
define dag '\(dg'
tdefine simeq '{ ^ up 40 \(ul back 50 size +1 \(ap ^ }'
.EN
.ds LH CHEM 365W
.ds RH Final Exam
.ds CF Monday, April 24, 2006
.LP
.DS C
.ps 15
.vs 14.4
Faculty of Science

\fBFINAL EXAMINATION

STATISTICAL THERMODYNAMICS: \*(LH

\fIMcGill University\fP
.vs
.DE
.TS
center, expand;
l l.
Examiner:  Professor David Ronis        \*(CF
Associate Examiner:  Professor P. Kambhampati   2:00 - 5:00 P.M.
.TE
.nr P# 0 1
.IP \n+(P#.
No books or notes are permitted.  Translation dictionaries and
calculators are permitted.
.IP \n+(P#.
Answer all questions in the exam book and show all work clearly.
.IP \n+(P#.
There are 3 pages (including this one) and 4 questions, each of equal value.
.IP \n+(P#.
Be sure to indicate the total number of exam books handed in on book 1.
.IP \n+(P#.
You may keep the exam.
.IP \n+(P#.
\fIUseful Information:\fR

.tl '$k sub B = 1.380662 times 10 sup -23 J/K$''$h = 6.6256 times 10 sup -27 
erg cdot sec$'

.tl 'Avogadro\'s Number = $6.022169 times 10 sup 23$''$1 atm = 1.01325 times 10 
sup 5 J/m sup 3$'

.tl 'Gas Constant, R=8.314 J/K mol'''

.tl ''Geometric Series:  $sum from i=0 to M ^x sup i = {(1 - x sup M+1 )}
over {(1-x)} -> (1-x) sup -1$ as $M -> inf$ for $|x| < 1$''


.tl ''Exponential Series:  $sum from n=0 to inf {x sup n} over n! = e sup x $''

.tl 'Stirling\'s Approximation:  $ln (N!) approx N ln ( N ) -N$''$int from {- 
inf} to inf dx ^ e sup {-ax sup 2} = sqrt {pi / a}$'

.IP \n+(P#.
Good Luck.
.sp 2
.LP 
.bp
.nr P# 0 1
.nr PS 12
.nr VS 14.4
.ps 12
.vs 14.4
.LP 
\fB\n+(P#.  (25%)\fP Consider the hydrogenation reaction for cyclopentene:
.EQ
C sub 5 H sub 8 (g) + H sub 2 (g) cpile { size 8 Ni above up 150
{<->}} C sub 5 H sub 10 (g) .
.EN
.IP a)
Draw structures for the reactants and product, and for each compound,
give the symmetry number, number of vibrational modes, and the high
and low temperature limits (with respect to the vibrational
temperatures) of $C sub P$, the constant \fIpressure\fP heat capacity.
.IP b)
Write out the expression for the equilibrium constant, $K sub rho$.
Be sure to define your symbols.
.IP c)
How does your expression in part b) behave when the temperature is
high or low (again with respect to the vibrational temperatures)? 
.IP d)
What happens if $D sub 2$ is used instead of $H sub 2$?
.LP
\fB\n+(P#.  (25%)\fP
.IP a)
Derive the forms of the grand canonical partition function for a
system of Fermions interacting via a separable Hamiltonian, with
single-molecule energy states $epsilon sub i$.
.IP b)
Repeat the calculation in part a) for Bosons.
.IP c)
Use your results in parts a) and b) to calculate the average number of
particles in the system.
.IP d)
Derive the forms for the Fermi and Bose distribution functions, $n sub j$,
the average number of particles in state $j$.
.IP e)
Use your result in c) or d) and the fact that the energy levels of a
particle of mass $m$ in a box of side length $L$ levels are given by:
.EQ
epsilon sub {n sub x , n sub y , n sub z } = { h sup 2 n sup 2} over {
8 m L sup 2} ~~n sub i = 1,2,3,... ,
.EN
to show that the Fermi energy in the electron-gas model is given by:
.EQ 
mu sub F = { h sup 2} over {8 m } left ( {3 rho} over pi right ) sup
2/3 ,
.EN
at low temperatures, where $rho == <N> /V$ is the number density.  
.LP 
\fB\n+(P#.  (25%, from the homework)\fP  Consider a one dimensional lattice of
lattice spacing "a" composed of N atoms each of mass M.  Each atom
interacts with its nearest neighbors through a harmonic force with
force constant K.  Finally, the ends of the chain are assumed to obey
"periodic boundary conditions;" i.e.,
.EQ
x sub N+1 (t)~=~x sub 1 (t),
.EN
where $x sub i (t)$ is the displacement of the i'th atom from
its equilibrium position.
.IP a) 
By assuming that the normal modes correspond to one
dimensional waves of the form:
.EQ
x sub n (t) \(pt e sup { i ( omega t - ka n ) }
.EN
find the form of the dispersion law; i.e., the relationship between
the frequency of the mode and its wave vector.
.IP b)
Since we know how many vibrational degrees of freedom there are
in our system, what is the maximum wave vector of the highest
frequency mode?
.IP c)
Derive an expression for the vibrational partition function in
the limit $N~->~inf$.
.LP
\fB\n+(P#. (25%)\fP By using the expression for the energy levels of a
particle in a box (given above), derive the form of the molecular
partition (translational) function for an ideal particle in a box.
Use your result to compute the Helmholtz free energy, energy, and
pressure in a system comprised of $N$ such particles.  Ignore all
other degrees of freedom. Explain what approximations you are making
and why they are valid.
.ex
_______________________________________________
bug-groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-groff

Reply via email to