biblatex 和 koma 书目周围的冗余空格

biblatex 和 koma 书目周围的冗余空格

我正在尝试基于表格环境创建简历,其中左栏显示日期,右栏显示信息。我想以同样的方式添加我的出版物:左栏显示某个“类别”,右栏显示引文。为了创建类别(如书籍章节、论文、准备中等),我使用了biblatexbibfilters。在出版物部分,我隐藏了section并将其手动设置为左栏。

它几乎可以正常工作,但我想去掉 Publications 块下方和上方的一些额外空间。目标是让它看起来与其他条目完全一样,如果可能的话,无需手动调整负数vspace。我猜上面的一些空间可能属于被抑制的section,但不确定。

我发现了这个问题:使用 biblatex 减少参考书目中的间距,但它仅涉及参考书目项目之间的空间。

这是我的代码:

\documentclass[a4paper, 10pt, parskip=half]{scrartcl}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[left = 3.0cm, top = 2.0cm, right = 2.0cm, bottom = 2.0cm]{geometry}
\usepackage[dvipsnames, table]{xcolor}

\usepackage[sorting = none, bibstyle = authoryear, backend = biber]{biblatex} %
\addbibresource{Publications.bib}
\DeclareBibliographyCategory{a}
\DeclareBibliographyCategory{b}
\addtocategory{a}{Whiskey2016}
\addtocategory{a}{Whiskey2015}
\addtocategory{b}{Whiskey2015}
\defbibfilter{a}{category=a}
\defbibfilter{b}{category=b}

\usepackage[tracking=true]{microtype}

\newcommand\titlerule[1][1pt]{\rule{\linewidth}{#1}}
\renewcommand*{\sectionformat}{%
    \rlap{\parbox[t][8\height][b]{\textwidth}{\titlerule}}}
\setkomafont{section}{\mdseries\scshape\lsstyle\Large}

\newcommand{\cvd}[2]{#1\ifthenelse{\equal{#2}{}}{}{\newline{-- #2}}}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}


\begin{document}    
\section{Education}
\begin{tabular}{R{2cm}|L{13cm}}
    \cvd{Feb/2013}{present} & studied somewhere else\newline%
    \emph{some very very long department name, and even longer and very stupid university name}, town, country\\
    \multicolumn{2}{c}{}\\
    \cvd{Feb/2010}{Jan/2012} & studied somewhere\newline%
    \emph{Department, University}, town, country\\
\end{tabular}

\section{Publications}
\begingroup
\renewcommand{\section}[2]{}
\nocite{Whiskey2016}
\nocite{Whiskey2015}
\begin{tabular}{R{2cm}|L{13cm}}
    {\mdseries\scshape\small Peer-reviewed} & \printbibliography[filter = a]\\
    \multicolumn{2}{c}{}\\
    {\mdseries\scshape\small Other (in~print)} & \printbibliography[filter = b]\\
\end{tabular}
\endgroup
\end{document}

.bib 文件的内容如下:

@Article{Whiskey2016,
  author  = {Johnnie Walker and Jim Beam and Jack Daniels},
  title   = {How to taste whiskey},
  journal = {The whiskey tasting journal},
  year    = {2016},
}

@Article{Whiskey2015,
  author  = {Johnnie Walker and Jim Beam and Jack Daniels},
  title   = {How to taste even more whiskey},
  journal = {The whiskey tasting journal},
  year    = {2015},
}

输出图像如下: 参考书目周围有冗余空格

答案1

您可以定义一个新的书目标题和一个新的书目环境

\defbibheading{nobibheading}{}
\defbibenvironment{cvdbibliography}
  {\begin{minipage}[t]{\linewidth}
    \list{}{%
      \setlength\itemsep{0pt}%
      \setlength\parsep{0pt}%
      \setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
    }%
  }
  {\strut\endlist\end{minipage}}
  {\item}

进而

\begin{tabular}{>{\mdseries\scshape\small}R{2cm}|L{13cm}}
    Peer-reviewed 
      & \printbibliography[filter = a,heading=nobibheading,env=cvdbibliography]\\
    \multicolumn{2}{c}{}\\
    Other (in~print) 
      & \printbibliography[filter = b,heading=nobibheading,env=cvdbibliography]\\
\end{tabular}

在此处输入图片描述

相关内容