Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my thesis I have to quote a lot from a single weblog. The URLs are mostly of this structure:

  • 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

or if it is a comment

  • blogname.providername.com/stories/123456/#123456

I quote probably several dozen of these very long URLs mainly within one chapter, normally in the footnotes. The problem is that the footnotes get almost unreadable, bloated and hard to typeset properly (line breaks etc.). Because of that I thought of shortening them and citing them in an appendix (next to the bibliography).

The idea is to use something along the lines of “see URL-1, 2012-03-01” and in the next citation “see URL-2, 2010-07-20”, so they are numbered sequentially. And in the appendix there would be

URL-1: blogname.providername.com/stories/123456

URL-2: blogname.providername.com/stories/327162/#123456

The questions are:

  • would it be useful to quote them via bibtex/biblatex-Database? Or is there a better way, because the list in the appendix should be separated from the ‘normal’ bibliography
  • how to number them automatically as they are quoted?

For regular bibliography management I use biblatex and biber. I quote other URLs as well, so the bibliography driver for URLs shouldn’t be modified generally. BTW: the URLs have to be put into \url{}, because of hyperlinking them via hyperref and mainly because some of them include hash keys, which cause problems otherwise.

Does anyone have an idea how to do this? Any hints where and how to start would be welcome.

Edit1: Regarding jon’s hint: This discussion might be showing the right direction, but I don’t get it to work yet. I tried using the following new definition of a numeric cite command.

\newbibmacro*{numcite}{% \printtext[bibhyperref]{% \printfield{prefixnumber}% \printfield{labelnumber}% }}

\DeclareCiteCommand{\numcite}[\mkbibbrackets] {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{numcite}} {\multicitedelim} {\usebibmacro{postnote}}

But then I would still need a redefinition for my subbibliography. And I don’t know if that is possible.

Edit2: minimal working example (see my comment)

%!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}
share|improve this question
    
A numeric citation/bibliography style would work well for this, I think. –  jon Sep 5 '12 at 18:17
3  
Your appendix idea is possible, but I'd sooner suppress URLs in citations entirely and print them in the bibliography. Some details on your citation/bibliography style and sample bib file entries will probably help get this question answered. –  Audrey Sep 5 '12 at 22:54
    
@jon: I forgot to mention that I use authortitle-dw (a verbose style) as my main style for both citation and bibliography. But you’re right, what I want is a numeric style just for these special URL-citations. Thanks for the hint! –  peregrinustyss Sep 7 '12 at 17:12
    
@Audrey: I do want to suppress the URLs in the citations as I tried to say in my description. In the text there is supposed to be only e.g. "URL-1" (verbatim) and the date. The URL itself should be printed in the list in the appendix. I’ve tried to give a minimal example with subdivided bibliography in my Edit. But without the redefinitions mentioned in my other comment to jon the citations in the footnotes are incomplete. –  peregrinustyss Sep 7 '12 at 17:12

1 Answer 1

up vote 7 down vote accepted

Example 18 from the biblatex documentation (18-numeric-hybrid.tex) will get you most of the way there. The document below takes the example a step further by integrating citation labels for URL references via the shorthand field, dispensing with the need for an additional citation command. The solution requires some fixes to the biber-only multiple sorting scheme feature available with biblatex 2.3+ and biber 1.3+.

\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}

enter image description here

share|improve this answer
    
Thanks a lot, @Audrey, that was exactly what I needed (sorry for answering so late). Could you perhaps edit your entry and remove "labelnumber, " in the second bib-entry, because otherwise your example won't compile. –  peregrinustyss Jan 1 '13 at 16:49
    
I've got one more question: how do I get a colon after the labels in the bibliography (e.g. URL1:). I tried to put an \addcolon after \printfield{labelnumber}}, but then something in the indentation gets wrong, if I use more than 10 entries. –  peregrinustyss Jan 1 '13 at 16:51
1  
You need to adjust the labelnumberwidth format. I'll make an edit to demonstrate. –  Audrey Jan 1 '13 at 22:03
    
Thanks a lot once again. Now everything seems to be fine. –  peregrinustyss Jan 2 '13 at 22:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.