🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #4728

Thesis Macros, Troff

#4728
From: leff
Date: Tue, 17 May 1988 02:30
101 lines
4038 bytes

Does anybody have a set of macros to be used for the generation
of theses.   I. E. a set of macros that automatically generates
the table of figures, table of tables, table of contents in the
appropriate format.

We already have written such a set, integrated with the MS package.

For example, one simply writes 


.NH 1 "INTRODUCTION" 


.NH n "section heading"


.NH Z "APPENDIX I"
.NH Z "REFERENCES"

one of these and the appropriate entry is made in the table of contents
as well as the proper numbered entry is made then and there as in
the conventional ms macros.

For figures we do the following 

.fZ bc

This will put in the internal troff string, bc, the next sequential
number of the form n-m where n is the chapter number and m is the 
figure number within that chapter.  

When you print out the figure, include the line

.fG bc "caption"

bc is the same two character sequence as for the corresponding .fZ macro.
In the quotes, put whatever caption you want.

Again, a record of this information will be kept for the purposes
of generating the LIST OF FIGURES with a record of the page number.

There is one more gee-whiz feature here.  Since the .fZ macro
puts the figure number in a register, you can include that number
in your text.  That way you don't have to modify the text should
the figure numbering change.

You simply include in the text, the five characters \*(bc where bc
is the two character name from the .fZ macro.  That will expand to
the appropriate figure number.  The .fZ macro to generate the
figure number is called before the \*(bc stuff.

If you have a one page figure that needs to be pasted on a page,
use .fZ in the identical way to reserve a figure number.
Then put

.Df  bc "caption"

where bc is the two character identifier used in the .fZ macro
and caption is the appropriate header.  Your text will continue
and on the next page, will appear the appropriate page number with the
caption ready for you to paste your figure onto.

However, unfortunately there are some problems, particularly bad
interactions between my macros and the ms macros.  Here are some examples:

You may find that some figures may have a page number that does not
correspond to the place where the figure is.  Generally, the page number
on the list of figures will be one less than it should be.

For each such figure, put a ".bp" before the figure starts.

What is happening is as follows,
  When the ms macros see something in .DS .DE or .PS  .PE, it
  puts the item in a diversion to see if it can print it on this page.
  If it can, it will print it on that page and the page number will
  be correct in the list of figures.

  When it cannot, it will print it on the next page.  However, the page
  number will be that when the diversion was made, not where the
  picture was paged.


The ultimate solution to this is to write an integrated set of macros
that does thesis plus the stuff now done by MS that will solve
these problems.  We have reached the end of the line with what can
be done with this solution.

You do not need a .bp if the figure is already on the same page as
when invoked (i. e. MS is not skipping a page to make room).
You also do not need one for Df type figures as those are handled
a different way and will have the right page number.

Note that there is a template at the end of the file which calls
the appropriate macros (generated by Df, fG, NH, etc.) where
needed to put the table of contents, table of figures, etc.

DOES ANYONE HAVE ANYTHING BETTER?  We are going to write a set of
integrated macros where we write all  the macros and everything works
together.
Technical Details
Message-ID: <250100002@smu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!texsun!texsun.central.sun.com!convex!smu!leff

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!texsun!texsun.central.sun.com!convex!smu!leff
From: leff@smu
Newsgroups: comp.text
Subject: Thesis Macros, Troff
Message-ID: <250100002@smu>
Date: 17 May 88 02:30:00 GMT
Lines: 101
Nf-ID: #N:smu:250100002:000:3623
Nf-From: smu!leff    May 16 21:30:00 1988