ENDNOTE.TXT - A Practical Method for Handling Endnotes in Text Files Writers who work in plain ASCII text sometimes need footnotes in their files. However, while editing, it's nice to be able to move, add, or delete paragraphs with notes without having to manually renumber all the footnotes. Commercial word processors like Microsoft Word or Corel Word Perfect have an easy method of handling notes in which deletions or rearranging text is no problem. The notes are automatically renumbered as needed. Is such a system available users of Vim, Emacs, Vedit, VDE, PFE, TDE, EditPad, Notepad, NoteTabs, or other ASCII editors? Yes. If you have Perl or Awk installed, you can use ENDNOTE.PL or ENDNOTE.AWK to facilitate note creation. You execute Perl or Awk with the appropriate script plus your input file to generate a formatted output file. Here's how it's done from the command line: awk -f endnote.awk your_essay.txt > new_essay.txt # for awk perl endnote.pl your_essay.txt > new_essay.txt # for perl The ENDNOTE programs generate "endnotes": note references that are printed in final form at the end of a document. ENDNOTE does not print the notes at the bottom of each page (technically called "footnotes"). The following paragraph shows how to use ENDNOTE: First, in the body of the document you must reserve a place for the in-text note references with a four-character string, like this: [##] The string consists of a left bracket "[", two pound signs "##", and a right bracket "]". The ##-signs will be converted to 1, 2, 3, etc. when the script is processed. The brackets will be left alone and extra space will be closed up, so you will see "[1]", not "[ 1]"; notes higher than 99 are fully supported. If you split your files into multiple chapters, ENDNOTE supports an optional switch [##] to begin numbering at any positive integer. [[ ##. Sample reference: William Lane Craig, _Reasonable Faith_, rev. ed. (Wheaton: Crossway Books, 1994), pp. 67-68. ##. If the optional switch syntax is used, the command line is awk -v start=N -f endnote.awk your_essay.txt # for awk, or perl -s endnote.pl -start=N your_essay.txt # for perl where "N" should be replaced by a whole number such as 8, 23, etc. Note that in perl, '-s' must occur before endnote.pl and '-start=N' must be placed afterwards. ]] Second, somewhere below the paragraph with the in-text references, you must add the endnote references, properly spelled out. The endnote references should be placed in a block delimited by '[[' and ']]', which should be alone on a line. For editing, it's easiest if the '[[Endnote block]]' occurs directly below the paragraph which contains the in-text references, though in fact the '[[Endnote block]]' can occur anywhere at all. List the endnote references in the same order as the in-text notes. The numbering system for them is a three-character string, "##." (pound, pound, period). It is customary to print them flush left, but not absolutely necessary. [##] [[ ##. As you can see here. ]] Some suggestions on spacing. You may place note references directly after a word[##] or insert a space after the sentence. [##] If your text editor does automatic paragraph reformatting, beware that the '[[Endnote text]]' block is not reformatted as well! It's easy to reformat a paragraph and discover that the placeholders '[[' and ']]' (which must be *on a line by themselves*) have been pulled into the rest of the paragraph by your text editor. Finally, if you put the '[[Endnote text]]' block into a separate paragraph below the body text (with a blank line between the body text and the note text), you will have *2* blank lines between the body text paragraphs when the output prints. If this bothers anyone, let me know. [[ ##. Like this. ##. Putting a space before the left bracket is looks nicer, IMO. ]] ENDNOTE has an error routine to see if the body text has the same number of note symbols as the endnote text block. If the note symbols cannot be matched up, ENDNOTE will abort with an error message. Of course, you will need awk or perl to run ENDNOTE. [##] [[ ##. This page contains links for obtaining awk and perl: http://www.crossmyt.com/hc/htmlchek/awk-perl.html ]] Finally, I must give credit where credit is due. The idea for ENDNOTE comes from Eric Meyer, the author of VDE (a powerful shareware DOS editor). [##] Eric Meyer wrote WSNOTE, a note management program for WordStar that handles both endnotes and page-bottom footnotes. WSNOTE generates WordStar-specific output, so I wrote ENDNOTE to do something similar with plain ASCII files. [[ ##. VDE can be obtained here: http://members.aol.com/wolffsoft/vde.htm ]] -- The ENDNOTE Perl and Awk scripts and this document (ENDNOTE.TXT) were written by Eric Pement, pemente [=at=] northpark.edu, on 3/25/2002.