Sublime Forum

LaTeXTools - Errors after update

#1

@deathaxe, I want to thank you for all the work you have put in the last month to improve LaTeXTools!

My ST automatically updated LaTeXTools recently, and now I am unable to compile a couple of projects. I dig a little bit and I identified two issues after the update. The first seems a little easier. I usually put a comment on the top of my Bib files using the %. This seems to create an issue now, where a message No bib files found is given. Is it possible to revert back to the previous behavior, where comments where stripped out?

The second issue is that no matter what I do, I cannot make the references to appear in the document. It seems the issue is related to finding Bib files, which contain references. I created a simple “supposedly” working example below. The first file is in the Testing folder, it is named Example.tex and contains the following code:

\documentclass[11pt]{article}
\usepackage[hmargin=1.0in, vmargin=1.0in, headsep=0.15in, showframe=false, portrait, letterpaper]{geometry}
\usepackage[doublespacing]{setspace}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[authordate, giveninits=true, uniquename=false, backend=biber, maxcitenames=3, backref=false]{biblatex-chicago} % Prepares the References section.
	\AtBeginBibliography{\footnotesize}
	\def\UrlFont{\tt} % Formats the url links as typewriter.
	\addbibresource{../References/Papers.bib} % Obtains references of working papers.

\begin{document}

\section{Introduction} \label{sec_introduction}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\begin{align*}
	x_{i,t} = y_{i,t} + 9 \\
	x_{i,t}^{2} = y_{i,t} + 7
\end{align*}

\section{Model} \label{sec_model}

According to \cite{BebchukGrinsteinPeyer2010}.

\end{document}

The second file is in the Testing/References folder, it is named Papers.bib and contains the following code:

@article{BebchukGrinsteinPeyer2010,
	title={Lucky CEOs and lucky directors},
	author={Bebchuk, Lucian A and Grinstein, Yaniv and Peyer, Urs},
	journal={The Journal of Finance},
	volume={65},
	number={6},
	pages={2363--2401},
	year={2010},
	publisher={Wiley Online Library}
}

I am getting the following errors:

[Compiling C:\Users\user_name\Desktop\testing\Example.tex]

Basic Builder: running pdflatex...done.
running biber...done.
running pdflatex...done.
running pdflatex...done.

No errors. Warnings:

C:\Users\user_name\Desktop\testing\Example.tex:29: LaTeX Warning: Citation 'BebchukGrinsteinPeyer2010' on page 1 undefined on input line 29.
C:\Users\user_name\Desktop\testing\Example.tex: LaTeX Warning: There were undefined references.
C:\Users\user_name\Desktop\testing\Example.tex: Package biblatex Warning: Please (re)run Biber on the file:(biblatex) Example(biblatex) and rerun LaTeX afterwards.

C:\Users\user_name\Desktop\testing\Example.log:1: Double-click here to open the full log.

[Done!]

0 Likes

#2

Thank’s for your sophisticated feedback.

v4.0.0 is a massive overhaul of the whole plugin ecosystem, most of the changes having been made between 2017 … 2020. Still learning how things fit together. Hence verbose feedback with examples certainly helps finding regressions and bugs. I haven’t been involved in those changes, yet.

Comments

Issues with comments seem to be caused by vendored bibtex library, which seems not to ignore commented bib entries, causing parse errors.

I was able to reproduce it only after setting:

	"bibliography": "new",

That’s certainly an issue with the “new” bibtex driven parser. I’ll have to look into it, to see what I can do.

Completions and Build

The only issue I can find in your example is \addbibresource{../References/Papers.bib}.

According to your folder structuer:

  • Testing\Example.tex
  • Testing\References\Papers.bib

changing it to \addbibresource{References/Papers.bib} (removing ../) fixes all issues.

The main Tex file (Example.tex) specifies the project’s root directory and is used to resolve relative paths.

Both, completions and pdf creation work after that change.

0 Likes

#3

Thank you for the detailed reply. First, you are correct that there was a mistake in my code. I should have used ./References/Papers.bib, as a single dot means same folder, and double dot means a folder above the directory tree.

Now, it seems that installing biber fixed the issue. I had never installed biber before, and used bibtex instead to process bibliography information. Can you please check if bibtex could still be an option for users?

I can confirm that I have "bibliography": "new", in my settings. It is much nicer.

I’m still getting several errors that I have to dig dipper into. Can you please let me know how to downgrade temporarily to the previous LaTeXTools version just to get back to my work? Thank you!

0 Likes

#4

To downgrade, you’d need to remove it first and than

  1. git clone https://github.com/SublimeText/LaTeXTools.git into ST’s Packages directory.
  2. git checkout st3-3.15.1

About biber:

  • basic builder seems to be designed to either use biber or biblatex.

  • traditional builder however just runs texify or latexmk to create pdfs. Maybe that one invokes bibtex instead, if available.

I finally don’t know enough about LaTeX ecosystem and which tools are used when to do certain things. Available options seem actually be a bit of a long lasting mess and it seems not being viable or possible to support all sorts of combinations.

I’ve fixed the bibtex parser issue this afternoon. It’s available in st3 branch. There are however still some issues with image/math preview I want to address before a next release.

0 Likes

#5

FWIW, I have various test documents, which bibtex is executed. Basic builder uses log output to decide which one to use.

0 Likes