抱歉,我问了一个简单的问题(我无法通过搜索找到直接的答案)。参考书目中的第一个页码如下
其他页面的页码以粗体显示,
如何调整 TEX 文件以便参考书目内的页码以粗体显示?
\documentclass[12pt,a4paper]{report}
\usepackage[a4paper,margin=6mm, bottom=14mm]{geometry}
\usepackage{amsmath}
\usepackage{natbib}
\usepackage{tocbibind}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
\usepackage{blindtext}
\fancypagestyle{axionstyle}{%
\fancyhf{}
\renewcommand{\headrulewidth}{5pt}
\cfoot{\Large \textbf{\thepage}} % for example
}
\title{COMPUTATIONAL METHODS FOR THE RIEMANN ZETA FUNCTION}
\author{Axion004}
\begin{document}
\maketitle
\pagestyle{empty}
\pagenumbering{gobble} %????
\tableofcontents
\clearpage
\pagestyle{axionstyle}
\pagenumbering{arabic}%
\section*{Summary}
\addcontentsline{toc}{section}{Summary}
\nocite{•}
\bibliographystyle{plain}
\cleardoublepage
\phantomsection
\bibliography{RiemannTEX}
\pagestyle{axionstyle}
\end{document}
答案1
您可以使用 etoolbox 包来修改第一个 \bibitem 的行为并发出指令 \thispagestyle。
\usepackage{etoolbox}
\newbool{firstbib}
\booltrue{firstbib}
\preto{\bibitem}{\ifbool{firstbib}{\thispagestyle{fancy}\setbool{firstbib}{false}}{}}
修改TEX文件结尾
\end{flushleft}
\nocite{•}
\bibliographystyle{plain}
\cleardoublepage
\phantomsection
\newbool{firstbib}
\booltrue{firstbib}
\preto{\bibitem}{\ifbool{firstbib}{\thispagestyle{axionstyle}\setbool{firstbib}{false}}{}}
\bibliography{RiemannTEX}
\pagestyle{axionstyle}
\end{document}