我有一个由 biblatex 和 biber 生成的参考书目,放在目录中,但垂直间距不对。章节应该是双倍行距(前后)。我的机构提供了一个模板,用于设置目录样式并执行双倍行距,但不为参考书目执行此操作。
平均能量损失
这有一个单独的样式文件 - 当我将其内联到 tex 文档中时,该样式文件不起作用。
\documentclass[12pt,letterpaper,oneside,pdftex]{book}
\usepackage{style}
\usepackage{filecontents}
\usepackage[
backend=biber,
style=numeric,
sorting=ynt
]{biblatex}
\begin{filecontents}{\jobname.bib}
@article{Bli74,
author = {Blinder, Alan S.},
year = {1974},
title = {The economics of brushing teeth},
journaltitle = {Journal of Political Economy},
volume = {82},
number = {4},
pages = {887--891},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{A Cat}
\section{Whiskers}
\section{Meow}
\chapter{A Dog}
\section{Tail}
\section{Woof}
\appendix
\chapter{Utilities}
A reference \cite{Bli74}
\section{Util 1}
\section{Util 2}
\chapter{Stuff}
Here's a second reference
\section{Crom}
\section{Ulent}
\backmatter
\printbibliography[
heading=bibintoc,
title={Bibliography}
]
\end{document}
风格.sty
\def\@chapter[#1]#2{
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}
\typeout{\@chapapp\space\thechapter.}
\addtocontents{toc}{\protect\addvspace{10\p@}}
\ifx\@chapapp\appflag
\addcontentsline{toc}{appendix}{\protect\numberline{Appendix \thechapter.}#1}
\else
\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter.}#1}
\fi
\addtocontents{toc}{\protect\addvspace{10\p@}}
\else
\addcontentsline{toc}{chapter}{#1}
\fi
\else
\addcontentsline{toc}{chapter}{#1}
\fi}
\renewcommand\tableofcontents{%
\@starttoc{toc}%
\newpage
}
\def\l@chapter{\pagebreak[3]
\vskip 0.0em
\@dottedtocline{0}{0em}{2.4em}}
答案1
参考书目通过 添加到目录中\addcontentsline{toc}{chapter}{#1}
,因此我们需要\@chapter
在参考书目标题的定义中模仿你在 中所做的操作
\makeatletter
\defbibheading{bibintoc}[\bibname]{%
\chapter*{#1}%
\addtocontents{toc}{\protect\addvspace{10\p@}}%
\addcontentsline{toc}{chapter}{#1}%
\addtocontents{toc}{\protect\addvspace{10\p@}}%
\@mkboth{\abx@MakeMarkcase{#1}}{\abx@MakeMarkcase{#1}}}
\makeatother
我认为有更多优雅的方法来修改目录以满足您的喜好。