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

Ability to specify per-project bib files #51

Open
LeaVerou opened this issue Jul 22, 2024 · 3 comments
Open

Ability to specify per-project bib files #51

LeaVerou opened this issue Jul 22, 2024 · 3 comments

Comments

@LeaVerou
Copy link

Thanks for making this wonderful plugin!

I see there are two ways to specify bibliography files, corresponding to two scoping extremes: either as a global default, applied to every project, or by specifying them on the individual file.

In most of my use cases (and for many colleagues I know) it would be most helpful to specify bibliography files per project.

Perhaps via a project config file or something?

@notZaki
Copy link
Owner

notZaki commented Jul 22, 2024

Something similar was brought up in #31 and now I believe the bib file can be defined at the workspace level, by doing (on windows) Ctrl+Shift+P -> Preferences: Open Workspace Settings (JSON) and then adding something like

{
    "PandocCiter.DefaultBibs": ["./path/to/refs.bib"],
    "PandocCiter.UseDefaultBib": true
}

to the config. This will save them in a .vscode/settings.json file and that should only apply to the specific workspace.

I don't regularly use this feature, so let me know if it actually works/helps or if something else should be done. If it does work, then the readme could be updated with this information.

@mtompkins
Copy link

I would really love this feature and have been struggling with the extension for some time on linux.

What I've come to understand is, the relative path in linux (using VSCodium) isn't relative to the working directory.

For example I have a project folder as /home/user/directory/report however when using the relative path in the settings.json it refers to /home/user/.config/VSCodium/User/

@LeaVerou
Copy link
Author

LeaVerou commented Sep 8, 2024

Something similar was brought up in #31 and now I believe the bib file can be defined at the workspace level, by doing (on windows) Ctrl+Shift+P -> Preferences: Open Workspace Settings (JSON) and then adding something like

{
    "PandocCiter.DefaultBibs": ["./path/to/refs.bib"],
    "PandocCiter.UseDefaultBib": true
}

to the config. This will save them in a .vscode/settings.json file and that should only apply to the specific workspace.

I don't regularly use this feature, so let me know if it actually works/helps or if something else should be done. If it does work, then the readme could be updated with this information.

I forgot το answer but this worked great, thank you! I guess this can be closed, I don't think there is anything PandocCiter can do to facilitate this better — I would just suggest documenting this.

@mtompkins It resolves relative to the working dir for me. These are my settings:

{
	"PandocCiter.DefaultBibs": ["./bib/zotero.bib", "./bib/manual.bib"],
	"PandocCiter.UseDefaultBib": true,
	"PandocCiter.ViewType": "browser"
}

Perhaps it behaves differently if you start with ./?

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

3 participants