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

How to add a per-project .bib file path? #41

Open
ghost opened this issue May 22, 2021 · 6 comments
Open

How to add a per-project .bib file path? #41

ghost opened this issue May 22, 2021 · 6 comments

Comments

@ghost
Copy link

ghost commented May 22, 2021

I currently have my folder that contains my .md file and my .bib file. I want to know how to specify the relative paths because I can't get them to work. Maybe it is because I have my folders on iCloud but I can't manage to add my .bib with a relative path. Also, do I need to create a new Citer.sublime-settings for every project that I work with or just change the path? I change the preferences via Preferences -> package settings -> citer -> citer settings-user

I currently have this in the Citer.sublime-settings:

{
    //REQUIRED:

    "bibtex_file_path": "/Learning Markdown/project.bib",
    // You can also specify a list
    //"bibtex_file_path": ["example/path/to/file.bib", "example/path/to/fileTwo.bib"],

    //OPTIONAL:

    //By default Citer Search looks for your keyword in the 
    //author, title, year, and Citekey (id) fields
    "search_fields": ["author", "title", "year", "id"] ,
    //Default format is @Citekey
    "citation_format": "@%s",
    //list of scopes. Could be top level "text" or "source", or limit to
    // e.g "text.html.markdown"
    "completions_scopes": ["text"],
    "enable_completions": true,
    //Customise the quickview of you library, using python format syntax
    "quickview_format": "{citekey} - {title}",
    "auto_merge_citations": false
}

Thank you.

@dhufe
Copy link
Contributor

dhufe commented Dec 14, 2021

Hi the latest release contains the code to add a bibtexfile to project files.

Basic example:

{
    "folders":
     [
	{
	    "follow_symlinks": true,
	    "path": ".",
	}
     ],
     "bibtex_file": "path/to/bibtex.bib"
}

@trymnf
Copy link

trymnf commented Jan 13, 2022

Not quite sure why, but I think this commit makes it necessary to rename the bibtex_file_path setting in Packages/User/Citer.sublime-settings to bibtex_file.

At least on my setup, I get a warning that "no bibtex file is configured for Citer" using "bibtex_file_path" : "/path/to/my.bib" in my user settings. This resolves if I change it to bibtex_file.

(I don't have a bibtex file set in my sublime-project.)

This is probably not intended?

@geomsoc
Copy link

geomsoc commented Jan 13, 2022

Not quite sure why, but I think this commit makes it necessary to rename the bibtex_file_path setting in Packages/User/Citer.sublime-settings to bibtex_file.

At least on my setup, I get a warning that "no bibtex file is configured for Citer" using "bibtex_file_path" : "/path/to/my.bib" in my user settings. This resolves if I change it to bibtex_file.

(I don't have a bibtex file set in my sublime-project.)

This is probably not intended?

Thank you for this! I have been banging my head against a wall for hours trying to resolve this.

@dhufe
Copy link
Contributor

dhufe commented Jan 14, 2022

Hi there,

the general idea is to set a main bibliography file using the plugin settings and override it per project if the project file includes it.

Cheers,
Daniel

@trymnf
Copy link

trymnf commented Jan 14, 2022

Hi Daniel,

Thanks for your work on this. I totally support the general idea, it's just that when I:

  • don't have an override set in .sublime-project, and
  • have a "bibtex_file_path" set in the plugin settings, (i.e., a main bibliography file---which worked fine in previous releases)

I get the error no bibtex file is configured for Citer. Does this behavior reproduce on your end?

It seems that Citer now expects a setting called "bibtex_file" in the plugin settings too, not just in the project settings.

Is there any reason why it can't be called bibtex_file_path both places?

@igelstorm
Copy link

@trymnf @dhufe I just added a new issue for this (#44), just to make it a bit easier for new users to find if they encounter this problem. I just discovered this plugin (and am looking forward to using it, it looks great!), but I struggled to get it to work for quite a while until I found this issue.

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

No branches or pull requests

4 participants