Latex-workshop: Citation browser/intellisense

Created on 12 Apr 2017  路  16Comments  路  Source: James-Yu/LaTeX-Workshop

A couple of questions/comments about the citation related stuff:

1) Is the citation browser supposed to be fixed to be searchable only by title?

2) Author search in intellisense seems to have an issue recognizing anything other than the first author name in the list for lists such as "Smith, John and Jones, Tom," i.e. it will only recognize "smith" but not "john" or "jones" or "tom."

3) Is it possible for the intellisense and/or citation browser to search all fields, or at least title and author? I.e. I may remember a reference's title, but not authors, or vice-versa.

Thanks!

Most helpful comment

Hmm actually I think quotes as outer delimiters are perfectly valid, so many users will have them:

http://tex.stackexchange.com/a/109070

As with what you were saying @zachjweiner, people will have automated systems for generating bibtex entires so it's not so easy to promote 'good' style even if the consensus is {} > "".

Maybe it's worth figuring out if we can support both?

All 16 comments

  1. Yes, and that is limited by how quick menu of vscode works.
  2. I cannot reproduce the problem. I searched my name and the non-first authored papers appear in the intellisense. I use title in the settings.
  3. Intellisense natively supports searching with both title and author names.

For 2), How is your author list formatted? A single "string," as I have?

For 3) Ah, yes, correct, I wasn't looking closely enough. Great!

This is a random snippet from my bib:

@article{ye_multi-objective_2015,
  title = {Multi-{{Objective Optimal Power Flow Considering Transient Stability Based}} on {{Parallel NSGA}}-{{II}}},
  volume = {30},
  number = {2},
  journal = {IEEE Trans. Power Syst.},
  author = {Ye, Cheng-Jin and Huang, Min-Xiang},
  month = mar,
  year = {2015},
  pages = {857--866}
}

And you can see
image

@zachjweiner if you could share a bibtex entry that you know isn't working along with the search term you were trying to complete that wound be great!

@jabooth, I think @James-Yu's example will work - I cannot replicate the behavior he demonstrated. I put his entry in my bib and attempted to \cite{min} or \cite{Huang}, etc., and the reference didn't appear.

I assume this is entirely independent of what compiler one uses for bibliographies? Could it be some setting within VSC, rather than the extension?

I have no idea on why your extension won't provide the item. Can you please share a part of your bibtex file that won't work?

@James-Yu I could, but I was saying that the example you include does not work for me in the exact same way. But, as another example:

@article{Kogut:1974ag, author = "Kogut, John B. and Susskind, Leonard", title = "{Hamiltonian Formulation of Wilson's Lattice Gauge Theories}", journal = "Phys. Rev.", volume = "D11", year = "1975", pages = "395-408", doi = "10.1103/PhysRevD.11.395", reportNumber = "Print-74-1186 (CORNELL)", SLACcitation = "%%CITATION = PHRVA,D11,395;%%" }

Trying to \cite{suss doesn't bring up any suggestions.

Can you please give a screenshot on the info displayed for this entry after typing kogut and press ctrl+space?

In addition, the 'correct' way of using bibtex is to use brackets instead of double quotes. I am pretty sure the quotes in your example will cause trouble.

This is mine
image
You can see the authors are not parsed due to those quotes. Here is a normal one
image

image

Right about the brackets vs. quotes... I just never write this myself, I pull all citations from the inspireHEP database automatically.

Here is a reference on the 'standard' bibtex: link.
There are also many, and it is really hard to adapt to double quotes while does not influence the bracket people.

Yes, I'm now seeing that that is the issue. Of course i'm not gonna ask you to adapt for that :) I'll do some find and replacing. Thanks for ironing that out for me.

Hmm actually I think quotes as outer delimiters are perfectly valid, so many users will have them:

http://tex.stackexchange.com/a/109070

As with what you were saying @zachjweiner, people will have automated systems for generating bibtex entires so it's not so easy to promote 'good' style even if the consensus is {} > "".

Maybe it's worth figuring out if we can support both?

Did not know it is also valid. Will check how to adapt to this format.

Will publish to marketplace, @zachjweiner please have a test.

Looks perfect. Thanks so much for taking the time to do this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drdebmath picture drdebmath  路  4Comments

s-ilic picture s-ilic  路  3Comments

jabooth picture jabooth  路  3Comments

LordScree picture LordScree  路  5Comments

fsonntag picture fsonntag  路  4Comments