Improving LaTeX rendering and export fidelity in AI output