Skip to content

Left-side equations are indexed as well and can be smart-jumped to#783

Open
leonardBusch wants to merge 5 commits into
ahrm:mainfrom
leonardBusch:main
Open

Left-side equations are indexed as well and can be smart-jumped to#783
leonardBusch wants to merge 5 commits into
ahrm:mainfrom
leonardBusch:main

Conversation

@leonardBusch

Copy link
Copy Markdown

This pull-request addresses issue #587

When indexing equations, left-side equations will be indexed as well.

@ahrm

ahrm commented Aug 1, 2023

Copy link
Copy Markdown
Owner

When equations are on the left-hand side, for whatever reason for non-optimal OCR, the equation is trailed by some character, so that we have to compare distance of the last

I don't think this is true for all PDFs. This might be specific to the PDFs that you are testing.

@leonardBusch

Copy link
Copy Markdown
Author

Yeah, you're probably right.
When I latex my own pdfs with equations on the left side, there is no trailing character (but these will nowadays have hyperlinks anyways which would make this detection obsolete).
Otherwise, I've tested it against two other examples of OCR'ed pdfs (using ocrmypdf) which both have the described issue.

@leonardBusch

Copy link
Copy Markdown
Author

However, even in the case that a PDF does not have such a trailing character after an equation, it should be relatively insignificant.
After all, if a matching regex is not the actual equation, then it's probably part of a body of text and the distance between its last character and the character two further is still relatively small and should not be indexed.
But I agree with you that it is not an optimal solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants