added latex test cases from issue 1368, using more proper asserts
formatting - tabs to spaces
make json serializations compatible with anki - add test