在我的论文中,我必须从单个博客中引用大量内容。URL 大多采用以下结构:
blogname.providername.com/stories/123456
blogname.providername.com/stories/some-random-text-taken-from-the-first-words-of-the-blogpost
blogname.providername.com/topics/some-topic
或者如果它是一条评论
blogname.providername.com/stories/123456/#123456
我大概在一个章节内引用了几十个这种很长的 URL,通常是在脚注中。问题是脚注几乎无法阅读、臃肿且难以正确排版(换行符等)。因此,我想到缩短它们并在附录中引用它们(在参考书目旁边)。
这个想法是使用类似于“参见 URL-1,2012-03-01”的内容,并在下一个引用中使用“参见 URL-2,2010-07-20”,这样它们就会按顺序编号。附录中会有
URL-1:blogname.providername.com/stories/123456
URL-2:blogname.providername.com/stories/327162/#123456
问题是:
bibtex
通过/ -Database引用它们是否有用biblatex
?或者有更好的方法,因为附录中的列表应该与“正常”参考书目分开- 如何在引用时自动对它们进行编号?
对于常规书目管理,我使用biblatex
和biber
。我还引用了其他 URL,因此 URL 的书目驱动程序通常不应修改。顺便说一句:必须将 URL 放入\url{}
,因为要通过 hyperref 对其进行超链接,主要是因为其中一些 URL 包含哈希键,否则会导致问题。
有人知道怎么做吗?欢迎提供任何关于从哪里开始以及如何开始的提示。
編輯1:关于jon的提示:这次讨论可能显示了正确的方向,但我还没有让它工作。我尝试使用以下数字引用命令的新定义。
\newbibmacro*{numcite}{% \printtext[bibhyperref]{% \printfield{prefixnumber}% \printfield{labelnumber}% }}
\DeclareCiteCommand{\numcite}[\mkbibbrackets] {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{numcite}} {\multicitedelim} {\usebibmacro{postnote}}
但这样一来,我仍需要重新定义我的子书目。我不知道这是否可行。
編輯2:最小工作示例(参见我的评论)
%!TEX encoding = UTF-8 Unicode
\begin{filecontents}{mybib.bib}
@book{HorkheimerAdorno-DdA,
Author = {Max Horkheimer and Theodor W. Adorno},
Location = {Frankfurt am Main},
Publisher = {Fischer Taschenbuch Verlag},
Subtitle = {Philosophische Fragmente},
Title = {Dialektik der Aufklärung},
Year = {1988}}
@online{url-blog-example,
Url = {http://blogname.provider.com/stories/some-random-text-from-the-beginning-of-the-blog-entry/#8360558},
Keywords = {Blogurl},
Year = {22.9.2010}}
@online{url-blog-another-example,
Url = {http://blogname.provider.com/stories/some-more-but-different-random-text-from-the-beginning-of-the-blog-entry/#1239877},
Keywords = {Blogurl},
Year = {13.4.2004}}
\end{filecontents}
\documentclass[12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[babel,german=quotes]{csquotes}
\usepackage{hyperref,lipsum}
\usepackage[style=authortitle-dw]{biblatex}
\addbibresource{mybib.bib}
\begin{document}
\lipsum*[1]\footcite[34]{HorkheimerAdorno-DdA} \lipsum*[2]\footnote{Cf. \cite{url-blog-example} and cf. \cite{url-blog-another-example}.}
\printbibheading
\printbibliography[notkeyword=Blogurl,heading=subbibliography,title={Main Sources}]
\printbibliography[keyword=Blogurl,heading=subbibliography,title={Blog Citations}]
\end{document}
答案1
biblatex 文档 ( 18-numeric-hybrid.tex
) 中的示例 18 将帮助您完成大部分操作。下面的文档通过字段集成 URL 引用的引用标签,使示例更进一步shorthand
,无需额外的引用命令。该解决方案需要对 biblatex 2.3+ 和 biber 1.3+ 中提供的 biber 独有的多重排序方案功能进行一些修复。
\documentclass{article}
\usepackage[backend=biber,style=authortitle-dw,
labelnumber,defernumbers,alldates=iso8601]{biblatex}
\usepackage[colorlinks]{hyperref}
% adapted from authortitle-dw.cbx
\renewbibmacro*{cite:shorthand}{%
\printtext[bibhyperref]{\printfield{shorthand}}%
\ifkeyword{blog}
{\iffieldundef{year}
{}
{\setunit*{\addcomma\space}%
\iffieldundef{urlyear}{\printdate}{\printurldate}}}
{}%
\global\booltrue{cbx:noidem}}
\AtEveryCitekey{%
\ifkeyword{blog}
{\edef\cbxlabelnumber{\thefield{prefixnumber}\thefield{labelnumber}}%
\restorefield{shorthand}{\cbxlabelnumber}%
\ifboolexpr{ test {\ifbool{cbx:fullcite}} or
( test {\ifbool{cbx:firstfull}} and not test {\ifciteseen} ) }
{\clearfield{year}}
{}%
\DeclareFieldAlias{url}{blogurl}}
{}}
\defbibenvironment{blog}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\clearfield{year}%
\DeclareFieldAlias{url}{blogurl}%
\let\finentrypunct\relax
\item}
\DeclareFieldFormat{blogurl}{\url{#1}}
\DeclareFieldFormat{labelnumberwidth}{#1\addcolon}
\begin{filecontents}{\jobname.bib}
@online{url1,
Url = {http://blogname.provider.com/stories/entry/#8360558},
Keywords = {blog},
Year = {2010-09-22}}
@online{url2,
Url = {http://blogname.provider.com/stories/text/#1239877},
keywords = {blog},
Year = {2004-04-13}}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{markey,url2,companion,url1}
\printbibheading
\printbibliography[heading=subbibliography,
title={Main References},notkeyword=blog,omitnumbers]
\printbibliography[heading=subbibliography,
title={Blog References},keyword=blog,env=blog,prefixnumbers={URL-},sorting=none]
\end{document}