I have a bunch of one-line LaTeX strings which I would like to compile into unicode strings (preferably using Python, but any solution will do). Specifically achieve
in: '\"o{A}c'
out: 'öAc'
(I realize there is latexcodec, but it I found it unreliable so I'm looking for an alternative approach.)
I figure the only reliable way to do so is to fall back to a system LaTeX compiler, specifically
- to compile the string into a PDF, and
- to read the output from the PDF file.
Is there a more streamlined approach to this? For example: Is is possible to compile LaTeX into a unicode string in memory rather than a PDF?
biber
can do this for you.<enc>enc.dfu
files, for instancet1enc.dfu
.