Closed oopsroger closed 8 years ago
@oopsroger Probably an issue with the bibliography and the new parsing not working as expected as in #686. When you type \cite{
could you open the console (in the menu View|Console
) and see what error you get?
@ig0774 Same issue for me with the new updates.
Error details:
Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 574, in run_
return self.run(edit)
File "/home/nxkr/.config/sublime-text-3/Packages/LaTeXTools/latex_cite_completions.py", line 743, in run
completions, prefix, post_brace, new_point_a, new_point_b = get_cite_completions(view, point)
File "/home/nxkr/.config/sublime-text-3/Packages/LaTeXTools/latex_cite_completions.py", line 656, in get_cite_completions
completions = run_plugin_command('get_entries', *bib_files)
File "/home/nxkr/.config/sublime-text-3/Packages/LaTeXTools/latex_cite_completions.py", line 414, in run_plugin_command
result = _run_command(plugin_name)
File "/home/nxkr/.config/sublime-text-3/Packages/LaTeXTools/latex_cite_completions.py", line 375, in _run_command
result = getattr(plugin, command)(*args, **kwargs)
File "/home/nxkr/.config/sublime-text-3/Packages/LaTeXTools/bibliography_plugins/traditionalBibliography.py", line 130, in get_entries
bib_data = parser.parse(bibf.read())
File "/home/nxkr/.config/sublime-text-3/Packages/LaTeXTools/bibliography_plugins/bibtex/parser.py", line 57, in parse
self.tokens = self.lexer.tokenize(s)
File "/home/nxkr/.config/sublime-text-3/Packages/LaTeXTools/bibliography_plugins/bibtex/lexer.py", line 88, in tokenize
self.token_error()
File "/home/nxkr/.config/sublime-text-3/Packages/LaTeXTools/bibliography_plugins/bibtex/lexer.py", line 289, in token_error
self.code[self.current_index:].split('\n', 1)[0]
SyntaxError: 25:262 - unrecognised token "."
@nxkryptor: That actually looks like it might be an error in your bibtex file (a .
where a ,
should be or something), but I can try to make the parsing more lenient. Could you by any chance work out which entry is causing the error (I'm none to sure that the line number info is exactly accurate) and perhaps post a copy here so I can take at look at it? Thanks for the error report.
@ig0774 My bad. It was a '.' that created the problem. It works fine.
@ig0774 Thanks for the reply. The errors I got with \citet{ are as follows. It seems a bit different from @nxkryptor 's error, especially in the last line. I don't know how to interpret these messages. Could you help me with that? Many thanks!
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 574, in run_ return self.run(edit)
File "/Users/caizp/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/latex_cite_completions.py", line 743, in run completions, prefix, post_brace, new_point_a, new_point_b = get_cite_completions(view, point)
File "/Users/caizp/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/latex_cite_completions.py", line 656, in get_cite_completions completions = run_plugin_command('get_entries', *bib_files)
File "/Users/caizp/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/latex_cite_completions.py", line 414, in run_plugin_command result = _run_command(plugin_name)
File "/Users/caizp/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/latex_cite_completions.py", line 375, in _run_command result = getattr(plugin, command)(*args, **kwargs)
File "/Users/caizp/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/bibliography_plugins/traditionalBibliography.py", line 105, in get_entries bib_data = parser.parse(bibf.read())
File "/Users/caizp/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/bibliography_plugins/bibtex/parser.py", line 57, in parse self.tokens = self.lexer.tokenize(s)
File "/Users/caizp/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/bibliography_plugins/bibtex/lexer.py", line 88, in tokenize self.token_error()
File "/Users/caizp/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/bibliography_plugins/bibtex/lexer.py", line 289, in token_error self.code[self.current_index:].split('\n', 1)[0]
SyntaxError: 1701:3 - unrecognised token "__markedentry
@oopsroger My problem is fixed. It was a '.' instead of ','.
@nxkryptor I went to 1701:3 in my .bib file and find the following:
@Article{ozcan_sebnem_2008, Title = {The uncertain lifetime and the timing of human capital investment}, Author = {Kalemli-Ozcan, Sebnem}, Journal = {Journal of Population Economics}, Year = {2008}, Number = {3}, Pages = {557-572}, Volume = {21}, Abstract = {I examine the effects of mortality decline on fertility and human capital investment decision of parents taking into account the uncertainty about child survival. I propose a model, where parents decide on their fertility before the uncertainty is realized, but they choose to invest only in human capital of their surviving children. The model implies a positive relationship between mortality and fertility and a negative one between mortality and educational investment. It has been argued elsewhere that as, in reality, most of the mortality decline occurred in infancy, it should not affect the human capital investment decision, which comes later in life. Thus, increased survival chances should not promote growth by raising the human capital investment. This paper argues the contrary and proposes a mechanism where mortality decline at any age before the teen years can promote growth by raising human capital investment regardless of the timing of the educational investment.}, ISSN = {0933-1433}, Publisher = {Springer-Verlag} }
Line 1701 starts at Abstract. There seems to be nothing wrong here.
@oopsroger: ah ok! That issue's been fixed in v3.7.3 already, but you may need to restart after the update for the update to take effect.
@ig0774 it worked. Bravo! Many Thanks for the really quick fix!!!!!!
It worked perfectly fine before the recent update. After the update, '\ref{ ' also works ok. But \cite or \citet does not trigger the list of bib keys. In the setting, auto trigger are set to "true". Am I missing something?