Defines a command \captionof for putting a caption to something that's not a float. This package was implemented by Robin Fairbairns.