Holding the Shift key lets you add to the existing selection in Adobe Photoshop.
Gadgets > FootnoterNo download for gad:fnView Licence
Footnoter is a script that helps you maintain footnotes within a document (as I do in my Project Organization Basics article). You can create footnotes while editing your HTML by using a special [[footnote:]] notation, and if you ever rearrange your paragraphs the script will automatically renumber your footnotes.
Installing the script on Mac OS X1 is very easy — simply copy the footnoter.command script file into the top-level folder of your website. When you double-click the script it will process all html & php files2 in that folder and its subfolders.
As you are writing your web page, define your footnote references using two square brackets3, like this:
At the bottom of your document create a header block (you can use any one of <h1>, <h2>, <h3>, through <h9>) with the content "Notes":
When you have finished editing your web page, run the footnoter script. Your html file will be modified to create hyperlinks between the reference and its corresponding footnote:
In my home directory1 I have a Projects folder.
...
You'll notice that in the preceding example the footnote link is shown as green text (which turns gray after you follow the link) in a dotted-border box and the back link uses a slightly smaller font. Footnoter automatically assigned classes to the link tags:
In my home directory<a href="#note1" id="ref1" class="ref">1</a> I have a Projects folder.
...
<ol>
<li id="note1" class="footnote">I use a Macintosh. Windows does not
have a 'home directory' in the same sense, so you should use either
your desktop or the My Documents folder. <a href="#ref1" class="backref">Return to text.</a></li> </ol>
and the tags were styled using the following CSS:
a.ref {
font-size: smaller;
color: #228822;
text-decoration: none;
border: thin dotted #444444;
padding: 0pt 2pt;
margin-left: 2pt;
}
a.ref:visited {
border: thin dotted #666666;
color: #666666;
}
a.ref:hover {
border: thin solid #228822;
}
a.backref {
font-size: smaller;
text-decoration: none;
white-space: nowrap;
}
a.backref:hover {
color: #228822;
}
a.backref:before {
content: "[";
text-decoration: none;
color: #000000;
}
a.backref:after {
content: "]";
text-decoration: none;
color: #000000;
}
If you ever rearrange your paragraphs so that the footnotes are in the wrong order, just re-run the footnoter script to update your pages.
The script edits files "in place" — the original file is replaced with the new content. If the results are not what you wanted, you might want to revert to the original file. On Unix and Mac OS X, the original html/php files may be found in the Sites/backups/footnoter folder in your home folder. I haven't tested the script on Windows, so I can't guarantee where the backups will be placed — I don't know what "home folder" means on that platform.
As I said before, the script automatically processes every html and php file in the directory that you place it in. It does this very quickly, so performance is not an issue. But perhaps you have some files (or parts of files) that you don't want to be processed by the script4. Not a problem: just use the special footnotes off and footnotes on comments to enable and disable footnote processing:
<!-- footnotes off --> <h3>Notes</h3> This is <em>not</em> the footnotes section. <!-- footnotes on -->
If you want to use a different header than "Notes" you will have to edit the script. Look for the variable named $notesHeaderField near the top of the file and change it to whatever you want your header to be. If you stick to letters and numbers you should be okay, but if you want to use punctuation marks you should be familiar with perl regular expressions before you modify the file.
You can run this script from a Terminal window of Mac OS X, any terminal program on a Linux system, and the DOS prompt of a Windows machine (if Perl is installed). You might want to rename the file to get rid of the .command extension, and can run footnoter -h to learn about the command-line options.
Note that renaming the script will change its behavior slightly. I did this because the standard conventions for a command-line program are different than for a double-clicked application.
| Behavior Changes When Script is Renamed | ||
|---|---|---|
| footnoter.command | When double-clicked, processes all html & php files in the current folder. | Displays the names of the files that were changed. |
| footnoter | Prints instructions and exits if run with -h or no arguments. Processed named files & folders if run with arguments. |
Produces no output unless -v or -vv is passed. |
The script has been designed so that you can also call it from BBEdit. Just do the following:
And now you can open up an HTML file in BBEdit, add some footnotes, and choose #! > Unix Filters > footnoter.command to process the file.
Other intermediate webmaster articles:
Other intermediate webmaster resources:
#! followed by the location of the script interpreter. The footnoter script is written in perl, and so begins with #!/usr/bin/perl Return to text.