Comments (6)
I have the same problem. I tracked it down to @comment entries in my .bib file. These entries are inserted by BibDesk to keep track of reference groups. The lines that cause the problem for me are:
@comment{BibDesk Smart Groups{
The completion code looks for lines that start with @ and then expects to be able to match them with this regexp:
kp = re.compile(r'@[^\{]+\{(.+),')
which requires a comma at the end of the line. For the comment lines, this crashes producing the error that you are seeing (or at least I get the same message).
I work-around the problem by adding a ? after the comma in the regular expression. This allows completion to work, with a side-effect that the comment prefix is also offered up as a completion.
A proper fix would be to have a more complex check that lines beginning with @ are actually bib entries, not something else such as a comment.
from latextools.
Oh goodness... and I thought I had tamed bib files :-( I can't promise a quick fix but I'll take a look. I am thinking about parsing the file differently for other reasons anyway...
from latextools.
After seeing #50, I wanted to add that my two bib files do not have @comment, but the longer one has a 2 line header
Automatically generated by Mendeley 1.3.1
Any changes to this file will be lost if it is regenerated by Mendeley.
and the 'abbr' file is a series of @string entries (these convert 'variables' in bib files to longer strings, e.g. ACM = "Associ. Computing Machinery"
from latextools.
Closing for now, as this may be solved with new parsing code (please be patient)
from latextools.
I suggest the following fast fix (at least, it is working for me):
line 369 of latex_cite_completions.py
keywords = [kp.search(line).group(1).decode('ascii','ignore') for line in bib if line[0] == '@']
should be changed to
keywords = [kp.search(line).group(1).decode('ascii','ignore') for line in bib if line[0] == '@' and kp.search(line)]
from latextools.
Thanks, that solved my problems with Bibdesk generated bib files.
from latextools.
Related Issues (20)
- math preview issue with different commands HOT 2
- Useless cmd window opened with the viewer HOT 1
- Issue with auto close of dollars
- Can't switch to xelatex or lualatex
- only ctrl+b not working,the editor only not responsed ctrl+b
- script incompatible with sync
- Barckward search broken on evince (GTK4?) HOT 2
- I don't find a way to get rid of error labels after typesetting
- Bibliography doesn't get printed when using biblatex and \nocite{*} HOT 2
- Autofill helper does not appear for cite, ref, input HOT 1
- Bibliography doesn't get printed when using biblatex and \nocite{*} HOT 1
- Bibliography doesn't get printed when using biblatex and \nocite{*} HOT 1
- Bibliography not showing on Windows 10 HOT 2
- Image preview cannot work in sub directory.
- texpath needs to be before $PATH in LaTeXTools.sublime-settings on linux?
- install not popping up on ST4
- PDF hidden on macOS after using aux folder
- Log parsing issue: build panel refers errors to a wrong file.
- LaTeX-cwl prevents snippets from appearing in the autocompletion list HOT 1
- Latextools does not compile document that is compiled in Overleaf
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latextools.