目錄中的參考書目格式錯誤

目錄中的參考書目格式錯誤

我正在使用報告類別並用作\usepackage{amsrefs}我的引文樣式。在建立目錄時,為了讓 LaTeX 將參考書目視為一個部分,我使用了指令\addcontentsline{toc}{section}{Bibliography}。但是,這只會導致目錄中僅列出“參考書目”,而不列出“VII 參考書目”。

有沒有辦法讓我的引文目錄顯示“VII Bibliography”?

任何幫助將非常感激

編輯:忘記輸入麻煩的程式碼。

\documentclass[12pt]{report}
\usepackage{amsrefs}

\begin{document}
\stepcounter{page}
\newpage
\section{Summary}
\newpage
\tableofcontents
\newpage
\section{Introduction}
text text text

\addcontentsline{toc}{section}{Bibliography}
\bibliographystyle{amsrefs}
\bibliography{wood}

\section{Appendix}

\end{document}

答案1

課程report有章節,所以你不使用它們很奇怪。

沒有必要\bibliographystyle{amsrefs}使用 with amsrefs,就\bibliography足夠了。在範例中,我使用filecontents*and\jobname作為.bib檔案名稱只是為了使其獨立。

由於amsrefs使用\bibchapter\bibsection作為參考書目目標題,對參考書目進行編號的簡單方法是刪除這些命令定義中*跟隨的\chapter或。\section

\begin{filecontents*}{\jobname.bib}
@article{abc,
 author={A. U. Thor and W. Riter},
 title={A title},
 journal={The Journal},
 year={2014},
}
\end{filecontents*}

\documentclass{report}

\usepackage{amsrefs}

\usepackage{xpatch}
\xpatchcmd{\bibchapter}{*}{}{}{}
%%% use the following for the article class
%\xpatchcmd{\bibsection}{*}{}{}{}

\begin{document}
\tableofcontents

\chapter{Summary}
\chapter{Introduction}
text text text\cite{abc}

\bibliography{\jobname}

\end{document}

在此輸入影像描述

答案2

我不太確定我的理解是否正確。您沒有任何章節,但正在使用該類別report。但是,好吧,我沒有像您要求的“VII 參考書目”那樣的羅馬編號,但至少,它會在您的目錄中顯示編號的“參考書目”部分。如果這不是您想要的,請澄清您的問題:

% arara: pdflatex

\documentclass[12pt]{report}
\usepackage{amsrefs}

\begin{document}
\stepcounter{page}
\newpage
\section{Summary}
\newpage
\tableofcontents
\newpage
\section{Introduction}
text text text

\addtocounter{section}{1}
\addcontentsline{toc}{section}{\protect\numberline{\thesection}Bibliography}
\bibliographystyle{amsrefs}
\bibliography{wood}

\section{Appendix}

\end{document}

在此輸入影像描述

相關內容