fixed continuous table numbering across chapters, and anchor creation only when target exists; also fixed a few <q></q> tags