3

I want to add the bibliography at the end of this article so I wrote the following code:

\documentclass[chapterprefix=true]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[english,greek]{babel}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{mathdots}
\usepackage{enumerate}
\newtheorem{mylemma}{Λήμμα} 
\newtheorem{mytheorem}{Θεώρημα}
\newtheorem{mydef}{Ορισμός}[section]
\newtheorem{example}{Παράδειγμα} 


\begin{document} 

\title{ }

\author{ M } 

\date{ }


\maketitle 

\clearpage 

\tableofcontents 

....

\clearpage 

....

\nocite{*}  

\medskip

\bibliographystyle{plain} 
\bibliography{mybibliography} 


\end{document} 

At the file mybibliography.bib I added the following:

    @article{
  author =       "\foreignlanguage{english}{TP}",
  title =        "{\foreignlanguage{english}{Extensions}}",
  journal =      "\foreignlanguage{english}{The Journal}",
  volume =       "18",
  number =       "2",
  pages =        "372-397",
  year =         "1994",
  DOI =          "..."
}

At the output the bibliography isn't displayed. Why? Have I done something wrong?

EDIT:

Having added the command \nocite{*} the output is the following:

enter image description here

Just the numbers are appeared but not the name of the article... What else could I change?

Mary Star
  • 347
  • 3
    Did you perform the normal cycle: (pdf)latex -> bibtex (or biber) -> pdf)latex -> pdf)latex? Did you make citations in your text? If not, add \nocite{*} before calling the bibliography. – Bernard Sep 02 '15 at 00:20
  • 1
    Possible duplicate (actually independent of using biblatex): Automatically citing all entries in a class in a .bib file – Werner Sep 02 '15 at 00:27
  • I added the command '\nocite{*}' and I added the output in my initial post. Could you take a look at it? @Bernard – Mary Star Sep 02 '15 at 01:18
  • 1
    After adding \nocite{*} did you run the cycle again? That is (pdf)latex -> bibtex -> (pdf)latex -> (pdf)latex? Although the output looks odd, even if you didn't. Do you get any errors or warnings when you run BibTeX? – cfr Sep 02 '15 at 01:28
  • How do we run this cycle? I use sharelatex... I don't get any errors... @cfr – Mary Star Sep 02 '15 at 01:31
  • 1
    The thing is, there is nothing wrong with the code you've posted. Here's what I get when I run that sequence. I don't use sharelatex myself. On overleaf, the relevant commands are run automatically but I think sharelatex does not do that for you. – cfr Sep 02 '15 at 01:35
  • 1
    Have you read this? Scroll down for the BibTeX section of the page. – cfr Sep 02 '15 at 01:40
  • 1
    HAve you compiled more than one time? Best would be three times? (If sharelatex includes a bibliography call with bibtex it should run errorless, but that is a guess I do not use sharelatex) With MiKTeX I have no errors with your given code ... Have you considered to install a tex distribution on your computer? – Mensch Sep 02 '15 at 14:34
  • 2
    @cfr Yes, I think ShareLaTeX also runs all that's needed. Mary: Your code works fine when I test it on ShareLaTeX: https://www.sharelatex.com/project/521ccc3fe1f4b692043d197d – Torbjørn T. Sep 06 '15 at 11:28
  • I edited at my initial post the content of mybibliography.bib since the name of the article is in english and since I have used the usepackage \usepackage[english,greek]{babel}. Could you take a look at it? Now it doesn't work when we use the command \foreignlanguage{english}, right? How can we write something in english there? @TorbjørnT. – Mary Star Sep 08 '15 at 14:13
  • 1
    I can reproduce the problem (see the ShareLaTeX link in my previous comment), but I don't know how to fix that, sorry. (By the way, your example can be reduced quite a bit, see again my test on ShareLaTeX.) – Torbjørn T. Sep 08 '15 at 18:49
  • 4
    your bib file looks wrong, there should be a key such as @article{tp,.... – David Carlisle Sep 09 '15 at 06:56
  • 2
    As David wrote in his comment your example bib-entry is missing the bib-key. But if you were really using such a faulty bib-entry your document wouldn't imho compile at all on sharelatex. So try to make a real example which really shows your error. Create on sharelatex a new small test-document and new test.bib with some entries that you then can test and show us fully. – Ulrike Fischer Sep 09 '15 at 08:11
  • 1
    I added a key such as '@article{tp,.... ' and now it works!! Thank you!! :-) – Mary Star Sep 09 '15 at 09:55
  • 1
    @DavidCarlisle - you should make that an answer – Andrew Swann Sep 09 '15 at 15:04

1 Answers1

2

Your bib file looks wrong, there should be a key such as

@article{tp,
  .... 
David Carlisle
  • 757,742