-
Notifications
You must be signed in to change notification settings - Fork 74
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
Open collection pdf containing article #274
Comments
Good idea. I think it will be difficult to add this as a standard feature because people use helm/ivy-bibtex with all kinds of PDF viewers some of which may allow this, others not. However, I would be happy to add an example in the documentation showing how this could be implemented, e.g., with pdftools within Emacs. Shouldn't be too difficult. |
Given that I use pdftools this would be much appreciated. |
Oh, sorry, my message was ambiguous. I meant I would be happy to add some code in the documentation if someone would provide it to me. :) I currently don't have the time to work on this. Perhaps over the holidays. Work is too hectic at this time. |
Oh, OK yeah I misread that. I have a deadline on Monday. After that, I could look into that and see what I can come up with. |
Ok, so how would I go about implementing this? My idea would be this:
|
Sounds like a good plan but I think you have to actively switch to the PDF buffer, since the code for opening the PDF will probably be running in some helm (or ivy) buffer. One issue: The pages of the PDF and the pages numbers often diverge since (for instance) title pages are counted in by the PDF viewer but not for the purposes of table of contents. This means that |
I think pdf-tools makes this distinction with For correcting this offset my idea was to have an additional field |
As an alternative to a manual offset you could search for the title of the article in the PDF and jump to the hit that is closest to the page number from the BibTeX entry. Not sure how robust this would be but perhaps worth a try. |
Ok, I have a preliminary implementation for this but the difficulty is to detect if a pdf is a journal pdf or not. My current idea is to check the total numbers of pages vs the start page but that seems a bit fragile. Do you want to have the things I built in helm-bibtex or rather only document e.g. in the Readme how a user could implement that? The issue with the latter aproach imho is that one needs to redefine helm-bibtex functions which is likely to break with package updates. |
To clarify what I would want to include:
That approach could be extended to other in emacs viewers |
Perhaps I misunderstand, but doesn't the entry type (article or inproceedings or ...) give you this information?
Not sure. Perhaps you could make a PR for bibtex-completion and then I can decide. If I decide to just add a section to the documentation, I could do the necessary work there myself. |
Well that would be the case if I always have the whole journal present but most of the times I only have the single article pdf from the authors page. |
If I have the pdf for a whole collection it would be nice to link all entries in that collection to open this pdf at the right point. I can set the pdf with the
file
field but then I have to manually search for the chapter/article. I can see that automatically linking this is probably out of scope given that the point in the pdf might not even be clear depending how the pages are numbered. Possibly different arguments for the viewer are required to open a pdf at a given page depending on the viewer used. However I think there is currently no way even to set this manually.The text was updated successfully, but these errors were encountered: