LaTeX forum ⇒ BibTeX, biblatex and biberSteps to troubleshoot 'undefined references' in Linux

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
erwann
Posts: 70
Joined: Thu Aug 25, 2016 2:24 am

Steps to troubleshoot 'undefined references' in Linux

Postby erwann » Fri Sep 07, 2018 10:04 pm

Made a copy of the bib file in directory to rule out path problem. I get the message:

  1. LaTeX Warning: There were undefined references.
  2.  
  3. )</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
  4. Output written on LaTeX.pdf (1 page, 17326 bytes).
  5. Transcript written on LaTeX.log.
  6.  
  7. TeX Output finished at Fri Sep 7 15:59:55


I don't recall having such problems under Mac. Now I'm on Linux Mint 18.3

  1. %Content of en-math.bib:
  2. %@book{golub-96,
  3. % Author = {Charles H. Golub and Charles F. Van Loan},
  4. % Date-Added = {2017-05-23 23:29:35 +0000},
  5. % Date-Modified = {2017-05-23 23:31:30 +0000},
  6. % Isbn = {0-8018-5414-8},
  7. % Publisher = {The Johns Hopkins University Press},
  8. % Title = {Matrix computations},
  9. % Year = {1996}}


  1. \documentclass{article}
  2. %\usepackage{natbib}
  3.  
  4. \begin{document}
  5.  
  6. \cite{golub-96}
  7.  
  8. %\bibliography{/home/er/Documents/essential/share/LaTeX/bib/en-math/en-math.bib}
  9. \bibliography{en-math.bib} % local copy
  10. \bibliographystyle{plainnat}
  11.  
  12. % This works:
  13. %\begin{thebibliography}{}
  14. %\bibitem{golub-96} Charles H. Golub and Charles F. Van Loan, {\em Matrix computations}, 1996
  15. %\end{thebibliography}
  16.  
  17. \end{document}


Compile message:


Log:
  1. This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex 2018.6.16) 7 SEP 2018 15:59
  2. entering extended mode
  3. restricted \write18 enabled.
  4. file:line:error style messages enabled.
  5. %&-line parsing enabled.
  6. **\input LaTeX.tex
  7. (./LaTeX.tex (/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
  8. Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
  9. (/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo
  10. File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
  11. )
  12. \c@part=\count80
  13. \c@section=\count81
  14. \c@subsection=\count82
  15. \c@subsubsection=\count83
  16. \c@paragraph=\count84
  17. \c@subparagraph=\count85
  18. \c@figure=\count86
  19. \c@table=\count87
  20. \abovecaptionskip=\skip41
  21. \belowcaptionskip=\skip42
  22. \bibindent=\dimen102
  23. ) (./LaTeX.aux)
  24. \openout1 = `LaTeX.aux'.
  25.  
  26. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.
  27. LaTeX Font Info: ... okay on input line 4.
  28. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.
  29. LaTeX Font Info: ... okay on input line 4.
  30. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.
  31. LaTeX Font Info: ... okay on input line 4.
  32. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.
  33. LaTeX Font Info: ... okay on input line 4.
  34. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.
  35. LaTeX Font Info: ... okay on input line 4.
  36. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.
  37. LaTeX Font Info: ... okay on input line 4.
  38.  
  39.  
  40. LaTeX Warning: Citation `golub-96' on page 1 undefined on input line 6.
  41.  
  42. No file LaTeX.bbl.
  43. [1
  44.  
  45. {/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
  46. (./LaTeX.aux)
  47.  
  48. LaTeX Warning: There were undefined references.
  49.  
  50. )
  51. Here is how much of TeX's memory you used:
  52. 203 strings out of 492646
  53. 2170 string characters out of 6129563
  54. 58970 words of memory out of 5000000
  55. 4174 multiletter control sequences out of 15000+600000
  56. 3948 words of font info for 15 fonts, out of 8000000 for 9000
  57. 1141 hyphenation exceptions out of 8191
  58. 23i,4n,22p,120b,107s stack positions out of 5000i,500n,10000p,200000b,80000s
  59. </usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
  60. ></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
  61. Output written on LaTeX.pdf (1 page, 17326 bytes).
  62. PDF statistics:
  63. 16 PDF objects out of 1000 (max. 8388607)
  64. 10 compressed objects within 1 object stream
  65. 0 named destinations out of 1000 (max. 500000)
  66. 1 words of extra memory for PDF output out of 10000 (max. 10000000)
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

Tags:

rais
Posts: 170
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sat Sep 08, 2018 12:54 am

erwann wrote:
  1. %Content of en-math.bib:
  2. %@book{golub-96,
  3. % Author = {Charles H. Golub and Charles F. Van Loan},
  4. % Date-Added = {2017-05-23 23:29:35 +0000},
  5. % Date-Modified = {2017-05-23 23:31:30 +0000},
  6. % Isbn = {0-8018-5414-8},
  7. % Publisher = {The Johns Hopkins University Press},
  8. % Title = {Matrix computations},
  9. % Year = {1996}}


you need to get rid of the percent signs leading `@book' and all consecutive lines here
erwann wrote:LaTeX Warning: Citation `golub-96' on page 1 undefined on input line 6.

On the first run, that is quite normal. The citations are collected in the .aux file for BibTeX to work with, but BibTeX has not been called, yet.
erwann wrote:No file LaTeX.bbl.

You need to run BibTeX on your LaTeX[.aux] file.
Afterwards, you need to run (pdf)LaTeX again twice to resolve the reference(s).
If this reference is still undefined, have a look at the LaTeX.blg file (which is BibTeX's log file) and check for errors/warnings in there.

KR
Rainer

erwann
Posts: 70
Joined: Thu Aug 25, 2016 2:24 am

Postby erwann » Tue Sep 11, 2018 11:00 pm

you need to get rid of the percent signs leading `@book' and all consecutive lines here


The reference with % on each line was preceded by

  1. %Content of en-math.bib:


so no reason to think that there is a leading % in the bib file itself.

*.blg:
  1. This is BibTeX, Version 0.99d (TeX Live 2015/Debian)
  2. Capacity: max_strings=4000, hash_size=5000, hash_prime=4253
  3. The top-level auxiliary file: LaTeX.aux
  4. I couldn't open database file en-math.bib
  5. ---line 3 of file LaTeX.aux
  6. : \bibdata{en-math
  7. : }
  8. I'm skipping whatever remains of this command
  9. I couldn't open style file plainnat.bst
  10. ---line 4 of file LaTeX.aux
  11. : \bibstyle{plainnat
  12. : }
  13. I'm skipping whatever remains of this command
  14. I found no database files---while reading file LaTeX.aux
  15. I found no style file---while reading file LaTeX.aux
  16. You've used 1 entry,
  17. 0 wiz_defined-function locations,
  18. 86 strings with 507 characters,
  19. and the built_in function-call counts, 0 in all, are:
  20. = -- 0
  21. > -- 0
  22. < -- 0
  23. + -- 0
  24. - -- 0
  25. * -- 0
  26. := -- 0
  27. add.period$ -- 0
  28. call.type$ -- 0
  29. change.case$ -- 0
  30. chr.to.int$ -- 0
  31. cite$ -- 0
  32. duplicate$ -- 0
  33. empty$ -- 0
  34. format.name$ -- 0
  35. if$ -- 0
  36. int.to.chr$ -- 0
  37. int.to.str$ -- 0
  38. missing$ -- 0
  39. newline$ -- 0
  40. num.names$ -- 0
  41. pop$ -- 0
  42. preamble$ -- 0
  43. purify$ -- 0
  44. quote$ -- 0
  45. skip$ -- 0
  46. stack$ -- 0
  47. substring$ -- 0
  48. swap$ -- 0
  49. text.length$ -- 0
  50. text.prefix$ -- 0
  51. top$ -- 0
  52. type$ -- 0
  53. warning$ -- 0
  54. while$ -- 0
  55. width$ -- 0
  56. write$ -- 0
  57. (There were 4 error messages)


Screenshot from 2018-09-11 16-58-02.png
Screenshot from 2018-09-11 16-58-02.png (28.53 KiB) Viewed 68 times

Screenshot from 2018-09-11 16-51-27.png
Screenshot from 2018-09-11 16-51-27.png (35.34 KiB) Viewed 68 times
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

rais
Posts: 170
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Wed Sep 12, 2018 12:27 am

erwann wrote:The reference with % on each line was preceded by

  1. %Content of en-math.bib:


so no reason to think that there is a leading % in the bib file itself.

why did you present it in this way here, then? You could've just copied its contents, a bib file is plain text, after all.
erwann wrote:
  1. This is BibTeX, Version 0.99d (TeX Live 2015/Debian)

Interesting. Your BibTeX is from TL15, yet according to your previous log file, you're on TL18. Perhaps the TL15 version is found prior to its TL18 counterpart? Mayhap it doesn't look for the pathes set in TL18...
erwann wrote:
  1. I couldn't open database file en-math.bib

That might explain, why your en-math.bib isn't found (even in same directory as .aux file).
On a console, try
  1. which bibtex

and check, where your BibTeX really comes from.

KR
Rainer


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 0 guests