
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article]This article is more of time management technique, rather than a "how-to" technique. There are many useful commands to troff. One such command is ".so", which stands for source. The ".so" or source command allows you to include source from another file into the current file. The actual command syntax is
.so filename
An example of what I'm talking about is the following; Say you are writing a book (or a thesis). You could easily create a file for each chapter (or section) and concentrate only on the current chapter. After you have completed your work and ended up with say, 10 chapters, you could create a final file called "BOOK" which would contain the following commands.
-- file BOOK --
.so chapter1
.so chapter2
.so chapter3
.so chapter4
.so chapter5
.so chapter6
.so chapter7
.so chapter8
.so chapter9
.so chapter10
--End of file BOOK--
Each of these chapters may also include .so headername, which would control the page header along with other functions you would like to control.
One of the benefits of using this method lies in making changes. If you want to make a minor revision to the header, you can simply make those changes to the headername file, and since we have already "included" the headername file in each of our ten chapters, we can now rerun BOOK and the changes will be made throughout the BOOK. Another benefit is that if you use this method, you will reduce the amount of redundant typing. That is, your information will only be entered once. You won't have to check multiple files to make sure changes have been made everywhere you wanted to make them.