LaTeX forum ⇒ GeneralReferencing 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

Postby timbob04 » Mon Jan 14, 2019 8:07 pm

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:

  1. \documentclass{article}
  2.  
  3. \usepackage{natbib}
  4. \bibliographystyle{unsrtnat}
  5.  
  6. \begin{document}
  7.  
  8. Reference here: \cite{hodgkin1952quantitative}.
  9.  
  10. \bibliography{references}
  11.  
  12. \end{document}

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

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


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 21 times

User avatar
Johannes_B
Site Moderator
Posts: 4032
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Jan 14, 2019 9:43 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

Postby timbob04 » Tue Jan 15, 2019 12:57 am

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 37 times

User avatar
Johannes_B
Site Moderator
Posts: 4032
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Jan 15, 2019 9:16 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

Postby timbob04 » Wed Jan 16, 2019 6:46 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

User avatar
Johannes_B
Site Moderator
Posts: 4032
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Jan 16, 2019 6:51 pm

The problem is very weird indeed. Add another entry to the bib file
  1. @article{wombat,
  2. author="wombat",
  3. }


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: 9392
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Jan 16, 2019 7:10 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
Site admin

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

Postby timbob04 » Thu Jan 17, 2019 3:54 am

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 27 times
test1.bbl
(283 Bytes) Downloaded 21 times
references.tex
(343 Bytes) Downloaded 21 times
references.log
(12.24 KiB) Downloaded 26 times

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

Postby timbob04 » Thu Jan 17, 2019 3:56 am

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 24 times
test1.synctex.gz
(573 Bytes) Downloaded 25 times
test1.pdf
(29.89 KiB) Downloaded 5 times
test1.log
(2.84 KiB) Downloaded 14 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9392
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Jan 17, 2019 12:29 pm

Hi,

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

  1. This is BibTeX, Version 0.99d (TeX Live 2017)
  2. The top-level auxiliary file: test1.aux
  3. The style file: unsrtnat.bst
  4. I couldn't open database file references.bib
  5. ---line 4 of file test1.aux
  6. : \bibdata{references
  7. : }
  8. I'm skipping whatever remains of this command
  9. I found no database files---while reading file test1.aux
  10. Warning--I didn't find a database entry for "hodgkin1952quantitative"
  11. (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
Site admin


Return to “General”

Who is online

Users browsing this forum: Bing [Bot] and 14 guests