更改印刷书目和脚注引用的外观

更改印刷书目和脚注引用的外观

我希望我的参考书目具有特殊的外观,因为它是我的报告所必需的。我搜索了很多,应该可以用宏来定义它。但我不明白命令以及如何将它们应用于我的问题。

梅威瑟:

\documentclass[a4paper]{scrartcl}
\usepackage[ngerman]{babel} 

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @book{public2000,
        author = {Sam Public},
        year = {2000},
        title = {Some Hargle Bargle},
        shorttitle = {SHB}
    }
    @book{doe2001,
        author = {John Doe},
        year = {2001},
        title = {Some Test Book},
        shorttitle = {Test}
    }
    @book{doepublic2002,
        author = {John Doe and Sam Public},
        year = {2002},
        title = {Some Test Book with a very long title to generate more lines in bibliography},
        shorttitle = {Test long title}
    }
\end{filecontents}
\usepackage[style=authortitle]{biblatex}
\addbibresource{\jobname.bib}


\begin{document}
    \section{Dummysection}
    Dummytext.\footcite[vgl.][IX]{public2000}
    Dummy2. \footcite[vgl.][20]{doe2001}
    Dummy3. \footcite[80]{doepublic2002}
    
    \printbibliography
\end{document}

这导致: 数学建模.pdf

我想改变的两个主要事情如下:

  • 脚注中,短标题应放在 [] 括号内,不应有页码缩写,也不应有逗号分隔。更多作者应以 / 分隔。
  • 在 printbibliography 中,格式应为两“列”,如 style = numeric 中所示。左列应包含作者(如果设置了多个作者,则可以是多行)。右列应包含 [] 括号中的短标题,后跟一个空格,然后是长标题、一个点,然后是年份和可选内容。此外,不同来源之间应有一行间隙。

该文件最终看起来应该是这样的: MWE_新格式

抱歉图片编辑得不好。您能给我点提示吗,我可以在哪里找到正确的宏,以及如何使用它们来获得我想要的结果?提前谢谢!

答案1

引用所需的更改应该是相当不言自明的,并涉及广受喜爱的、、、以及multinamedelim字段格式。finalnamedelimnametitledelimpostnotedelimcitetitle

对于表格形式的参考书目,我建议你看一下biblatex-extbiblatex-ext-tabular参见§6表列书目biblatex-ext文档)。您所需的格式与第 38 页的代码示例生成的输出非常相似,我们只需要引入shorttitlevia begentry

\documentclass[a4paper]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{csquotes}

\usepackage[style=authortitle]{biblatex}
\usepackage{biblatex-ext-tabular}
\usepackage{longtable}
\usepackage{array}
\newcolumntype{L}[1]{%
  >{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\DeclareFieldFormat{citetitle}{\mkbibbrackets{#1}}

\DeclareDelimFormat{multinamedelim}{\addslash}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}
\DeclareDelimFormat{nametitledelim}{\addspace}
\DeclareDelimFormat{postnotedelim}{\addspace}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\DeclareDelimFormat[bib]{multinamedelim}{\addcomma\space}
\DeclareDelimFormat[bib]{finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\bibstring{and}\space}

\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat*{maintitle}{#1}
\DeclareFieldFormat*{journaltitle}{#1}

\renewbibmacro*{begentry}{%
  \DeclareFieldFormat{bibhyperref}{##1}%
  \usebibmacro{cite:title}%
  \printunit{\addspace}%
}

\defbibtabular{bibtabular}
  {\setlength{\LTpre}{0pt}%
   \setlength{\LTpost}{0pt}%
   \renewcommand*{\arraystretch}{2}%
   \begin{longtable}{%
     @{}
     L{\dimexpr0.3\textwidth-\tabcolsep\relax}
     L{\dimexpr0.7\textwidth-\tabcolsep\relax}
     @{}}}
  {\end{longtable}}
  {\anchorlang{\usebibmacro{tabular:sortname}} &
   \driver{\usebibmacro{tabular:omitsortname}} \\}

\begin{filecontents}{\jobname.bib}
@book{public2000,
  author     = {Sam Public},
  year       = {2000},
  title      = {Some Hargle Bargle},
  shorttitle = {SHB},
}
@book{doe2001,
  author     = {John Doe},
  year       = {2001},
  title      = {Some Test Book},
  shorttitle = {Test},
}
@book{doepublic2002,
  author     = {John Doe and Sam Public},
  year       = {2002},
  title      = {Some Test Book with a very long title
                to generate more lines in bibliography},
  shorttitle = {Test long title},
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
  \null\vfill % just for the example
  \section{Dummysection}
  Dummytext.\autocite[vgl.][IX]{public2000}
  Dummy2.\autocite[vgl.][20]{doe2001}
  Dummy3.\autocite[80]{doepublic2002}

  \printbibtabular
\end{document}

脚注格式为“vgl. Public [SHB] IX.”且参考书目分为两列:第一列包含名称,第二列包含其余参考书目条目。

相关内容