我想列出 bib 数据库中的所有论文。但是,代码
\nocite{*}
\printbibliography[sorting=chronological, type={article}, title={\quad}, heading=subbibliography]
由于 而产生额外的一行\quad
。我想要的是所有论文的列表直接地在一些文本下
试卷 1
作者和期刊信息
抽象的
试卷 2
作者和期刊信息
抽象的
...
有人能告诉我如何实现这一点吗?
顺便说一下,我使用了代码
\DeclareBibliographyDriver{article}{%
$\bullet$ {\bodyfont \printfield{title}%
\newblock%
\printnames{author}%
\par%
\newblock%
{%
%\footnotesize\addfontfeature{Color=lightgray}\itshape%
\usebibmacro{journal}%
, vol. \textbf{\printfield{volume}},
\setunit{\space}%
\printfield{pages}%
\newunit%
%\printlist{publisher}%
\setunit{\space}%
\printtext[parens]{\printfield{year}}%
%\newunit%
}}
\par
\newblock%
{
\quad\usebibmacro{abstract}
}
\par\vspace{1\baselineskip}
}
\DeclareNameFormat{author}{%
%\small\addfontfeature{Color=lightgray}%
\ifblank{#3}{}{#3\space}#1%
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}
{}%
}
\newcommand{\printbibsection}[1]{
\begin{refsection}
\nocite{*}
\printbibliography[sorting=chronological, type={#1}, title={\quad}, heading=subbibliography]
\end{refsection}
}
\DeclareSortingScheme{chronological}{
\sort[direction=descending]{\field{year}}
\sort[direction=descending]{\field{month}}
}
答案1
要删除参考书目的标题/标题,请使用heading=none
。
您可以将biblatex
参考书目打印为itemize
列表,只需添加
\defbibenvironment{bibliography}
{\begin{itemize}}
{\end{itemize}}
{\item}
到你的序言中。(无需手动插入项目符号等)
我不会定义\DeclareNameFormat{author}
,而只是使用\DeclareNameAlias{sortname}{first-last}
。
为了实现您正在寻找的文章的布局,我建议article
仅在必要时修改标准驱动程序(参见下面的 MWE)。
\documentclass[american]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authortitle,backend=biber,maxnames=999]{biblatex}
\usepackage{hyperref}
\addbibresource{\jobname.bib}
\DeclareNameAlias{sortname}{first-last}
\begin{filecontents}{\jobname.bib}
@article{testart,
author = {Arnold Uthor and William Riter},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {7},
number = {3},
pages = {1-5},
date = {2010},
abstract = {Abstract of a paper. Blah Blah Bla. Omnes Gallia est divisa in partes tres. This text needs to be longer. Ideally, it should be in English, so the hyphenation algorithm can do its thing.},
issn = {1234-5678},
}
@article{testartlong,
author = {Arnold Uthor and William Riter and Rita Esearcher and Steven C. Ientist and Stuart T. Udent and Peter R. Ofessor and Lewis E. C. Turer},
title = {A Very Interesting Article With a Lot of Authors},
journal = {Journal of Articles},
volume = {5},
number = {8},
pages = {8-12},
date = {2012},
abstract = {This is a fake asbtract of a non-existing paper, but it should still contain quite some text, so I will cotinue to make something up. This is lorem ipsum dolor sit amet bla blah blih blud.},
doi = {12345/6789.10},
}
@article{testarto,
author = {Walter Ordsmith},
journaltitle = {Journal of Sciences and Stuff},
volume = {42},
title = {The Work},
subtitle = {Subtitle},
date = {1983},
abstract = {I am really not confident that I can make up another (third!) fake abstract of somekind of paper that is long enough to leave the impression it actually is a proper abstract.},
url = {http://www.example.com},
}
@book{testbook,
author = {Arnold Uthor},
title = {A Book},
subtitle = {Some Books Have Subtitles},
date = {2013},
publisher = {Peter Ublisher \& Co.},
location = {Place City},
}
@book{testbooko,
author = {Walter Ordsmith},
title = {Title},
subtitle = {Subtitle},
date = {2011},
publisher = {Books},
location = {Atlantis},
editor = {Edward Ditor},
}
\end{filecontents}
\defbibenvironment{bibliography}
{\begin{itemize}}
{\end{itemize}}
{\item}
\DeclareBibliographyDriver{article}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{title}%
\printtext{\smallskip\newline}% you can choose between \smallskip, \medskip, \bigskip, or no skip at all
%\bibstring{byauthor}\setunit{\addspace}%
\usebibmacro{author/translator+others}%
\newunit\newblock
\printunit{\newline}%<--- comment this for no newline before journal
%\newunit\newblock% <-- uncomment this for no newline before journal stuff
\usebibmacro{journal+issuetitle}%
\newunit
\usebibmacro{byeditor+others}%
\newunit
\usebibmacro{note+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{issn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\iffieldundef{abstract}
{}%
{\setunit{\smallskip\newline}%
\bibcpstring[\textbf]{abstract}%
\setunit{\newline}%
\printfield{abstract}}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{maintitle+title}%
\printtext{\smallskip\newline}% you can choose between \smallskip, \medskip, \bigskip, or no skip at all
%\bibstring{byauthor}\setunit{\addspace}%
\usebibmacro{author/editor+others/translator+others}%
\newunit\newblock
\printtext{\newline}%<--- comment this for no newline
%\newunit\newblock% <-- uncomment this for no newline
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\iffieldundef{abstract}
{}%
{\setunit{\smallskip\newline}%
\bibcpstring[\textbf]{abstract}%
\setunit{\newline}%
\printfield{abstract}}%
\usebibmacro{finentry}}
\newcommand{\printbibsection}[1]{
\begin{refsection}
\nocite{*}
\printbibliography[sorting=chronological, type={#1}, title={\quad}, heading=none]
\end{refsection}
}
\DeclareSortingScheme{chronological}{
\sort[direction=descending]{\field{year}}
\sort[direction=descending]{\field{month}}
\sort[direction=descending]{\field{day}}
}
\begin{document}
Hi, this should be a lorem ipsum text, but I can't be bothered to load it, so you will have to deal with this.
\printbibsection{article}
And now, over to the books!
\printbibsection{book}
\end{document}