我正在尝试将参考书目插入目录中,并且正在使用report
文档类。在查看了本论坛中的类似问题后,我发现此代码似乎效果最好:
\documentclass[12pt]{report}
\usepackage[section, numbib]{tocbibind}
\usepackage{natbib}
\bibliographystyle{unsrt}
\usepackage{titlesec}
\titleformat{\section}
{\fontsize{14}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\titleformat{\subsection}
{\fontsize{13}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\titleformat{\subsubsection}
{\fontsize{12}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\begin{document}
\tableofcontents
\section{Introduction}
\subsection{Overview and Epidemiology}
\subsection{Complications}
\subsection{Maternal Medical Complications}
\subsection{Obstetric Maternal Complications}
\subsection{Fetal and Neonatal Complications}
\subsection{Diabetes and Urogenital Tract Infections}
\subsection{Diabetes and Menarchal Irregularities}
\subsection{Psychology and Diabetes}
\subsection{Prevention, Treatment and Prognosis}
\section{Aim of the Study}
\section{Materials and Methods}
\section{Results}
\subsection{Socio-Economic level and regional origin}
\subsection{Anthropometric characteristics}
\subsection{Therapy}
\subsection{Utenza ambulatoriale}
\subsection{Gynecologic history}
\subsection{Obstetric information}
\subsection{Contraception}
\section{Discussion}
\bibliography{Libreria_personale}
\end{document}
但是,输出文件给我一个多余的“内容”行,我不知道如何消除它。
我已经看到,使用它documentclass{scrartcl}
可以创建我想要的输出,但是我想继续使用该类report
。我尝试将代码更改为:
\documentclass[12pt]{report}
\usepackage{etoolbox}
\patchcmd{\thebibliography}{\section*}{\section}{}{}
\renewcommand{\bibsection}{\section{\bibname}}
\usepackage{natbib}
\bibliographystyle{unsrt}
\usepackage{titlesec}
\titleformat{\section}
{\fontsize{14}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\titleformat{\subsection}
{\fontsize{13}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\titleformat{\subsubsection}
{\fontsize{12}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\begin{document}
\tableofcontents
\section{Introduction}
\subsection{Overview and Epidemiology}
\subsection{Complications}
\subsection{Maternal Medical Complications}
\subsection{Obstetric Maternal Complications}
\subsection{Fetal and Neonatal Complications}
\subsection{Diabetes and Urogenital Tract Infections}
\subsection{Diabetes and Menarchal Irregularities}
\subsection{Psychology and Diabetes}
\subsection{Prevention, Treatment and Prognosis}
\section{Aim of the Study}
\section{Materials and Methods}
\section{Results}
\subsection{Socio-Economic level and regional origin}
\subsection{Anthropometric characteristics}
\subsection{Therapy}
\subsection{Utenza ambulatoriale}
\subsection{Gynecologic history}
\subsection{Obstetric information}
\subsection{Contraception}
\section{Discussion}
\bibliography{Libreria_personale}
\end{document}
但是,在输出文件中,“Contents”标题太大:
答案1
该tocbibind
包提供了nottoc
防止包含Contents
其ToC
本身的选项——我使用了 OP 顶部提供的第一个代码版本。
我不明白为什么只sections
在这个文件中使用report
,以及titlesec
包装为相当“标准”类型的分段标题格式。(......但这不是这里的问题;-))
我强烈建议改用article
类!
\documentclass[12pt]{report}
\usepackage[section, numbib,nottoc]{tocbibind}
\usepackage{natbib}
\bibliographystyle{unsrt}
\usepackage{titlesec}
\titleformat{\section}
{\fontsize{14}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\titleformat{\subsection}
{\fontsize{13}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\titleformat{\subsubsection}
{\fontsize{12}{16}\bfseries \selectfont}
{\thesection}{1em}{}
\begin{document}
\tableofcontents
\section{Introduction}
\subsection{Overview and Epidemiology}
\subsection{Complications}
\subsection{Maternal Medical Complications}
\subsection{Obstetric Maternal Complications}
\subsection{Fetal and Neonatal Complications}
\subsection{Diabetes and Urogenital Tract Infections}
\subsection{Diabetes and Menarchal Irregularities}
\subsection{Psychology and Diabetes}
\subsection{Prevention, Treatment and Prognosis}
\section{Aim of the Study}
\section{Materials and Methods}
\section{Results}
\subsection{Socio-Economic level and regional origin}
\subsection{Anthropometric characteristics}
\subsection{Therapy}
\subsection{Utenza ambulatoriale}
\subsection{Gynecologic history}
\subsection{Obstetric information}
\subsection{Contraception}
\section{Discussion}
\bibliography{Libreria_personale}
\end{document}