The everypage package speaks of hooks.
What exactly is meant by this and how could it be used?
The everypage package speaks of hooks.
What exactly is meant by this and how could it be used?
Programmers call "hooks" pieces of code that are executed every time something happens, and that can be "added to" by other programmers. This is like a hook you may have on your bag: you can put your phone or your camera on it. What exactly you hook there can be decided later; the hook is there for anything.
For example, you may print on every page a draft mark. Or send yourself an e-mail "Page 2 is printed". You add the program that does this to a page hook, and it is done every time you ship out a page.
write18 stream can be used to call any program (if not disabled by security considerations); one can call, e.g. sendmail to send an e-mail to the given address.
\AddEverypageHook, you will find various code examples using this package and macro. In essence, the\AddEverypageHookwill automatically do "something" every page of your document. What that "something" is, you have to tell it. In contrast,\AddThispageHookwill do "something" on the current page only, but what it allows is for the "something" to be done in the same way, regardless of where you currently are located on the page when you invoke it. – Steven B. Segletes Sep 10 '14 at 18:13