doc: fix *latex related errors
Created originally on Bitbucket by frantony (Antony Pavlov)
Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.
This commit series fixes the errors preventing correct documentation pdf-file creation.
Also this series fixes issue #1571 (closed).