[TASK] Post-process generated LaTeX file

Change-Id: I22a3cc02076f1a5e7756525f37e761dbee95de71
Resolves: #57713
Reviewed-on: https://review.typo3.org/29246
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers