调整多列参考书目的垂直和水平对齐方式

调整多列参考书目的垂直和水平对齐方式

我想调整我的参考书目条目的排列,这是我目前所拥有的,其中距离标记为 1-4,我想进行调整:

在此处输入图片描述


我想要实现的日记风格如下:

在此处输入图片描述


这是我的 MWE,我从中借用了两列参考书目的代码egreg 的这个答案

\documentclass[fontsize=12pt,
                            BCOR=0mm,
                            paper=a4,                
                            pagesize=auto,
                            numbers=noenddot,                
                            DIV=12
                            ]{scrreprt} 
%
\usepackage{polyglossia}                         
\setdefaultlanguage[variant=us]{english}         
\usepackage[final,tracking=true]{microtype}                                     
\usepackage{fontspec}                            
\defaultfontfeatures{
     Ligatures = TeX ,                           
         RawFeature={+calt} ,                        
     SmallCapsFeatures={Letters=SmallCaps}
}


\usepackage[american]{selnolig}                  
\usepackage[math-style=ISO,
                        bold-style=ISO]{unicode-math}                                   
\usepackage{libertinus}                             
\usepackage[onehalfspacing]{setspace}           
\KOMAoptions{DIV=last}                           
%
\usepackage[backend=biber, %                        
                        backref=false, %                    
                        backrefstyle=none, %                 
                        style=chem-acs, %                    
                        articletitle=true, %                           
                        subentry=true %                       
                        ]{biblatex}
\usepackage[autostyle=true, %
            german=quotes, %
                        english=american]{csquotes}
\usepackage{multicol}                            

%
%--bib file
%
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
%
@article{Stepto2009a,
    author = {Stepto, Robert F. T.},
    journal = {Pure Appl. Chem.},
    month = {1},
    number = {2},
    pages = {351--353},
    title = {{Dispersity in polymer science (IUPAC Recommendations 2009)}},
    volume = {81},
    year = {2009}
}
@book{Young2011,
    address = {Boca Raton, USA},
    author = {Young, Robert J. and Lovell, Peter A.},
    edition = {3},
    pages = {668},
    publisher = {CRC Press Taylor {\&} Francis Group},
    title = {{Introduction to polymers}},
    year = {2011}
}
@article{Chiefari1998,
    author = {Chiefari, John and Chong, Y. K. and Ercole, Frances and Krstina, Julia and Jeffery, Justine and Le, Tam P. T. and Mayadunne, Roshan T. A. and Meijs, Gordon F. and Moad, Catherine L. and Moad, Graeme and Rizzardo, Ezio and Thang, San H.},
    journal = {Macromolecules},
    month = {8},
    number = {16},
    pages = {5559--5562},
    title = {{Living Free-Radical Polymerization by Reversible Addition?Fragmentation Chain Transfer: The RAFT Process}},
    volume = {31},
    year = {1998}
}
@article{Wu2014e,
    author = {Wu, Yang and Zhou, Yanyan and Zhu, Jian and Zhang, Wei and Pan, Xiangqiang and Zhang, Zhengbiao and Zhu, Xiulin},
    journal = {Polym. Chem.},
    number = {19},
    pages = {5546--5550},
    title = {{Fast conversion of terminal thiocarbonylthio groups of RAFT polymers to “clickable” thiol groups via versatile sodium azide}},
    volume = {5},
    year = {2014}
}
@article{Lewis2017c,
    author = {Lewis, Reece W. and Evans, Richard A. and Malic, Nino and Saito, Kei and Cameron, Neil R.},
    journal = {Polym. Chem.},
    number = {24},
    pages = {3702--3711},
    title = {{Cleavage of macromolecular RAFT chain transfer agents by sodium azide during characterization by aqueous GPC}},
    volume = {8},
    year = {2017}
}
@article{McCormick2004,
    author = {McCormick, Charles L. and Lowe, Andrew B.},
    journal = {Acc. Chem. Res.},
    month = {5},
    number = {5},
    pages = {312--325},
    title = {{Aqueous RAFT Polymerization: Recent Developments in Synthesis of Functional Water-Soluble (Co)polymers with Controlled Structures}},
    volume = {37},
    year = {2004}
}
@article{Plummer2006,
    author = {Plummer, Ronda and Hill, David J. T. and Whittaker, Andrew K.},
    journal = {Macromolecules},
    month = {11},
    number = {24},
    pages = {8379--8388},
    title = {{Solution Properties of Star and Linear Poly( N -isopropylacrylamide)}},
    volume = {39},
    year = {2006}
}
\end{filecontents}
%
%
\addbibresource{\jobname.bib} 
%------------------------------
%%--https://tex.stackexchange.com/questions/22068/biblatex-multicol-incorrect-vertical-space-after-bibliography-heading?rq=1
%           
\newcommand\twocolprintbibliography[2][0pt]{     % Defines \twocolprintbibliography[#1]{#2} command for two-column bibliography with one-column heading. 
                                                                                                 % #1 defines separation of title<->citation and #2 declares title.
    \begingroup %
    \setlength{\multicolsep}{#1} %
    \begin{multicols}{2}[{\printbibheading[title={#2}]}] %
    \printbibliography[heading=none] %
    \end{multicols} %
    \endgroup} % 
%
%
\begin{document}
%
\nocite{*} 
\begin{singlespace}       
{
\setlength{\bibhang}{-2\labelsep}
\setlength{\biblabelsep}{\labelsep}
\twocolprintbibliography[3pt]{Bibliography}
}
\end{singlespace}
%
%
\end{document}

我不是 LATEX 专家,但我认为我必须运用以下价值观:

\setlength{\multicolsep}{#1} %
\setlength{\bibhang}{-2\labelsep}
\setlength{\biblabelsep}{\labelsep}

欢迎提出任何建议!



感谢 moewe 的详细回答,我现在几乎能够实现我所搜索的布局。但是,当 biblabels 的数量分别大于 10 或 100 时,仍然存在问题。为了阐明我想要的行为,我使用 moewe 实现的代码制作了另一张图:

在此处输入图片描述

  1. 现在已经修复,谢谢!
  2. 我希望能够指定此长度,而不管 (3) 占用的长度是多少。它对于所有 bib-entries 都应该相同。
  3. 该长度应灵活,并根据书目标签的长度自动插入,例如(X)、(XX)或(XXX)。
  4. 至于 (2),我希望所有 bib 条目的长度都相同,而不管 (3) 占用的长度。

总而言之,虽然 (2) 和 (4) 对于我的整个参考书目应该保持不变,但 (3) 的长度会有所不同,因为书目标签中的数字数量不同。因此,[(2)+(3)+(4)] 的长度对于所有书目条目来说都是不一样的。

有什么想法可以修改 moeve 的代码片段来解决这个问题?

答案1

  1. 正如已经提到的用户191173 在评论中条目之间的垂直空间由 控制\bibitemsp

    \setlength{\bibitemsep}{4\itemsep}
    

    还有\bibnamesep\bibinitsep仅插入不同作者的作品(\bibnamesep)和首字母不同的作者的作品(\bibinitsep)之间,从而进行视觉分组。

  2. 编号列表式参考书目中的标签和条目之间的空间通常由 控制\biblabelsep

    \setlength{\biblabelsep}{4\labelsep}
    
  3. 环境中列之间的空间multicol由 控制\columnsep

    \setlength{\columnsep}{.5cm}
    
  4. 有点棘手,需要对 进行一些调整\itemindent\defbibenvironment{bibliography}请参阅下面的完整示例。

\documentclass[fontsize=12pt,
               BCOR=0mm,
               paper=a4,
               pagesize=auto,
               numbers=noenddot,
               DIV=12
               ]{scrreprt}

\usepackage[american]{babel}
\usepackage{fontspec}
\defaultfontfeatures{
     Ligatures = TeX ,
         RawFeature={+calt} ,
     SmallCapsFeatures={Letters=SmallCaps}
}

\usepackage{libertinus}
\KOMAoptions{DIV=last}


\usepackage[autostyle=true,
            german=quotes,
            english=american]{csquotes}
\usepackage[backend=biber,
                        backref=false,
                        style=chem-acs,
                        articletitle=true,
                        subentry=true,
                        ]{biblatex}

\usepackage{multicol}
\usepackage[onehalfspacing]{setspace}

\newlength{\bibbeforelabelsep}
\setlength{\bibbeforelabelsep}{\labelsep}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\itemindent}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\itemindent}{\labelsep}%
      \setlength{\leftmargin}{0pt}%
      \addtolength{\itemindent}{\bibbeforelabelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

%%--https://tex.stackexchange.com/questions/22068/
\newcommand*{\twocolprintbibliography}[2][0pt]{
  \begingroup
  \setlength{\multicolsep}{#1}%
  \begin{multicols}{2}[{\printbibheading[title={#2}]}]%
  \printbibliography[heading=none]%
  \end{multicols}
  \endgroup}

\addbibresource{biblatex-examples.bib}

\begin{document}
\nocite{sigfridsson,worman,geer,nussbaum,aksin,herrmann,kastenholz}
\begin{singlespace}
\setlength{\bibitemsep}{4\itemsep}
\setlength{\biblabelsep}{2\labelsep}
\setlength{\columnsep}{1cm}
\twocolprintbibliography[0pt]{Bibliography}
\end{singlespace}
\end{document}

双栏参考书目


也许下面的定义

\newlength{\bibbeforelabelsep}
\setlength{\bibbeforelabelsep}{\labelsep}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}
     {\setlength{\leftmargin}{0pt}%
      \setlength{\labelwidth}{0pt}%
      \setlength{\labelsep}{\biblabelsep}%
      \setlength{\itemindent}{\bibbeforelabelsep}%
      \addtolength{\itemindent}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{##1}}
  {\endlist}
  {\item}

更符合您的喜好。同样,相关参数是 2 和 4\bibbeforelabelsep\biblabelsep

例如

\begin{singlespace}
\setlength{\bibitemsep}{4\itemsep}
\setlength{\biblabelsep}{2\labelsep}
\setlength{\bibbeforelabelsep}{2\labelsep}
\setlength{\columnsep}{1cm}
\twocolprintbibliography[0pt]{Bibliography}
\end{singlespace}

相关内容