\ENDNOTE\ ENDNOTE is a TurboPascal program for handling endnotes in a text file. It was originally published in the July, 1986 issue of PROFILES magazine by its author, David Weinberger. As my first programming experience, I have made some minor changes to the screen display, added an option or two, and the notes and text merging capability. Its basic structure, however, remains the same, for which I am grateful to Mr. Weinberger. ENDNOTE may be compiled for CP/M or for MS-DOS, using Turbo Pascal. The included .OBJ version was compiled on my Kaypro 10 (CP/M 2.2). Operation: ENDNOTE simply reads a text file, copying each character into a new file called FILENAME.FMT until it hits a note delimiter. At this point, it types a superscripted number and copies each subsequent character into another new file called FILENAME.FTN, following a matching superscript number, until it hits another note delimiter, when it switches back to copying each character to the FILENAME.FMT file, and so on. In the end, you have three files: the original, unchanged source file, a file of text with reference numbers, and a file of notes with matching numbers. ENDNOTE never changes the source file, which can be reedited, and run through ENDNOTE whenever necessary to change the note order, etc. The big advantage of ENDNOTE over other footnote handling programs available commercially or in the public domain is that it doesn't require carriage returns as delimiters so you don't have to type all your notes at the end of each paragraph, but can type them wherever they occur, throughout a paragraph. Defaults: The delimiter ENDNOTE looks for is a backslash character, "\" (without the quotation marks). The first backslash should be where you want the number to be in your text file. If you want a blank space between the number and first character of the note itself, you should follow the first backslash with a space. Then type the note, including any print control commands you like (underlining titles, etc.), ending the note immediately with another backslash. Skip one or two spaces before your next sentence, depending upon your style requirements, or a carriage return if the note comes at the end of a paragraph. This version of ENDNOTE is set up for WordStar. It adds a ^T before and after each sequential number. I also set it up to automatically indent each note 5 spaces. You can easily change these and any other values by altering the appropriate constants at the beginning of the file ENDNOTE.PAS prior to compilation. To change the delimiter, you have to look for it in the main loop part of the program. Prompts: ENDNOTE prompts for the source file name, starting note number, for a blank line between notes, and for merging the two output files together. The starting note number simply allows you to start the note numbering sequence with any number, if, for example each chapter's endnotes had to be ordered sequentially throughout a book. The blank line option depends on your note format requirements. The Modern Language Association style sheet calls for double spaced notes with a double space between, in which case no additional line between notes is necessary, if you print or reformat the note file double spaced. If your final output will use single spaced notes, then an additional line is needed. The merge option enters a page break at the end of the .FMT output file, centers an underlined title, "Notes", and copies each character of the .FTN file, erasing it when done, leaving you with the unchanged source file and a file with text and notes appended following a page break. This is handy for users of Wordstar Release 4 or Perfect Writer which have a print time formatting capability. While ENDNOTE copies each character without leaving gaps where your notes were, it doesn't "fill" each line to a right margin setting, frequently leaving some short lines in the middle of paragraphs. Without print-time formatting, it is necessary to re-enter your word processor to reformat such paragraphs, at which time the .FTN file can be read into your .FMT file in the appropriate spot, and the poroper titles and formatting commands added, etc. I added this as a "quick print" option. Depending on your settings, the Notes title may not be centered (or even the correct title for your style requirements). Error handling: ENDNOTE never changes the source file, which can be reedited, and run through ENDNOTE whenever necessary to change the note order, etc. ENDNOTE will keep asking until you give it a file it can find. ENDNOTE doesn't understand drive or user designations, it can only be used on the same drive/user as the source file. ENDNOTE will inform you if it found 0 notes, and erase the two output files. ENDNOTE will tell you if there was an unmatched pair of delimiters in the source file. If so, it doesn't erase anything, but you probably ended up with your last note containing the rest of you text. I learned alot playing with this program, and it solved a major problem I was facing using Wordstar to prepare my doctoral thesis which is chock full of notes. I am grateful to David Weinberger for the source program and for his generous help getting started. Bob Arnold 111 Spring St. Syracuse, NY 13208 (315) 422-5847