3

Many of the books used the order of references in this form enter image description here

I use Bibtex, and I want to arrange the references as in the form above.

I looked at the types of styles and found the nearest arrangement to above form is acm

But the letters of the name are large and the letters of a word and are large.

What is the solution ?

Is there another style similar to the above form?

For example,

 \documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

%Includes "References" in the table of contents
\usepackage[nottoc]{tocbibind}


%Begining of the document
\begin{document}

\maketitle

\tableofcontents

\medskip

\section{First Section}
This document is an example of BibTeX using in bibliography management. Three items are cited: \textit{The \LaTeX\ Companion} book \cite{latexcompanion}, the Einstein journal paper \cite{einstein}, and the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related items are \cite{latexcompanion,knuthwebsite}. 

\medskip

%Sets the bibliography style to UNSRT and imports the 
%bibliography file "samples.bib".
\bibliographystyle{acm}
\bibliography{sample}

\end{document}

The bibliography file

    @article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}

@book{latexcompanion,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The \LaTeX\ Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
}

@misc{knuthwebsite,
    author    = "Donald Knuth",
    title     = "Knuth: Computers and Typesetting",
    url       = "http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html"
}

The order of the reference as in the picture

enter image description here enter image description here enter image description here

3

It is much more easier to customize biblatex and biber instead of bibtex.

So the following is based on biblatex (try texdoc biblatex to read the documentation).

With the package option

style=numeric,

you get the numeric layout you want, with

giveninits=true

the first names are only shown with there initials and with the command

\DeclareNameAlias{default}{family-given}

all names are printed as "familyname, firstname".

So the following MWE

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}

@book{latexcompanion,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The \LaTeX\ Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
}

@misc{knuthwebsite,
    author    = "Donald Knuth",
    title     = "Knuth: Computers and Typesetting",
    url       = "http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html"
}
\end{filecontents}


\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage{csquotes}
\usepackage[%
  style=numeric, 
  sortcites,
  backend=biber,
  giveninits=true % <===================================================
]{biblatex}
\addbibresource{\jobname.bib}

\DeclareNameAlias{default}{family-given} % <============================


\begin{document}

\section{First Section}
This document is an example of BibTeX using in bibliography management. 
Three items are cited: \textit{The \LaTeX\ Companion} book 
\cite{latexcompanion}, the Einstein journal paper \cite{einstein}, and 
the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related 
items are \cite{latexcompanion,knuthwebsite}. 

\medskip

\printbibliography

\end{document}

should give you the result you want:

resulting bibliography

If that is not what you need please specify in your question how a book should be printed in the bibliography, how an article, an online reference etc. That is not clear with your inserted image ...

Edit:

To change the sign after a unit you can add for example the following command

\renewcommand*\newunitpunct{\addcomma\space}

to get a comma, followed by a space.

So with the following MWE

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}

@book{latexcompanion,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The \LaTeX\ Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
}

@misc{knuthwebsite,
    author    = "Donald Knuth",
    title     = "Knuth: Computers and Typesetting",
    url       = "http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html"
}
\end{filecontents}


\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage{csquotes}
\usepackage[%
  style=numeric, 
  sortcites,
  backend=biber,
  giveninits=true % <===================================================
]{biblatex}
\addbibresource{\jobname.bib}

\DeclareNameAlias{default}{family-given} % <============================
\renewcommand*\newunitpunct{\addcomma\space} % <========================


\begin{document}

\section{First Section}
This document is an example of BibTeX using in bibliography management. 
Three items are cited: \textit{The \LaTeX\ Companion} book 
\cite{latexcompanion}, the Einstein journal paper \cite{einstein}, and 
the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related 
items are \cite{latexcompanion,knuthwebsite}. 

\medskip

\printbibliography

\end{document}

you get the following result:

new resulting bibliography

Edit2:

Add after \renewcommand*\newunitpunct a redefinition of command \finalnamedelim:

\renewcommand*\newunitpunct{\addcomma\space} % <========================
\renewcommand*{\finalnamedelim}{%
  \addspace\bibstring{and}\space}%
% <===== ^^^^^^^^^^^^^^^^^ =============================================

That delets the comma you do not want.

  • Process started This is BibTeX, Version 0.99d (MiKTeX 2.9.6350 64-bit) The top-level auxiliary file: build/gg.aux I found no \citation commands---while reading file build/gg.aux I found no \bibdata command---while reading file build/gg.aux I found no \bibstyle command---while reading file build/gg.aux (There were 3 error messages) Process exited with error(s) – Emad kareem Sep 5 '17 at 18:24
  • Thank you very much ... Although the question has been a long time but you helped me ... I am very grateful to you ... – Emad kareem Sep 5 '17 at 18:36
  • See your answer to Ref. 3. There is no apostrophes between the name of the reference and the name of the author – Emad kareem Sep 5 '17 at 19:05
  • There should be apostrophes between the name of the author and the reference address. – Emad kareem Sep 5 '17 at 19:08
  • see new update ..... – Emad kareem Sep 5 '17 at 19:49
0

If you are willing to switch from bibtex to biblatex, you'll just need to load the biblatex package with option style=numeric. Here's a MWE that worked for me:

\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage[style=numeric,sortcites,backend=biber]{biblatex}
\bibliography{sample.bib}

%Begining of the document
\begin{document}

\tableofcontents

\medskip

\section{First Section}
This document is an example of BibTeX using in bibliography management. Three items are cited: \textit{The \LaTeX\ Companion} book \cite{latexcompanion}, the Einstein journal paper \cite{einstein}, and the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related items are \cite{latexcompanion,knuthwebsite}. 

\medskip

\printbibliography

\end{document}

enter image description here

  • 1
    Do not give the right result as requested – Emad kareem Jul 28 '17 at 14:37
  • 1
    @Emadkareem What is different? Please explain better ... – Mensch Sep 4 '17 at 19:06
  • 1
    @Emadkareem I do not see a difference. Please explain better what you need ... – Mensch Sep 4 '17 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.