SublimeText / LaTeXTools

LaTeX plugin for Sublime Text
https://latextools.readthedocs.io/
2.01k stars 365 forks source link

cite author complition bug #1361

Closed hadisfr closed 6 years ago

hadisfr commented 6 years ago

\cite complition shows ???? for multi-line bibitem author attribute in bib file.

@Article{borle18,
author="Borle, Neil C.
and Feghhi, Meysam
and Stroulia, Eleni
and Greiner, Russell
and Hindle, Abram",
…

image

hadisfr commented 6 years ago

Also, it fails to render first name of author in misc types; e.g.:

@misc{code:safari18:pybiclique,
  title = {pybiclique},
  author = {Hadi Safari},
  howpublished = {\url{https://github.com/hadisfr/pybiclique}}
}

image

ig0774 commented 6 years ago

The second one is the expected behaviour, i.e., the default format is:

{author_short} {year} - {title_short} ({keyword})

Where {author_short} is either 1) the last name of a single-author piece, 2) the last names of both authors conjoined with an & for a two-author piece, or 3) the last name of the first author with "et. al." for a multiple author piece. You can change the format in your sublime settings to something like:

{author} {year} - {title_short} ({keyword})

which will give you everything in the name field, though this may cause the year, title and keyword to not be displayed.

ig0774 commented 6 years ago

The first problem can be fixed by changing the bibliography setting to "new". The difference between the two bibliographies is that the "new" bibliography reader uses a proper parser, so it handles cases like this, but as a result it can perform worse that the "traditional" bibliography reader that uses regexes, but has some pretty fixed formatting requirements and doesn't support multiline values.

ig0774 commented 6 years ago

Note that you may have to completely delete the LaTeXTools cache to see the results.

hadisfr commented 6 years ago

Thank you. For the second one, I expected first name. For the second one, I didn't know limitations of traditional parser. It may be a good idea to add what you have said in https://github.com/SublimeText/LaTeXTools/issues/1361#issuecomment-415465560 to docs. 🤔

Besides, when do you think version 4 will be out? There are many pending pull requests.