1

Can somebody help, I can't get my bibtex to work. I've tried reading other similar questions on the site, but I really don't see what I need to do in my case. It looks like I need to run the bib-file, but how do you run a bib-file? Furthermore, when I press run in my document where I want my references in, it just comes op with "file not found" and "empty bibliography". Hopefully somebody can help me.

This is my tex-file:

\documentclass{article}
\usepackage{biblatex}
\addbibresource{forsog.bib}

\begin{document}
\cite{kilde}
\printbibliography


\end{document}

This is my bib-file:

@misc{kilde,
address = {New Jersey},
booktitle = {Differential equations :  an introduction to modern methods and applications /},
isbn = {9780471651413},
keywords = {Differential equations},
language = {eng},
publisher = {John Wiley},
title = {Differential equations :  an introduction to modern methods and applications },
}

bibtex[![][1]

enter image description here

1 Answers1

1

May be this is your desired output: enter image description here

The tex input would be:

\documentclass{article}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{reference.bib}

\begin{document}
%
Some Text.

Cite your file here \cite{kilde}.

\printbibliography
%
\end{document}

and the contents of the bib file reference.bib (you can change file name, not the extension!) placed at the same directory of the tex file

@Book{kilde,
  author    = {John Doe},
  publisher = {John Wiley},
  title     = {Differential equations : an introduction to modern methods and applications},
  year      = {2020},
  address   = {New Jersey},
  isbn      = {9780471651413},
  keywords  = {Differential equations},
  language  = {In English},
}

Of course many more comments can be useful for you (e.g. your ref type is not misc, it's a book; you are also missing the author of ref,..) But at this stage that would do for you. Good luck and welcome to our community.

If you wan to print the bibliography with author family name first, then in tex file add this option bibstyle=authoryear to biblatex as follows:

\usepackage[backend=bibtex, bibstyle=authoryear]{biblatex}

The result will be: enter image description here

There are many other bib styles you can choose from, e.g., numeric, alphabetic, authortitle,.. (you can see more here).

hesham
  • 1,443
  • I recommend you use JabRef (https://www.fosshub.com/JabRef.html) for managing your bibliographies. This will make your life easier when are creating new bib files and ref entries. You can also google other types of bib managers that can do the same job. – hesham Mar 17 '20 at 20:16
  • Okay it seems like it's still not working. So just to be sure. I need to make a new document in my texmaker, which I name reference.bib. Here I put the second code you wrote. Then I need to make a document, which is going to be a tex file, right? Here I put in the first code you made. When I then try to run the bib-file, it just yields "Process started

    I couldn't open file name `reference.aux'

    Process exited with error(s)". The bib file and the tex file is in the same folder on my computer.

    – Benedikte Toft Mar 17 '20 at 20:19
  • @Benedikte Toft. I added and author and year fields for you in the bib file (you can delete them if you want, but better not and use the correct year and author name). So now start over (copy and past the tex and bib files again. Please DON'T run the bib file. Open the tex file in texmaker and run it from there (Build and View icon) – hesham Mar 17 '20 at 20:29
  • Did that, now it just says "Using fall-back BibTeX(8) backend", "Citation 'kilde' on page 1 undefined", "Empty bibliography", "There were undefined references", "Please (re)run BibTeX on the file(s):"... This is such a struggle :(( – Benedikte Toft Mar 17 '20 at 20:36
  • Re-run the tex file again after the first run is finished from within (Build and View icon). Don't do anything to bib file. – hesham Mar 17 '20 at 20:39
  • Didn't do anything to the bib file. I've tried re-runinng the tex file multiple times from within build and view icon, but the same error messages appear. – Benedikte Toft Mar 17 '20 at 20:40
  • Does your latex system produce pdf file without using citation and biblatex? – hesham Mar 17 '20 at 20:43
  • yes it seems like it – Benedikte Toft Mar 17 '20 at 20:47
  • So know I need to run the bib file? Just need to make sure – Benedikte Toft Mar 17 '20 at 20:56
  • [Sorry. Run tex file.] Clean the working directory (delete all files except .tex and .bib ones, i.e. only 2 files remains). Then try run TEX file again, once then twice. – hesham Mar 17 '20 at 20:57
  • Okay I did that. Still the same error messages :(( The bib file is supposed to be written in texmaker, and saved there as a bib file right? – Benedikte Toft Mar 17 '20 at 20:57
  • Did you clean before re-running tex file? – hesham Mar 17 '20 at 21:00
  • Yes. I deleted everything except the bib and tex file and then I re-ran the tex file two times. – Benedikte Toft Mar 17 '20 at 21:00
  • to create the bib file: 1) create new notepad file name it reference.txt 2) copy paste the bib file contents inside 3) save the file and close 4) rename the file to reference.bib. Then start over, clean and run. – hesham Mar 17 '20 at 21:03
  • Same error messages... :( – Benedikte Toft Mar 17 '20 at 21:09
  • What is the full name of your tex file? – hesham Mar 17 '20 at 21:10
  • the name is "nyylitt.tex" – Benedikte Toft Mar 17 '20 at 21:12
  • Can you see a file named nyylitt.log in your working directory? If so please share this file (via dropbox or onedrive links) – hesham Mar 17 '20 at 21:16
  • Nope, didn't you say I should delete every file except the bib and tex files? Btw. I'm very grateful that you are using your time helping me!!! – Benedikte Toft Mar 17 '20 at 21:17
  • Yes I said. But after running tex files, you should see some files generated in the working directory. If no, then your latex system isnt executing any build commands, regardless you have a bib or not. – hesham Mar 17 '20 at 21:20
  • Please review this video. It may help. https://www.youtube.com/watch?v=oI8W4MvFo1M – hesham Mar 17 '20 at 21:23
  • After you learn how to successfully compile a simple latex file, you can start trying using biblatex. You are welcome and I wish I could be of more help for you. – hesham Mar 17 '20 at 21:25
  • Omg it literally worked now. I changed the settings in the "quick build command" from "PdfLatex+ View pdf" to "pdfLatex+bib(la)tex+pdflatex(x2)+viewpdf". But thanks a lot, I used your code. Very nice of you to spend your time helping me! The references show up now, but it has an error message "Package biblatex Warning: Using fall-back BibTeX(8) backend: (biblatex) functionality may be reduced/unavailable." Does that matter? – Benedikte Toft Mar 17 '20 at 21:29
  • Good to hear that. And No it does not matter. That's because you are not using BIBER. But BIBTEX is ok and more compatible for most purposes. Good luck! – hesham Mar 17 '20 at 21:33
  • Got it :) Can I btw get the last names to appear first, in the references? Or is it only possible with biber? – Benedikte Toft Mar 17 '20 at 21:45
  • Most things are possible in bibtex. and yes you can make the last names appear first. – hesham Mar 17 '20 at 21:48
  • @Benedikte Toft Check the updated answer for your request. – hesham Mar 17 '20 at 22:03
  • Thanks a lot! You made my day. But how come the number beside the reference disappear when you use the style where the authors last name is first? – Benedikte Toft Mar 17 '20 at 22:24