LaTeX template: Added \VerbatimFootnotes if there is verbatim in notes.

Fixes a bug when there is verbatim inside notes.
Closes #1616.
Updated tests for #1616 change.