Leftmargin problem at the bibliography
To the extent that you're updating thebibliography
, you might just as well renew the entire environment:
\documentclass{article}
\makeatletter
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\setlength{\itemindent}{\dimexpr\labelwidth+\labelsep+1em}
\leftmargin\z@
\@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}
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
\begin{thebibliography}{0}
\bibitem{1} Baider A. Noncompact Riemannian manifolds with discrete spectra //
J.Diff.Geom. -- 1979 -- V. 14 -- p. 41--57.
\bibitem{2} Berger M., Gauduchon P., Mazet E. Le spectre d'une
vari\'et\'e Rieman\-nienne -- Berlin-New York: Springer-Verlag, 1971. -- 251p.
-- (Lecture Notes in Math.; V.~194)
\end{thebibliography}
\end{document}
Since the bibliography is set as a list, you need to change the left margin to 0pt
and the \itemindent
to \labelwidth+\labelsep+<X>
where <X>
is the desired indent of the first line.
Your way of setting the lengths didn't work since it came too late in the process of setting the list. As you can see in the definition of thebibliography
(taken from article.cls
), the list is created within \thebibliography
(or \begin{thebibliography}
).
Set \leftmargin
to be \labelsep
and \itemindent
to the desired length (3em
in my example):
\documentclass{article}
\makeatletter
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelsep
\itemindent3em
\@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}
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
\begin{thebibliography}{9}
\bibitem{1} Baider A. Noncompact Riemannian manifolds with discrete spectra //
J.Diff.Geom. -- 1979 -- V. 14 -- p. 41--57.
\bibitem{2} Berger M., Gauduchon P., Mazet E. Le spectre d'une
vari\'et\'e Rieman\-nienne -- Berlin-New York: Springer-Verlag, 1971. -- 251p.
-- (Lecture Notes in Math.; V.~194)
\end{thebibliography}
\end{document}