Implement a doctest_globalcleanup string

Refs #9595
Use latex preview package to vertically align equations correctly.

Refs #9595
Merge branch 'feature/9595_global_doctest_cleanup' into develop