0

I wrote my thesis with Sweave (R+LaTeX). Everything went fine until I bought a new computer. I copied the Sweave file (.Rnw) with all figures and tables, as well as with the bibliography (.bib).

When I compile the file on my new computer, everything is fine, text, figures, tables and layout.... BUT:

  • every in-text reference is a question mark, although the bibliography at the end of the document is 100% (number, title etc).

  • every cross-reference for the figures and tables is a double question mark, although the figures and tables are 100% (number, title etc).

Any idea of what is wrong?

Thanks, Elsa

\documentclass[a4paper,12pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\usepackage{colortbl}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[english=usenglishmax]{hyphsubst}
\usepackage[nottoc]{tocbibind}
\usepackage{tabularx,array}
\usepackage{enumitem}
\usepackage{changepage} 
\usepackage[all]{nowidow}
\usepackage{longtable}
\usepackage{scrextend}
\usepackage{amsmath}
\usepackage{etoolbox}
\usepackage{tikz}
\usepackage{titlecaps}
\usepackage{rotating}
\usepackage{nameref}
\usepackage{pdfpages}
\usepackage{xcolor}
\usepackage{color}
\usepackage{placeins}
\usepackage{pdflscape}
\usepackage{subfigure}
\usepackage{cleveref}
\usepackage{tabularx}
\usepackage[utf8]{inputenc}
\usepackage{floatrow}
\usepackage{float}
\usepackage{titlesec}
\usepackage{arydshln}
\usepackage{amsfonts,amssymb}
\setcounter{secnumdepth}{4}
\bibliographystyle{acm}
\usepackage{alphalph}
\renewcommand*{\thesubfigure}{(\alphalph{\value{subfigure}})}
\renewcommand{\chaptername}{}
\usepackage{graphicx}
\usepackage[justification=justified,format=plain]{caption}
\usepackage{afterpage}

\makeatletter
\renewcommand\@pnumwidth{2cm}
\patchcmd{\l@chapter}{\bfseries}{}{}{}
\makeatother

\begin{document}
%
%
% 
\renewcommand\bibname{References}
\bibliography{TemporalPartitioning2}

\end{document}

Additional information:

The error I get when running bibtex is:

> This is BibTeX, Version 0.99d (MiKTeX 2.9.6840 64-bit) The top-level
> auxiliary file: Draft_PhDThesis_dec2017.aux The style file: acm.bst I
> found no \bibdata command---while reading file
> Draft_PhDThesis_dec2017.aux Warning--I didn't find a database entry
> for "Wulf" Warning--I didn't find a database entry for "Haeckel"
> Warning--I didn't find a database entry for "bioce" Warning--I didn't
> find a database entry for "Strauss" ... (There was 1 error message)

When I look at the .aux file I notice that there is no \bibdata{...} which I believe is created by \bibliography{...}. Not sure what is wrong.

I don't think the problem only lies with the bibtex and the bibliography because the cross-referencing of figures and tables is also not working properly. Unless there are two independent problems, but I don't think so.

The problem definitely lies with the installation because it works fine when I run it on my old laptop... I have not managed to find out what was wrong... if someone can someday shed some light, thanks!

  • 1
    Did you compiled with bibtex? Also, have you tried to compile twice after bibtex with pdflatex? – koleygr Oct 7 '18 at 21:55
  • I assume I am compiling with bibtex. All the reference information is in a .bib file (TemporalPartitioning2.bib), which is called with \bibliography{TemporalPartitioning2}. I compiled the document multiple times. However, I don't know if that has anything to do with my issue, but I get the error message that sweave.sty is not found... – Elsa Bussiere Oct 11 '18 at 8:09
  • Hi @ElsaBussiere, please check this: tex.stackexchange.com/q/153193/120578 – koleygr Oct 11 '18 at 8:17
  • Thanks, I resolved this problem following the instructions on the link you gave me. However, the question marks are still there... – Elsa Bussiere Oct 11 '18 at 9:37
  • Please compile by using pdflatex mainFile then bibtex mainFile and again twice pdflatex mainFile... where "mainFile" is the name of your main file without extensions – koleygr Oct 11 '18 at 9:47
1

I eventually solved the problem. In R studio, I clicked: Tools > Global Options > Sweave > Latex editing and compilation

And there, the box 'clean auxiliary output after compile' was ticked. I unticked it and it now works fine.

Thanks, Elsa

This is a screenshot of the window in which I could change the auxiliary output settings

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.