2

I am doing this in LaTeX text:

study, Hansen (1996)\cite{hansen1996water}

and get the following in output file:

Hansen (1996)[hansen1996water]

I need numbers not citation tags to show. I know how to solve the problem if I do not need the abstract in the references.

I simply use the following in the main file: \bibliographystyle{abstract} \bibliography{temp}. The file temp.bib includes the references. In the body file I cite as above: i.e Hansen (1996)\cite{hansen1996water}

Here's an MWE:

\documentclass{article}
\begin{document} 
\bibliographystyle{abstract} 
\bibliography{temp}% The bib file name. 
\begin{section} 
...Talatala 2008\cite{talatala2008} 
\end{section} 
\end{document} 

The contents of temp.bib:

@article{talatala2008,  
   title={The effect of tap water perception on the consumption of bottled water}, 
   author={Talatala, Susan}, 
   journal={Public Perceptions of Tap Water}, 
   year={2008}, 
   abstract={Over the past 30 years, drinking water ...bottled water and tap water one consumes.} 
}
Mico
  • 506,678
  • You mention biblatex: have you run LaTeX, then Biber (or BibTeX if appropriate) and then LaTeX again? If you are using biblatex there are dedicated commands for author-year type citations. – Joseph Wright Jun 09 '15 at 07:32
  • 1
    If you are really using biblatex you shouldn't use \bibliographystyle. – Ulrike Fischer Jun 09 '15 at 07:34
  • I think what you mean is that you want a citation style like [1], [2], etc. This is specified by the \bibliographystyle, for example \bibliographystyle{abbrv} (cf. [http://www.sharelatex.com/learn/Bibtex_bibliography_styles]). – lenxn Jun 09 '15 at 07:35
  • I have explained my situation above. I need the abstracts to be included in the references but do not abbreviations of names but numbers in the main text. – Bassam Awad Jun 09 '15 at 08:28
  • I'm not sure if you mean the same thing by abstract as I do. Are you really referring to the short summary of a paper or are you talking about the inline-citation? Can you give us a minimal working example containing your preamble? – henning Jun 09 '15 at 09:00
  • @henning -- There's a bibliography style called abstract that prints, you guessed it, the contents of any abstract fields that may be present in a bibliographic entry. – Mico Jun 09 '15 at 09:07
  • Exactly as you see from Answer 1 below – Bassam Awad Jun 09 '15 at 09:23

2 Answers2

1

(Too long for a comment, hence posted as an answer.)

I gather you wish to use the abstract bibliography style since it's set to print the contents of any abstract fields (as well as incidentally, keyword and comment fields) that may be present in the bib entries. However, as you've discovered, the abstract bibliography style generates citaton call-out labels of the form [author:year], rather than numeric-style labels. This setting seems to be hard-wired into the style file. I checked whether loading the natbib package with the option numbers might help produce numeric citation call-outs, but no luck.

Rather than hack the file abstract.bst to produce numeric labels, you may be better off choosing an existing style file that (a) generates numeric-style citation call-outs and (b) formats the bib entries to your liking, and to modify that style file to add routines that print out the contents of any abstract fields. If that's how you wish to proceed, it may be best if you post a new query, in which you state which bibliography style you'd like to start out with and ask how it should be modified to print out the contents of any abstract fields.

Mico
  • 506,678
  • Thanks, Mico, can you elaborate more on this? – Bassam Awad Jun 09 '15 at 09:26
  • @BassamAwad - As I said, in order to achieve your objective, i.e., to get a bibliography style that generates numeric-style citation call-outs and typesets the contents of the abstract fields of bibliographic entries, you may be better off not modifying the existing abstract.bst file but, instead, modifying an existing style file that (a) generates numeric labels and formats all fields (except the abstract field) exactly to your liking. Since I don't know so far how the other fields are supposed to be formatted, I suggested you post a new query to this site. – Mico Jun 09 '15 at 09:39
0

It's really difficult to help you without a MWE. However, I recommend you use BibLaTeX (with Biber as backend) instead of BibTex. BibLaTeX provides the citation style numeric, which produces numeric citations, and the bibliography style reading, which prints out an abstract.

Sorry, but I don't have time right now to try out the code snippets below, but I guess your preamble should contain something like:

\usepackage[backend=biber,
            citestyle=numeric,
            bibliographystyle=reading
           ]{biblatex}
\addbibresource{bibliography.bib} % path to your bib file.

Or, if you don't like the reading style, try:

\usepackage[backend=biber,
            style=numeric,
            abstract=true
           ]{biblatex}
\addbibresource{bibliography.bib} % path to your bib file.

Have a look here to learn how to use BibLaTeX in conjunction with Biber.

henning
  • 529