0

I want to show in the bibliography, the authors last name first then the first name. How to do that?

Please refer to the attached code and bib file.

I have many references in bib file but for example I use only three.

Latex code

\documentclass[oneside,12pt,leqno]{book}
\input psfig.sty
\oddsidemargin=0pt
\evensidemargin=0pt
\topmargin=-0.5in
\textwidth=6.5in
\textheight=9.5in
%\topmargin=-1.5in
\usepackage[T1]{fontenc}
%\usepackage[latin9]{inputenc}
\usepackage{graphicx}
\usepackage{times}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{endnotes}
\usepackage{makeidx}
\usepackage{caption}
\usepackage{epstopdf}
\usepackage{epsfig}
\usepackage{adjustbox}
\usepackage{array}

\begin{document}
\chapter{Test}
Old day at school \cite{abram1972,austrian1982,babbage1832}

\bibliographystyle{plain}
\bibliography{test}

\end{document}

Bib file is

@book{abram1972,
author               = {Abramowitz, M. I. and Stegun, I. A.},
owner                = {ray},
publisher            = {Dover Publications},
title                = {Handbook of Mathematical Functions with Formulas,Graphs, and Mathematical Tables},
year                 = {1972},
}

@book{austrian1982,
__markedentry        = {[rayn:1]},
author               = {Austrian, Geoffrey D},
owner                = {mine_design},
publisher            = {Columbia University Press},
title                = {Herman Hollerith: forgotten giant of information processing},
year                 = {1982},
 }

@book{babbage1832,
__markedentry        = {[rayn:1]},
author               = {Babbage, Charles},
owner                = {mine_design},
publisher            = {Taylor \& Francis},
title                = {On the economy of machinery and manufactures},
year                 = {1832},
}

enter image description here

1
  • You don't seem to be using biblatex, so I have re-tagged your question accordingly, so people don't get confused. BTW: Your MWE, while exhibiting your problem very clearly, could be made slightly more minimal by kicking out irrelevant packages (irrelevant to the question at hand, that is) like epsfig, caption, \input psfig.sty and your margin settings.
    – moewe
    Jun 26, 2015 at 5:24

1 Answer 1

2

If you use biblatex+biber it's simple. The syntax for producing a bibliography is slightly different: you define the .bib files in the preamble with the \addbibresource command, load biblatex, and simply write\printbibliography where you want it to be. Note I changed the input encoding to utf8 as biber understands it.

Also, times is obsolete, you should use mathptmx or even better, newtx. I don't see why you should load psfig and epsfig, since you load `graphicx.

\documentclass[oneside,12pt,leqno]{book}
\oddsidemargin=0pt
\evensidemargin=0pt
\topmargin=-0.5in
\textwidth=6.5in
\textheight=9.5in
%\topmargin=-1.5in
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{endnotes}
\usepackage{makeidx}
\usepackage{caption}
\usepackage{epstopdf}
\usepackage{adjustbox}
\usepackage{array}
\usepackage{filecontents}

\begin{filecontents}{test.bib}
@book{abram1972,
author = {Abramowitz, M. I. and Stegun, I. A.},
owner = {ray},
publisher = {Dover Publications},
title = {Handbook of Mathematical Functions with Formulas,Graphs, and Mathematical Tables},
year = {1972},
}

@book{austrian1982,
__markedentry = {[rayn:1]},
author = {Austrian, Geoffrey D},
owner = {mine_design},
publisher = {Columbia University Press},
title = {Herman Hollerith: forgotten giant of information processing},
year = {1982},
 }

@book{babbage1832,
__markedentry = {[rayn:1]},
author = {Babbage, Charles},
owner = {mine_design},
publisher = {Taylor \& Francis},
title = {On the economy of machinery and manufactures},
year = {1832},
}
\end{filecontents}

\usepackage[backend=biber]{biblatex}
\addbibresource{test.bib}
 \DeclareNameAlias{default}{last-first}

\begin{document}

\chapter{Test}
Old day at school \cite{abram1972,austrian1982,babbage1832}

\printbibliography

\end{document} 

enter image description here

8
  • what would happen if I have long list of references in my bib file? Is there anyway to recall it from .bib file rather than write it on the main latex file, Also the code you given doesn't work
    – Harry
    Jun 26, 2015 at 23:57
  • When I run your code. I can't see references in the pdf file. But I can see "Old day at school [abram1972, austrian1982, babbage1832]". No references at the end of pdf file.
    – Harry
    Jun 27, 2015 at 0:03
  • Did you run the cycle pdflatex->biber->pdflatex->pdflatex?
    – Bernard
    Jun 27, 2015 at 0:13
  • How do I do that?
    – Harry
    Jun 27, 2015 at 0:18
  • which system/distribution/editor do you have?
    – Bernard
    Jun 27, 2015 at 0:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .