Removing latex fragment markers with a proper regexp, and dealing properly with links without target
Forgot the string to replace with in the regexp