I'm working on my thesis and I decided to do it in LaTeX. I was using an amazing online service, ShareLatex, that allowed me to compile and edit my projects wherever I go (I use several computers in a day and I'm not allowed to install anything in most of them). Eventually, my thesis grew big (the free service was struggling in compiling the whole project) and besides, the last weekend I lost my connection to internet so I couldn't work on it. I decided to install in my xubuntu 14.04 the texlive-full package.

Everything was working right, except that references file (.bib) were not found. I have a folder called "secciones" where I put the different sections, (.tex) and "refs", where all the references files (i.e .bib) go. So, I'm using the package subfiles to compile the whole project using several files. This is what my main.tex file looks like





        \chapter{Materiales y métodos}



        \chapter{Conclusiones y líneas futuras}




Files in "secciones" folder are those specified within \subfile commands. the problem is that, having this main the compilation is successfully in ShareLatex, given that refs.tex file's content is



and my bibliography file is biblio.bib. This, however, produces errors in my computer. First of all, I got the error ! LaTeX Error: File 'secciones/refs.tex' not found. The way of getting it right in my computer is using \subfile{refs} in main.tex and \bibliography{../refs/biblio} in refs.tex. This solution fails to get it right in shareLatex, giving the warning of undefined references. (Probably failing to get the right path to biblio.bib)

My question: how to solve my problem? I want a single project I can edit without changing paths everytime I change to online from offline or vice versa. Also, suggestions about setting up my workspace are welcome (I, however, prefer to maintain using sublime-text for compiling`

TeX compilators:

    online: pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2016.1.12)

    offline: sublime-text with latextools, set to TraditionalBuilder: Engine: pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) 
  • A warm welcome to TeX.SE! I faced a similar problem, using an online service that I found slow to compile. I ended up effectively abandoning the online service and making my own workflow where I write in google docs. When I want to compile my work, I use wget to pull the text of the gdoc file into my own machine and compile there. That has the advantage of an online file store, but one that is copied locally and compiled locally. I also know some folks use git in much the same way. – A Feldman May 3 '16 at 8:18
  • I think perhaps the standalone package might help. ctan.org/pkg/standalone?lang=en – A Feldman May 3 '16 at 8:20
  • @AFeldman thanks for your answer. I would take a look on standalone package. However, I don't want to drop the online service because it satisfies most of my needs. I want to preserve it and I want to make my files consistent across different compilators – mrbolichi May 3 '16 at 9:27
  • I didn't really understand why you need different configurations, but I would probably write \bibliography{\bibpathprefix refs/biblio.bib} and then create two small configurations files -- one in sharelatex the other on your pc with \newcommand\bibpathprefix{} and \newcommand\bibpathprefix{../} respectivly. Addition: As \jobname is "output" in sharelatex you can also set the pathes through a test. – Ulrike Fischer May 3 '16 at 10:50
  • 1
    For everyone who answered here: I contacted sharelatex and they finally replied. There seems to be some king of bug in their system and they are aware of that. So, nothing to do until they solve it. – mrbolichi May 7 '16 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.