La bibliografía se comporta como una sección del TOC.

La bibliografía se comporta como una sección del TOC.

¿Es posible incluir las referencias/bibliografías en el TOC con un número de sección apropiado?

Actualmente, mi MWE a continuación da como resultado la siguiente imagen: ingrese la descripción de la imagen aquí

Mi MWE:

\documentclass{report}

\usepackage[resetlabels]{multibib}
% Implements functionality to "append" and "prepend" code to other commands
\usepackage{etoolbox}

\ifdefined\chapter
  \newcommand{\refname}{References}
  \patchcmd{\thebibliography}{\chapter*{\bibname}}{%
    \section*{\refname}
    \addcontentsline{toc}{section}{\refname}
    }{}{}
  \newcommand{\bibliographies}{%
    \chapter*{\bibname}
    \addcontentsline{toc}{chapter}{\bibname}
  }
\else
  \newcommand{\bibname}{Bibliography}
  \patchcmd{\thebibliography}{\section*{\refname}}{%
    \subsection*{\refname}
    \addcontentsline{toc}{subsection}{\refname}
    }{}{}
  \newcommand{\bibliographies}{%
    \section*{\bibname}
    \addcontentsline{toc}{section}{\bibname}
  }
\fi

\newcites{A}{References}
\newcites{B}{References}

\begin{document}

\tableofcontents

\chapter{First Chapter}
  \section{A section}
  this is a citation \citeA{aa}
  \bibliographystyleA{plain}
  \bibliographyA{lit}

 \chapter{Second Chapter}
  \section{A section}
  this is another citation \citeB{bb}
  \bibliographystyleB{plain}
  \bibliographyB{lit}   

\end{document}

y el lit.bibarchivo es el siguiente:

@Article{aa,
  author =   {Author, A.},
  title =    {Title},
  journal =  {Journal},
  year =     2000
}

@Article{bb,
  author =   {Brother, B.},
  title =    {Titling},
  journal =  {Ann. J.},
  year =     2002
}

Para compilar debes ejecutar:

pdflatex main.tex
bibtex A.aux
bibtex B.aux
pdflatex main.tex
pdflatex main.tex

Respuesta1

Reemplace las siguientes líneas

\ifdefined\chapter
  \newcommand{\refname}{References}
  \patchcmd{\thebibliography}{\chapter*{\bibname}}{%
    \section*{\refname}
    \addcontentsline{toc}{section}{\refname}
    }{}{}
  \newcommand{\bibliographies}{%
    \chapter*{\bibname}
    \addcontentsline{toc}{chapter}{\bibname}
  }
\else
  \newcommand{\bibname}{Bibliography}
  \patchcmd{\thebibliography}{\section*{\refname}}{%
    \subsection*{\refname}
    \addcontentsline{toc}{subsection}{\refname}
    }{}{}
  \newcommand{\bibliographies}{%
    \section*{\bibname}
    \addcontentsline{toc}{section}{\bibname}
  }
\fi

con

\ifdefined\chapter
  \newcommand{\refname}{References}
  \patchcmd{\thebibliography}{\chapter*{\bibname}}{%
    \section{\refname}%
    }{}{}
  \newcommand{\bibliographies}{%
    \chapter{\bibname}%
  }
\else
  \newcommand{\bibname}{Bibliography}
  \patchcmd{\thebibliography}{\section*{\refname}}{%
    \subsection{\refname}%
    }{}{}
  \newcommand{\bibliographies}{%
    \section{\bibname}%
  }
\fi

Resultado:

ingrese la descripción de la imagen aquí

información relacionada