diff --git a/lib/convert.js b/lib/convert.js index ed0c324..51d175e 100644 --- a/lib/convert.js +++ b/lib/convert.js @@ -565,6 +565,7 @@ async function ConvertImageWithOCRAPI(apiKey, outputType, source, destination, h process.stdout.cursorTo(0); let responseJSON = await res.json(); + if (! ('latex_styled' in responseJSON)) responseJSON['latex_styled'] = responseJSON['text']; if (destination.endsWith("docx")) { await MarkdownToDocx(responseJSON["latex_styled"], destination, true); } else if (destination.endsWith("tex")) {