Bibliography is not working

4,106 views
Skip to first unread message

Sam

unread,
Apr 17, 2011, 12:54:46 PM4/17/11
to latexus...@googlegroups.com
Dear All,

I am using Windows 7, MikTex 2.9 and LEd. I am writing an article. The content of the mentioned files are something as written below:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
report.tex:

\documentclass[a4paper,11pt]{article}

\usepackage{geometry}
\usepackage{graphicx}

\geometry{verbose,a4paper,tmargin=2cm,bmargin=2cm,lmargin=2.5cm,rmargin=2.5cm}

\begin{document}

\input{frontPage}\newpage

\thispagestyle{empty} \newpage
\thispagestyle{empty} \vspace*{2cm} \newpage

\tableofcontents

\thispagestyle{empty} \newpage
\thispagestyle{empty} \vspace*{2cm} \newpage

\parskip 0.1in
\setcounter{page}{1}
\input{content}

\bibliographystyle{plain}
\addcontentsline{toc}{section}{\numberline{}References}
\bibliography{refs}
\end{document}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
refs.bib

@CONFERENCE{,
AUTHOR       = "author_name",
TITLE        = "title",
YEAR         = "year",
PUBLISHER    = "publisher",
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When I execute the command "PDFLaTeX" to generate the PDF, it generates the PDF without any error. But the reference section is not appearing in the PDF.


Please help me in solving this.

Regards
Sam

Manuel Castro Avila

unread,
Apr 17, 2011, 2:34:22 PM4/17/11
to latexus...@googlegroups.com
Hi Sam,

To generate the references, you need call it in some place into your file.tex using \cite{} or something like it.

Do you check it into your files if you are calling the references???

I hope this help,

Regards,

Manuel



--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.



--



Peter Flynn

unread,
Apr 17, 2011, 5:09:23 PM4/17/11
to latexus...@googlegroups.com
On Sun, Apr 17, 2011 at 5:54 PM, Sam <samir...@gmail.com> wrote:
Dear All,

I am using Windows 7, MikTex 2.9 and LEd. I am writing an article. The content of the mentioned files are something as written below:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
report.tex:

\documentclass[a4paper,11pt]{article}
\usepackage{geometry}
\usepackage{graphicx}
\geometry{verbose,a4paper,tmargin=2cm,bmargin=2cm,lmargin=2.5cm,rmargin=2.5cm}
\begin{document}
\input{frontPage}\newpage

You have not provided the file frontPage.tex so we cannot test this document.

Also, you should use \clearpage rather than \newpage (usually).
 
\thispagestyle{empty} \newpage
\thispagestyle{empty} \vspace*{2cm} \newpage

\pagestyle{empty}\null\vfill\clearpage
\pagestyle{empty}\null\vfill\clearpage

\tableofcontents
\thispagestyle{empty} \newpage
\thispagestyle{empty} \vspace*{2cm} \newpage
\parskip 0.1in
\setcounter{page}{1}
\input{content}

You have also not provided the file content.tex
 
\bibliographystyle{plain}
\addcontentsline{toc}{section}{\numberline{}References}

This may fail if the bibliography starts a new page because it will mark the page before the bibliography begins. To ensure the entry comes on the right page, copy the bibliography environment from article.cls into your Preamble, make it a \renewenvironment, and add the \addcontentsline after the \section*{\refname} (and use \refname instead of "References").
 
\bibliography{refs}
\end{document}

That all looks OK.

When I execute the command "PDFLaTeX" to generate the PDF, it generates the PDF without any error. But the reference section is not appearing in the PDF.

1. Are you actually \cite'ing any references in your text?
2. Have you run bibtex on the file, and then re-run LaTeX?

///Peter
 

Sam

unread,
Apr 18, 2011, 1:49:54 AM4/18/11
to latexus...@googlegroups.com
Hi Peter,

Thanks for the reply. Being a novice user of LaTeX, I was not able to comprehend all the points (specifically the technical jargons) you mentioned. So it would be great if you yourself make necessary changes to the files I have attached so that it would work properly. I have attached all the necessary files to compile and generate the PDF.

regards
Sam
main.zip

Peter Flynn

unread,
Apr 18, 2011, 2:37:46 AM4/18/11
to latexus...@googlegroups.com
On Mon, Apr 18, 2011 at 6:49 AM, Sam <samir...@gmail.com> wrote:
Hi Peter,

Thanks for the reply. Being a novice user of LaTeX, I was not able to comprehend all the points (specifically the technical jargons) you mentioned. So it would be great if you yourself make necessary changes to the files I have attached

I'm sorry, I don't have time to do this. You have not answered my questions:

1. Are you actually \cite'ing any references in your text?
2. Have you run bibtex on the file, and then re-run LaTeX?
 
Have you read any documentation about how to do citation and reference in LaTeX? eg
http://latex.silmaril.ie/formattinginformation/textuality.html#bib

///Peter

Sam

unread,
Apr 18, 2011, 2:50:15 AM4/18/11
to latexus...@googlegroups.com
Hi Peter,

Sorry for that. 


1. Are you actually \cite'ing any references in your text?

--> As of now, I am not \cite'ing any references in my text.

2. Have you run bibtex on the file, and then re-run LaTeX?

--> I have not run bibtex on any of the file. Do I need to run it on refs.bib or main.tex?

I am going through the link you have suggested. It is fine if you can not test the files I have attached :). I will try to fix it based on your suggestions.

regards
Sam

Peter Flynn

unread,
Apr 18, 2011, 3:24:25 AM4/18/11
to latexus...@googlegroups.com
On Mon, Apr 18, 2011 at 7:50 AM, Sam <samir...@gmail.com> wrote:

1. Are you actually \cite'ing any references in your text?
--> As of now, I am not \cite'ing any references in my text.

That's why there is no References. You must cite something. BIBTeX only prints references for entries you have cited.

2. Have you run bibtex on the file, and then re-run LaTeX?
--> I have not run bibtex on any of the file. Do I need to run it on refs.bib or main.tex?

Main. Just type bibtex main and it will extract and format the references you have cited.
 
I am going through the link you have suggested. It is fine if you can not test the files I have attached :). I will try to fix it based on your suggestions.

I just managed to have a look.

Use the report class for a thesis, not article. Or better, download one of the many thesis classes and use that.

Also your BIBTeX file is corrupt. The quotes are wrong in the Year line: it should be either
year="2011" or year=2011 (quotes are optional when the value is an integer).

I added the revised bibliography environment and redefined \maketitle. Use \chapter for chapters.

///Peter



 
 

main.zip

Sam

unread,
Apr 18, 2011, 3:59:32 AM4/18/11
to latexus...@googlegroups.com
Hi Peter,

many thanks for your time and effort :). It is working fine. But this is not the my thesis. This is just a seminar report and according to institute rule, it is not supposed to have any chapter-wise segregation. So, let me look into the files you sent and modify according to my requirement. 

regards
Sam

Peter Flynn

unread,
Apr 18, 2011, 12:53:45 PM4/18/11
to latexus...@googlegroups.com
On Mon, Apr 18, 2011 at 8:59 AM, Sam <samir...@gmail.com> wrote:
Hi Peter,

many thanks for your time and effort :). It is working fine. But this is not the my thesis. This is just a seminar report and according to institute rule, it is not supposed to have any chapter-wise segregation. So, let me look into the files you sent and modify according to my requirement.

Ah. OK,
  1. use article instead of report
  2. change \cleardoublepage to \clearpage
  3. add another \clearpage after \tableofcontents
  4. in the redefinition of thebibliography, change \bibname to \refname (4x), and chapter to section (2x)
  5. change the way the \@title is used in the new \maketitle
  6. change \title in frontPage.tex accordingly
  7. in content.tex, change \chapter back to \section
///Peter
Reply all
Reply to author
Forward
0 new messages