Use latexcodec package.