0

the problem that I have is that some references appears as numbers and some of them appears as author names. The problem is that I only want numbers. The .tex compiles without any error. I tried to edit the bib file but still the reference appears in names and numbers. I tried deleting the .blb file and compile again but nothing was changed. I tried to delete the .aux file and compile again but still it didn't correct anything. The bibliography file was created using BibDesk. I have upload an image to check it out.

\usepackage[sorting=none]{biblatex}

\addbibresource{bib1.bib} 

enter image description here

ArTourter
  • 17,315
  • What if you add style=numeric to your biblatex options? – Alenanno Jan 16 '16 at 18:55
  • isn't it biblatex's way of saying that it cannot find the reference. Instead of printing [??] it prints [key]. – ArTourter Jan 16 '16 at 19:00
  • Just did, \usepackage[sorting=none,numeric]{bib latex}, and I got an error Package keyval error:numeric undefined. I have also checked the reference in the bib file and it appears there. – Petros Mourouzis Jan 16 '16 at 19:01
  • No, add style=numeric. But if you still have problems after that, then @ArTourter may be right. Are you sure you're using the right key to call the citation? Check for wrong spellings. – Alenanno Jan 16 '16 at 19:02
  • Nothing again, I have checked the bib file and from 181 references that i have 80 of them appears as author names. I checked twice for spelling but everything is ok. I erase the blb file and run it again but with the same results.. – Petros Mourouzis Jan 16 '16 at 19:18
  • Can you post then a small document including the preamble? The text of the document is not important, but the code is. – Alenanno Jan 16 '16 at 19:23
  • can you also post the output log from biber? it may shed some light as to what it thinks is going on. – ArTourter Jan 16 '16 at 19:28
  • 1
    The bold-listed entries could not be found. You need to rerun biber, and there should be a warning message to that effect at the end of your .log. – Werner Jan 16 '16 at 19:35
  • The .bib file has the references, but i believe Werner is right because at the end of the log there is: LaTeX Warning: There were undefined references.

    Package biblatex Warning: Please (re)run Biber on the file: (biblatex) phd (biblatex) and rerun LaTeX afterwards..... Because I am rather new in Latex how do i do that?..

    – Petros Mourouzis Jan 16 '16 at 19:49

1 Answers1

1

Biblatex, unlike bibtex, will use the key in bold in the document, intead of the bold question marks, to show that the reference is not found.

Consider the following example:

\documentclass{article}
\usepackage[sorting=none,style=numeric]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{bib1.bib}
@article{foo,
    author = {foo, h.},
    title = {some random title},
    journaltitle = {a journal},
    year = {2014},
}
\end{filecontents}

\addbibresource{bib1.bib}

\begin{document}

some text \cite{foo} but also \cite{bar}.

\end{document}

It will produce the output

some text [1] but also [bar].

and in the logs, you should see something like:

./main.bbl:
Package biblatex Warning: The following entry could not be found
(biblatex) in the database:
(biblatex) bar
(biblatex) Please verify the spelling and rerun
(biblatex) LaTeX afterwards.

ArTourter
  • 17,315
  • Yes, I understand. I mis-believe that if the references are in the .bib file there will be no problem, how do i rerun Biber? – Petros Mourouzis Jan 16 '16 at 19:58
  • I open a terminal window i type biber filename.tex i got ERROR: did you pass the "backend=biber" option to BibLaTeX? @ArTourter – Petros Mourouzis Jan 16 '16 at 20:48
  • biber should be run on the .aux file not the .tex file. you can leave the extension out altogether and it will pick the correct file – ArTourter Jan 16 '16 at 20:52
  • Still the same error: Cannot find control file 'phd.aux.bcf'! - did you pass the "backend=biber" option to BibLaTeX? – @ArTourner... (sorry for the mentions) – Petros Mourouzis Jan 16 '16 at 21:29
  • I put \usepackage[sorting=none, backend=biber]{bib latex} in the code but still nothing – Petros Mourouzis Jan 16 '16 at 22:25
  • biber should be the default backend on the latest texlive (if not the one before) so you should not have to specify it. What was your workflow before? how did you compile your document? I would suggest clearing all the temporary files and recompile from scratch and see what it does. – ArTourter Jan 16 '16 at 23:43
  • I didn't realised that i would have so much references with author names, so when a reference with an author name appeared I erased the .blb file, wrote the reference in the .bib and it was corrected. So I thought that I could correct all of the others later and i continued........Now I erased all the temporary files (.aux, .bbl, .bcf, .big, .idx, ilg, .ind, .lof, log, .lot, .toc, .synctex.gz) compile it and nothing happen, the files were created again in the same folder and again there was references with numbers and with author names.. – Petros Mourouzis Jan 17 '16 at 00:17
  • Sorry my mistake, bib didn't create again in the same folder and left me with only author names. When i put back the .blb (back up file) again it compiles with author names and numbers – Petros Mourouzis Jan 17 '16 at 00:25
  • how do you compile your document? you need to do pdflatex>biber>pdflatex>pdflatex. the biber part is what creates your blb from the call in the document. every time you add a citation in your document you need to redo the whole thing – ArTourter Jan 17 '16 at 02:04
  • Please note that Biber should be run on the .bcf and not the .aux file (BibTeX needs to run on the .aux, though). I think it is much better to leave out the file extension as you suggested above. – moewe Jan 17 '16 at 08:38
  • thanks for the correction @moewe, I always forget about this. I knew it wasn't the .tex but I never actually use the extensions when invoking the commands – ArTourter Jan 17 '16 at 11:36