Git Product home page Git Product logo

Comments (7)

tmalsburg avatar tmalsburg commented on June 12, 2024

Hi, thanks for this suggestion. The trouble is, people have BibTeX keys like the following:

  • NameEtAl2014
  • NameEtAl2014XYZ

where the first is a journal article and the second a presentation at XYZ conference. If we search for files with NameEtAl2014 in their name, both items match. See #40 for a related problem.

from helm-bibtex.

hemcsec avatar hemcsec commented on June 12, 2024

Thanks for your reply. You're right, it is indeed a problem. Then how about provide a option and let the user himself to decide how to define the search string for the associated file with regular expression?

from helm-bibtex.

tmalsburg avatar tmalsburg commented on June 12, 2024

let the user himself to decide how to define the search string

It's possible, but it smells a little of feature creep. I don't see what we would gain.

from helm-bibtex.

svaiter avatar svaiter commented on June 12, 2024

Hi.
I want to add a small comment on this feature request. For instance, in my case, I have the following naming scheme:
bibtex-key0.pdf, bibtex-key1.pdf, etc. in order to support for instance supplementary materials. About 95% of my references have only one file associated. For the moment, I simply redefined helm-bibtex-find-pdf as

(defun helm-bibtex-find-pdf (key)
  "Searches in all directories in `helm-bibtex-library-path' for
a PDF whose name is KEY + \".pdf\".  Returns the first matching PDF."
  (car (-filter 'f-exists?
                (--map (f-join it (s-concat key "0.pdf"))
                       (-flatten (list helm-bibtex-library-path))))))

which is not very clean.
Maybe you can make a quick note in the README to state that the naming convention used by helm-bibtex is bibtex-key.pdf, but one can hack helm-bibtex-find-pdf in order to have a finer control ?

from helm-bibtex.

tmalsburg avatar tmalsburg commented on June 12, 2024

Yes, now that we have `helm-bibtex-find-pdf' it's much easier to accommodate special preferences and I will add a note about that. However, why don't you use a naming scheme where the main article is BibTeXkey.pdf and the supplemental PDFs BibTeXkey1.pdf and so forth. This way you don't need to tweak the code.

Thanks for the suggestion.

from helm-bibtex.

tmalsburg avatar tmalsburg commented on June 12, 2024

BTW, I just noticed that the (car (-filter ... can be simplified to (-first ....

from helm-bibtex.

tmalsburg avatar tmalsburg commented on June 12, 2024

Ok, done. I think it's now sufficiently easy for users to change the naming scheme and we can close this issue. Thanks everyone.

from helm-bibtex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.