[Tex/LaTex] Change bibitem style

bibliographiesbibtex

I use standard bibliography options, it provides me with the following result that is an enumerated list:

 8  Atkin A.O. Elliptic curves and primality proving // Mathematics of
    Computation, 1993, Vol. 61, P. 29–68.
 9  Menezes A. Reducing elliptic curve logarithms to logarithms in a finite field
    // IEEE Transactions on Information Theory, 1993, Vol. 39, P. 1639–1646.
10  Menezes A., Elliptic Curve Public Key Cryptosystems. Kluwer Academic
    Publishers, Boston, 1993.

I need a slight different bibliography style: text paragraphs with the first line indent, like this:

    8 Atkin A.O. Elliptic curves and primality proving // Mathematics of
Computation, 1993, Vol. 61, P. 29–68.
    9 Menezes A. Reducing elliptic curve logarithms to logarithms in a finite field
// IEEE Transactions on Information Theory, 1993, Vol. 39, P. 1639–1646.
    10 Menezes A., Elliptic Curve Public Key Cryptosystems. Kluwer Academic
Publishers, Boston, 1993.

How can I change the style for bibliography list in my custom class (derived from report)?

Best Answer

The thebibliography environment is built using a list, so you can change the appropriate lengths. In the following example I show such modification using the default definition for the \thebibliography commands as defined in report.cls. Basically what you have to do, according to your description, is to set \leftmargin to 0pt and \itemindent to a positive value (I used 30pt):

\begin{filecontents*}{zzxx.bib}
@book{goossens93,
    author = "Michel Goossens",
    title = "The {LaTeX} Companion",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}

@article{greenwade93, 
    author = "George D. Greenwade",
    title = "The {C}omprehensive {TeX} {A}rchive {N}etwork ({CTAN})",
    year = "1993",
    journal = "TUGBoat",
    volume = "14",
    number = "3",
    pages = "342--351",
    url=" www.ctan.org"
}

@book{knuth79,
    author = "Donald E. Knuth",
    title = "{TeX} and Metafont, New Directions in Typesetting",
    year = "1979",
    publisher = "American Mathematical Society and Digital Press",
    address = "Stanford"
}
\end{filecontents*}

\documentclass{report}

\makeatletter
\renewenvironment{thebibliography}[1]
     {\chapter*{\bibname}%
      \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin=0pt
            \itemindent=30pt
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother

\begin{document} 

\nocite{*}

\bibliographystyle{plain}
\bibliography{zzxx}

\end{document}

enter image description here

Related Question