## LaTeX forum ⇒ General ⇒ Referencing not working - probably very easy but I'm lost Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
timbob04
Posts: 12
Joined: Mon Jan 14, 2019 7:45 pm

### Referencing not working - probably very easy but I'm lost

Hi all,

Could someone please help me with an issue I am having getting references to work.

I wrote my thesis with everything being fine, but now with a move to a new country and some last minute corrections to perform, referencing has completely stopped working for me. I can't even get this to work with a very minimal MWE:

\documentclass{article} \usepackage{natbib}\bibliographystyle{unsrtnat} \begin{document} Reference here: \cite{hodgkin1952quantitative}. \bibliography{references} \end{document}

with the references document being in the same directory and looking like this (obtained from google scholar):

@article{hodgkin1952quantitative,  title={A quantitative description of membrane current and its application to conduction and excitation in nerve},  author={Hodgkin, Alan L and Huxley, Andrew F},  journal={The Journal of physiology},  volume={117},  number={4},  pages={500--544},  year={1952},  publisher={Wiley Online Library}}

I have also tried the apacite package (with apacite also as the bibliographystyle). No matter what I reference, they always appear as question marks in the text and are not in the bibliography.

I have added the log (or what I think is the log - the text file latex creates and places into the working directory), hopefully giving some answers.

If anyone could help with this I would be very grateful. I need to resubmit my thesis and time is slowly disappearing

I am currently using MiKTeX and the TeXworks interface, but this problem still persists with texmaker.

Apologies if this is something very simple. I'm a bit lost on the issue.

Tim
Attachments
test1.log
This is the text log document printed into the working directory.

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Open your file in texmaker.
Press F6. Wait a moment.
Press F11. Wait a moment.
Press F6. Wait a moment.
Press F6 again. Wait a moment.

What do you get?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

timbob04
Posts: 12
Joined: Mon Jan 14, 2019 7:45 pm
Hi Johannes_B,

I tried this but it did not work. I have attached the log file I get after pressing F11.

I also tried pressing F7 at the end of the sequence you sent (a suggestion to a vaguely similar problem in a different forum). This also did not work. At every stage of the process, an error appears stating no reference of bibliography file can be found. This is also what the command line shows:

Process started

This is BibTeX, Version 0.99d (MiKTeX 2.9.6930 64-bit) The top-level auxiliary file: test1.aux The style file: unsrtnat.bst Database file #1: references.bib Warning--I didn't find a database entry for "hodgkin1952quantitative" (There was 1 warning)

Process exited normally

Could this be something to do with the references file not being in the right place? I've never had this problem before. I've also just had my list of references in the main directory (the directory to which the main latex file is. test1.tex in this example), or I have a very straight forward link to it (e.g. \bibliography{Refs/references})

Please let me know if you see anything in the log file or have any other suggestions.

Tim
Attachments
test1.log

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Can you mock up a different entry in the bib-database completely by hand (not copy/paste)?

Is this found after the whole F6,F11,F6,F6 chain? What does the BibTeX-log say?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

timbob04
Posts: 12
Joined: Mon Jan 14, 2019 7:45 pm
Hi Jonannes_B,

Thanks again for the reply. What do you mean by mock up a different bib-database?

Can you mock up a different entry in the bib-database completely by hand (not copy/paste)?

I have not done this before.

Also, I attached the log file for my latex session in the last two messages, I think (if they are the log - the text files).

This problem is quite weird as it has now happened on two computers in which I have downloaded MiKTex and then Texmaker as the GUI (or just MiKTeX on its own). And the problem persists with the very simple MWE shown before.

Tim

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
The problem is very weird indeed. Add another entry to the bib file
@article{wombat,author="wombat",}

And try to reference this.

The log file does not contain any hints so far.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9440
Joined: Mon Mar 10, 2008 9:44 pm
My first idea was, the .aux file could have been lost, such as with an editor setting "Remove auxiliary files after compiling", such cleaning option.

Second idea, invisible characters.

Can you please post the files that fail? The test files are sufficient, if they show the same failure. So, I mean, the .tex and .aux and .bib files, plus .log and .blg and .bbl - the best would be to see all that are created.

Stefan

timbob04
Posts: 12
Joined: Mon Jan 14, 2019 7:45 pm
Hi both,

Thank you both very much for the advice. I tried using this as the reference (in my references file)

@article{wombat,
author="wombat",
}

and it didn't work unfortunately.

I am attaching all the files you mentioned Stefan Kottwitz (here and in the next messages) (think there may be a limit). On my computer, all these attached files are in the same folder.

Thanks again

Tim
Attachments
test1.blg
test1.bbl
references.tex
references.log

timbob04
Posts: 12
Joined: Mon Jan 14, 2019 7:45 pm
Here are the extra files mentioned in my previous message.

This forum won't let me upload the test1.aux file for some reason.

Tim
Attachments
test1.tex
test1.synctex.gz
test1.pdf
test1.log

Stefan Kottwitz
Posts: 9440
Joined: Mon Mar 10, 2008 9:44 pm
Hi,

this is what I see when I tested test1 and the references file:

This is BibTeX, Version 0.99d (TeX Live 2017)The top-level auxiliary file: test1.auxThe style file: unsrtnat.bstI couldn't open database file references.bib---line 4 of file test1.aux : \bibdata{references :                    }I'm skipping whatever remains of this commandI found no database files---while reading file test1.auxWarning--I didn't find a database entry for "hodgkin1952quantitative"(There were 2 error messages)

The problem, at least here with the attachments, is that the reference file has the wrong file name extension. Instead of references.tex it should be named references.bib.

Stefan