참고문헌은 TOC의 섹션처럼 작동합니다.

참고문헌은 TOC의 섹션처럼 작동합니다.

적절한 섹션 번호를 사용하여 목차에 참고문헌/참고문헌을 포함시키는 것이 가능합니까?

현재 아래 MWE의 결과는 다음과 같습니다. 여기에 이미지 설명을 입력하세요

내 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}

파일 은 lit.bib다음과 같습니다.

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

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

컴파일하려면 다음을 실행해야 합니다.

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

답변1

다음 줄을 바꾸십시오.

\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

~와 함께

\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

결과:

여기에 이미지 설명을 입력하세요

관련 정보