10 关于参考文献多一页,始终删不掉这档事

发布于 2025-05-14 22:53:12

我自己写了一个毕业论文模板,但是最后生成的结果有两个参考文献页,值得注意的是,目录中的超链接是指向第一个空白的参考文献页的,我无论如何都删不掉第一个空白页,特此求助,以下是源代码:

\documentclass[UTF8,a4paper,oneside]{ctexbook}
\usepackage[paperheight=297mm,paperwidth=210mm,
left=27mm,right=27mm,top=26mm,bottom=26mm]{geometry}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{amsmath}
\usepackage{caption}
\usepackage{tikz,tikz-cd}
\usepackage{graphicx}
\usepackage{array}
\usepackage{bm}
\usepackage{amsthm}
\usepackage{amsfonts,amssymb}
\usepackage{float}%图表位置合理
\usepackage{listings,matlab-prettifier}
\numberwithin{equation}{section}%LaTeX公式按照章节编号
\usepackage{paralist}                %这个是item的宏包
\usepackage{mathrsfs}
\usepackage{braket}
\usepackage{graphicx}%交换图的宏包
\usepackage{hyperref}%超链接的宏包
%\usepackage{bibentry}
%\nobibliography* % 禁止自动生成参考文献列表
%\usepackage[backend=biber,style=gb7714-2015]{biblatex}
\setlength{\parindent}{0pt} % 取消段落缩进
\setlength{\headheight}{15pt} % 设置页眉高度
% 行距设置
\linespread{1.5}




% 目录格式设置
\titlecontents{chapter}[0pt]{\addvspace{6pt}\zihao{-4}\heiti}
{\thecontentslabel\ }{}{\titlerule*[0.5pc]{.}\contentspage}

% 章节标题格式
\titleformat{\chapter}{\centering\zihao{-2}\heiti}{第\thechapter 章}{1em}{}
\titleformat{\section}{\zihao{-3}\heiti}{\thesection}{1em}{}
\titleformat{\subsection}{\zihao{4}\heiti}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\zihao{-4}\heiti}{\thesubsubsection}{1em}{}

% 封面
\newcommand{\makecover}{
    \thispagestyle{empty}
    \begin{center}
        \vspace*{2cm}
        {\zihao{-2}\heiti          }%大学名称
        
        \vspace{2cm}
        {\zihao{-2}\heiti 毕业设计(论文)}
        
        \vspace{3cm}
        {\zihao{2}\heiti            } %论文题目
        
        \vspace{3cm}
        {\zihao{-4}\heiti
            \begin{tabular}{cc}
                年\quad 级: & \underline{} \\
                学\quad 号: & \underline{} \\
                姓\quad 名: & \underline{} \\
                专\quad 业: & \underline{} \\
                指导教师: & \underline{} \\
            \end{tabular}
        }
        
        \vfill
        {\zihao{-4}2025年6月}
    \end{center}
    \clearpage
}
\renewcommand{\theequation}{\arabic{equation}}
\begin{document}        
    \newtheorem{lemma}{Lemma}[section]
    \newtheorem{corollary}{Corollary}[section]
    \newtheorem{remark}{Remark}[section]
    \newtheorem{theorem}{Theorem}[section]  % 绑定到section计数器
    \newtheorem{definition}{Definition}[section]
    \newtheorem{proposition}{Proposition}[section]
    \numberwithin{section}{chapter}         % 确保section也带chapter编号
    % ========== 前置部分 ==========
\pagestyle{empty}
\makecover % 仅生成一次封面
\clearpage 

% 扉页
\thispagestyle{empty}
\begin{center}
    {\zihao{-2}\heiti 毕业设计(论文)}\\
    \vspace{2cm}
    {\zihao{2}\heiti }\\
    \vspace{3cm}
    {\zihao{-4}\heiti
        \begin{tabular}{cc}
            年\quad 级: & \underline{} \\
            学\quad 号: & \underline{} \\
            姓\quad 名: & \underline{} \\
            专\quad 业: & \underline{} \\
            指导教师: & \underline{} \\
        \end{tabular}
    }
    \vfill
    {\zihao{-4}2025年6月}
\end{center}
\clearpage
    % 声明部分
    \chapter*{学术诚信声明}
    \thispagestyle{empty}
    \begin{center}
        \zihao{-2}\heiti 学术诚信声明
    \end{center}
    
    \vspace{2cm}
    \zihao{-4}\songti
    本人郑重声明:所呈交的毕业设计(论文)真实,无抄袭行为,文中出现的所有数据皆真实有效
    
    \vspace{2cm}
    \begin{flushright}
        作者签名:\underline{    }\\
        日期:\underline{2025.6}
    \end{flushright}
    
    \vspace{2cm}
    \zihao{-4}\songti
    本毕业设计(论文)作者同意学校保留.。。。    
    \vspace{2cm}
    \begin{flushright}
        作者签名:\underline{} \\
        指导教师签名:\underline{} \\
        日期:\underline{2025.6}
    \end{flushright}
    \clearpage
    % ========== 摘要目录 ==========
    \frontmatter
    \pagestyle{plain}
    \pagenumbering{roman} % 罗马页码从声明开始
    
    % 中文摘要
    \chapter*{摘\quad 要}
    \markboth{摘要}{}
    \vspace{1em}
    \noindent
    {\zihao{-4}\heiti 关键词:\\
        \zihao{-4}\songti
        
        
        % 英文摘要
        \chapter*{Abstract}
        \markboth{Abstract}{}
        \vspace{1em}
        \noindent
        {\zihao{-4}\bfseries Key words:} \\
        \zihao{-4}\rmfamily
        
        
        % 目录
        \tableofcontents
        \clearpage
        
        
        % ========== 正文部分 ==========
        \mainmatter
        \pagestyle{fancy}
        \fancyhf{} % 清除所有页眉页脚设置
        \fancyhead[C]{\zihao{-4}\heiti 你的页眉内容} % 同时设置奇偶页
        \fancyfoot[C]{\zihao{-4} 第\thepage 页}
        \renewcommand{\headrulewidth}{0.8pt}
        
        % 强制章节起始页使用fancy样式
        \makeatletter
        \let\oldchapter\chapter
        \renewcommand{\chapter}{\@ifstar{\starchapter}{\nostarchapter}}
        \newcommand{\starchapter}[1]{\oldchapter*{#1}\thispagestyle{fancy}}
        \newcommand{\nostarchapter}[1]{\oldchapter{#1}\thispagestyle{fancy}}
        \makeatother
        
        \chapter{绪论}
        \section{研究背景}
        
        \section{预计目标及其成果}
        预期目标:
        % 后续章节
        \chapter{主体内容}
        \section{}
        \subsection{}
        
        \subsection{}
        \subsection{}
        \section{1.1}
        \cite{CL03}
        \subsection{}
        \subsection{}
        \subsection{}
        \subsection{} 
        % 结论
    %    \backmatter
        \chapter*{结\quad 论}
        \addcontentsline{toc}{chapter}{结论}

        
        % 致谢
        \chapter*{致\quad 谢}
        \addcontentsline{toc}{chapter}{致谢}
        % 参考文献
        \chapter*{参考文献}
        \addcontentsline{toc}{chapter}{参考文献} % 将参考文献加入目录
        \thispagestyle{fancy} % 强制应用正文页眉页脚样式
        \begin{thebibliography}{10}
            \bibitem{PL01} 
            P
            
            \bibitem{CS02} 
             C 
            
            \bibitem{CL03} 
            C
            
        \end{thebibliography}
    \end{document}

查看更多

关注者
0
被浏览
104
Sagittarius Rover
我要成为Typst糕手/(ㄒoㄒ)/~~

其实答案比较简单。

不需要在206行(大约)显式写出\chapter*{参考文献}

可以看book.cls中关于thebibliography环境的定义

image.png

1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览