Add swp and pyc files to gitignore
Fix context when a sectioning command is used

If the sentence contains something like `throughout this subsection`,
only the TeX from the start of the enclosing subsection until the start
of the next subsection will be shown as context.