Closed tim-hilt closed 4 years ago
Can you share one of such BibTeX record for testing? Also, what is the value of bibtex-completion-pdf-extension
?
I'm specifically interested in the file
field format. The file paths need not be real
Sure! Here's one:
@article{khotanzadInvariantImageRecognition1990,
title = {Invariant Image Recognition by {{Zernike}} Moments},
author = {Khotanzad, A. and Hong, Y.H.},
date = {1990-05},
journaltitle = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
volume = {12},
pages = {489--497},
issn = {1939-3539},
doi = {10.1109/34.55109},
eventtitle = {{{IEEE Transactions}} on {{Pattern Analysis}} and {{Machine Intelligence}}},
file = {/home/tim/Zotero/storage/U23EPDEB/Khotanzad und Hong - 1990 - Invariant image recognition by Zernike moments.pdf;/home/tim/Zotero/storage/K22VN4QZ/55109.html},
number = {5}
}
Notice that the file
-field has both, a pdf- and an html-file
And what is the value of bibtex-completion-pdf-extension
?
Test the above pull request to see if it solves your problem.
And what is the value of
bibtex-completion-pdf-extension
?
Sorry, i forgot half of your request! bibtex-completion-pdf-extension
isn't modified in my settings, so it has the default value of ".pdf"
.
Also, i never had a collaborator directly formulate a pull request as a response to an issue that i opened. So for starters: Thank you very much! This is a great experience! :)
And yes, the above pull request works flawlessly! Exactly what i was looking for!
Great! Thank you for your feedback, it helps to make ORB better for the benefit of many.
Note that you can control which file names to retrieve based on extension by adjusting the value of orb-file-field-extensions
("pdf" by default). You can also re-enable file prompts by setting orb-file-field-extensions
to nil.
As a bonus, one can now also use the %^{file} or ${file} wildcards in templates, which will do the correct thing.
...
:NOTER_DOCUMENT: ${file}
...
instead of
...
:NOTER_DOCUMENT: %(orb-process-file-field \"${citekey}\")
...
I will merge the pull request now. Beware though, that the file name retrieval relies on a function from bibtex-completion
package, and I found that in certain circumstances, namely when both files are in the path specified in bibtex-completion-bibliorgaphy
, only the last file name is retrieved unconditionally. This doesn't seem to be your case, though, since in your case the retrieval is done solely according to the value of the file field.
Thanks again! This also really helps cleaning up my template!
Sehr gerne!
I create my
.bib
-file using Zotero. Zotero automatically takes snapshots of the webpage i'm capturing the resource from and the Better BibLaTeX-extension for Zotero adds both to thefile
-field in the.bib
-file.I think this behavior is favorable over not exporting the resulting html-file to the
.bib
-file or not storing the snapshot at all, however i'm a bit annoyed of having to choose the pdf-file now, everytime i create a new notes-file using the following template:Could there be an option to prefer the pdf? Or is there a simple workaround i can utilize?