Parser does not recognise superscript or subscript characters #52

Open
opened 2026-02-16 00:16:44 -05:00 by yindo · 0 comments
Owner

Originally created by @Starforged on GitHub (Mar 19, 2024).

When the PDF contains superscript or subscript numbers this is not reflected in the output.

Example Input:
grafik

Recieved Output:
Konzentrationen der Ag+- und

Raw (copy and paste from PDF) Text:
Konzentrationen der Ag+- und

As you can see the recieved Output is identical with the raw text from the PDF.
This behaviour should be replaced so that the formatting is preserved.

Option 1 with uncode character Superscript Plus Sign:
Konzentrationen der Ag⁺- und

Option 2 with markdown tags:
Konzentrationen der Ag+- und

My recommendation is to go with Option 3 as outlined here:

Option 3 with LaTeX, this example uses $ delimiters to show formatted text inline:
Konzentrationen der $Ag^+$- und

Please note that this is a seperate issue to #81 as that one requires OCR, while this issue should not require it as the superscript and subscript text position is encoded in the formatting of the PDF document.

Here are the files for reproducing the issue:
chemiebuch_124.pdf
chemiebuch_124_llamaparse.md

Originally created by @Starforged on GitHub (Mar 19, 2024). When the PDF contains superscript or subscript numbers this is not reflected in the output. Example Input: ![grafik](https://github.com/run-llama/llama_parse/assets/11255685/b91de4c6-22e8-467f-87e6-c15fa7ddc3e4) Recieved Output: Konzentrationen der Ag+- und Raw (copy and paste from PDF) Text: Konzentrationen der Ag+- und As you can see the recieved Output is identical with the raw text from the PDF. This behaviour should be replaced so that the formatting is preserved. Option 1 with uncode character Superscript Plus Sign: Konzentrationen der Ag⁺- und Option 2 with markdown tags: Konzentrationen der Ag<sup>+</sup>- und My recommendation is to go with Option 3 as outlined here: Option 3 with LaTeX, this example uses `$` delimiters to show formatted text inline: Konzentrationen der $Ag^+$- und Please note that this is a seperate issue to #81 as that one requires OCR, while this issue should not require it as the superscript and subscript text position is encoded in the formatting of the PDF document. Here are the files for reproducing the issue: [chemiebuch_124.pdf](https://github.com/run-llama/llama_parse/files/14647739/chemiebuch_124.pdf) [chemiebuch_124_llamaparse.md](https://github.com/run-llama/llama_parse/files/14648021/chemiebuch_124_llamaparse.md)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#52