Add a few files to .gitignore, add const to some constants

This patch adds a few files to .gitignore; adds a LaTeX .gitignore to the doc directory; and add const to some constants.