GeneralReferencing not working - probably very easy but I'm lost

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

Post by timbob04 »

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:

Code: Select all

\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):

Code: Select all

@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 :shock: :shock: :shock:

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.

Thanks in advance. Please let me know if any more information is required.

Tim
Attachments
test1.log
This is the text log document printed into the working directory.
(2.84 KiB) Downloaded 394 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

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

Post by Johannes_B »

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

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

Post by timbob04 »

Hi Johannes_B,

Thanks for your reply.

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
(2.84 KiB) Downloaded 385 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

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

Post by Johannes_B »

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

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

Post by timbob04 »

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
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

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

Post by Johannes_B »

The problem is very weird indeed. Add another entry to the bib file

Code: Select all

@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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

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

Post by Stefan Kottwitz »

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
LaTeX.org admin
timbob04
Posts: 12
Joined: Mon Jan 14, 2019 7:45 pm

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

Post by timbob04 »

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
(228 Bytes) Downloaded 366 times
test1.bbl
(283 Bytes) Downloaded 394 times
references.tex
(343 Bytes) Downloaded 408 times
references.log
(12.24 KiB) Downloaded 358 times
timbob04
Posts: 12
Joined: Mon Jan 14, 2019 7:45 pm

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

Post by timbob04 »

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
(189 Bytes) Downloaded 361 times
test1.synctex.gz
(573 Bytes) Downloaded 356 times
test1.pdf
(29.89 KiB) Downloaded 352 times
test1.log
(2.84 KiB) Downloaded 367 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

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

Post by Stefan Kottwitz »

Hi,

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

Code: Select all

This is BibTeX, Version 0.99d (TeX Live 2017)
The top-level auxiliary file: test1.aux
The style file: unsrtnat.bst
I couldn't open database file references.bib
---line 4 of file test1.aux
 : \bibdata{references
 :                    }
I'm skipping whatever remains of this command
I found no database files---while reading file test1.aux
Warning--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
LaTeX.org admin
Post Reply