Re: Use of thebibliography and tableofcontents??



[snip]

Well, I'd rather want to know why you want to remove it? Is is just to have the bibliography in the ToC (Here by using \section{Litt}) ?

Anyways, this works fine (I've also removed the items that goes into the header):

\documentclass[a4paper,12pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[danish]{babel}
\usepackage{graphicx}
\usepackage{verbatim}
\usepackage{fancyhdr}
%\usepackage[active]{srcltx}
%\usepackage[top=30mm,left=30mm]{geometry}
\usepackage{amsmath}
\pagestyle{fancy}
\fancyhf{}
\rhead{\leftmark}
%\fancyhead[RE]{\slshape \rightmark}
\author{bob}
\title{kkk}

\makeatletter
\renewenvironment{thebibliography}[1]
{%
% \section*{\refname}%
%\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@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}
\maketitle
\newpage
\tableofcontents
\newpage

\section{Litt}
\begin{thebibliography}{120}
\bibitem{short} bla1
\bibitem{long} bla2
\bibitem{book} bla3
\bibitem{so} bla4
\end{thebibliography}

\end{document}



--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
.



Relevant Pages

  • Re: Beamer tableofcontents links to wrong slide
    ... your example is not protalble to I removed the picture, and the bibliography, on my system both the ToC and the bookmarks sends me to ... LaTeX FAQ: http://www.tex.ac.uk/faq ...
    (comp.text.tex)
  • Re: Include{ } -> TOC + Bibliography
    ... I only have to use the \include command to compile the ... I use the \cite document in each chapter file and put the bibliography ... otherwise please create a minimal exampel file that we can use to test on our systems. ... LaTeX FAQ: http://www.tex.ac.uk/faq ...
    (comp.text.tex)
  • Re: Header wont work
    ... note that \chapter commands set ... LaTeX FAQ: http://www.tex.ac.uk/faq ...
    (comp.text.tex)
  • Re: Chapters in report
    ... So that I can get it the ToC. ... LaTeX FAQ: http://www.tex.ac.uk/faq ... LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish) ... use a different chapterstyle, or create your own, it is described in the memoir manual, very easy. ...
    (comp.text.tex)
  • Re: ifnum check for chapter number (memoir)
    ... chapter styles (under memoir). ... it does not work for the bibliography. ... /daleif (remove RTFSIGNATURE from email address) ... LaTeX FAQ: http://www.tex.ac.uk/faq ...
    (comp.text.tex)