Closed jenskober closed 5 years ago
Instead of adding a new configuration option, I would propose to slightly change the logic of BIBTEXBROWSER_PDF_LINKS and clearly document it. Could you add a test case?
Yes, I'll add a test case (hopefully tonight). I'll remove the new option so that it's effectively only a slight change of BIBTEXBROWSER_PDF_LINKS
@monperrus Is this (roughly) what you had in mind?
Changed it a little bit. OK for you?
Fine for me.
I changed one comment to conform with the new function names and modified the test to a truly unknown extension.
If we display a link to a .html as [pdf], I'd suggest you add another line to display a link to .htm also as [pdf]
Many thanks Jens.
BIBTEXBROWSER_PDF_LINKS adds a [pdf] link no matter whether the field pdf/url/file really points to a PDF or not. My new option BIBTEXBROWSER_DOCUMENT_LINKS does a sanity check based on the file extension and if this is not .pdf uses the field name instead. This version display all of the fields it finds (which I use if there is a publisher website but no DOI additionally to the PDF link)