Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Detect outline header in which a selected text is from for optional Copy Template in Display text format #259

Open
j-adel opened this issue Aug 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@j-adel
Copy link

j-adel commented Aug 23, 2024

Describe your request

I think the most useful Display text format would be the name of the header which includes the text that is copied. This could be done by having a copy template {{header}} which detects the most specific header that contains the entire selected text. If no headers are found or only the main one, it returns ""

@j-adel j-adel added the enhancement New feature or request label Aug 23, 2024
@RyotaUshio
Copy link
Owner

RyotaUshio commented Sep 24, 2024

This is a very nice suggestion, but by the nature of the PDF file format, there is no way to reliably determine which heading each piece of text belongs to.
(Of course we could do some very rough guess work though)

I will think about how this should be implemented, but I'm afraid this will not come true very soon.

@j-adel
Copy link
Author

j-adel commented Sep 24, 2024

Yes I understand there is no reliable way. I would imagine if the paper is laid out vertically (not two-columns) then based on the location where the text is copied, the header can be inferred by checking which region matches the position. I can see issues popping up though so I imagine it could take some time. Thanks for considering it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants