Fixed issues with emphasis, and \ref

* Both underscores and asterisks can indidate emphasis in Markdown, neither of them should act that way in math mode.
* \ref tries to fix labels by prefixing the current chapter if possible, but an incomplete file name was used.
Fixed missing escaping in Markdown description