last version before fixing \ref for pdflatex and docx