various pandoc latex fixes

- add missing declarations to latex_base (required for pandoc-highlighted code in markdown)
- fix ansi color in latex, which didn't work in a variety of ways.

closes #4345