rework realpath

Signed-off-by: Sebastien Varrette <sebastien.varrette@uni.lu>
add synctex option for LaTeX compilation

Signed-off-by: Sebastien Varrette <sebastien.varrette@uni.lu>