首先,如果这个问题太过局部,我的解释太过模糊(甚至可能不相关),给出的 MWE 太过混乱,我深感抱歉。
我正在尝试使用grid.sty
document class提供的网格布局scrreprt
。我在序言中声明\usepackage[fontsize=12pt,baseline=28.8pt,lines=25]{grid}
它是 12pt/28.8pt 或双倍行距。
我使用twolinechapter
中的选项scrreprt
,并将 更改beforeskip
为0\baselineskip
和更改afterskip
为1\baselineskip
使用\RedeclareSectionCommand
并使其居中。
因为我也有未编号章节,并且我希望使其垂直对齐chaptertitle
而不是chapterprefix
编号章节,所以我在下面使用“幻影”章节前缀:
\makeatletter
\renewcommand\chapterlineswithprefixformat[3]{%
\ifstrempty{#2}
{%
{\usekomafont{#1prefix}{\strut%
\setlength{\@tempskipa}{0\baselineskip}
\chapterheadmidvskip}}%
}
{%
\MakeUppercase{#2}%
}%
\MakeUppercase{#3}
}%
\makeatother
但是,我的参考文献应为 12pt,单倍行距。章节和未编号章节应排版为 14pt。所以我
\makeatletter
\renewcommand\large{\@setfontsize\large{14pt}{28.8pt}}
\newcommand\bibnormalsize{\@setfontsize\normalsize{12pt}{14.4pt}}
\makeatother
\renewcommand\bibfont{\bibnormalsize}
问题是,虽然章节标题“参考”正确地位于网格上并与“编号章节”的章节标题对齐,但我的“参考”中引用项目的第一行是“凸起的”(即未与第 1 章下段落的第一行对齐),可能是因为行距是 14.4pt 而不是 28.8pt。
因此,我认为我需要添加一些chapterheadendvskip
未编号章节来降低参考文献中的项目数量,但我不知道该怎么做。
我的(不那么)最小(并且非常混乱)的工作示例如下所示:
%% Preamble %%
\documentclass[12pt,a4paper,chapterprefix=true,toc=chapterentrydotfill,headings=twolinechapter,bibliography=totoc]{scrreprt}
\usepackage[a4paper,left=40mm,right=25mm,top=25mm,bottom=25mm,footskip=10mm]{geometry}
\usepackage{lipsum}
\usepackage[fontsize=12pt,baseline=28.8pt,lines=25]{grid}
\usepackage[authordate,backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{test1,
author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
title = {The LaTeX Companion},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
year = {1994},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\makeatletter
\renewcommand\large{\@setfontsize\large{14pt}{28.8pt}}
\newcommand\bibnormalsize{\@setfontsize\normalsize{12pt}{14.4pt}}
\makeatother
% Strip skips before Chapter and between chapterprefix and chaptername and centre the Chapter
\RedeclareSectionCommand[
beforeskip = 0\baselineskip,
afterskip =1\baselineskip
]{chapter}
\renewcommand*\raggedchapter{\centering}
% Make serif all text on documents, set Chapter to large font (14pt/28.8pt) and Section to normalsize.
\addtokomafont{disposition}{\rmfamily}
\setkomafont{chapter}{\large}
\setkomafont{chapterprefix}{\large}
\setkomafont{section}{\normalsize}
% Raise the chaptertitle .5\baselineskip
\renewcommand*{\chapterformat}{%
\chapappifchapterprefix{\nobreakspace}\thechapter\autodot%
\IfUsePrefixLine{%
\par\nobreak\vspace{-\parskip}\vspace{-.5\baselineskip}%
}{\enskip}%
}
% Phantom chapterprefix for Unnumbered Chapter (Abstract, Bibliography}
\makeatletter
\renewcommand\chapterlineswithprefixformat[3]{%
\ifstrempty{#2}
{%
{\usekomafont{#1prefix}{\strut%
\setlength{\@tempskipa}{0\baselineskip}%
\chapterheadmidvskip}}%
}
{%
\MakeUppercase{#2}%
}%
\MakeUppercase{#3}
}%
\makeatother
\parindent=2em
\setlength\bibhang{1.5em}
\renewcommand\bibfont{\bibnormalsize}
%% Document Parts %%
\begin{document}
\chapter{Introduction}
This is short introduction to the Chapter, only a paragraph or two, before the Sections kick in.
\section{Background}
\lipsum[2].
Random citation here, nothing too fancy \parencite{test1}. \lipsum[4]
\printbibliography[title={REFERENCES}]
\end{document}
答案1
我得到了答案减少算法标题列表后的垂直空间,建议在本地修改参考文献的外观(在链接,算法列表中),使用:
\begingroup
\renewcommand*{\chapterheadstartvskip}{\vspace*{size}} % not applicable for my case.
\renewcommand*{\chapterheadendvskip}{\vspace*{size}} % this is applicable.
\endgroup
因此,我将我的参考文献添加到分组中,如下所示:
\begingroup
\renewcommand*{\chapterheadendvskip}{\vspace*{1.5\baselineskip}}
\printbibliography[title={REFERENCES}]
\endgroup
并且我引用的项目的第一行(在“参考”下)现在与我的“编号章节”(示例中为“第 1 章”)下段落的第一行对齐。