7

On (some?) science SE sites, we can get BibTeX code for citing posts. This is what this can look like:

@MISC{30073,
    TITLE = {Cutting equal sticks from different sticks},
    AUTHOR = {Erel Segal-Halevi (http://cs.stackexchange.com/users/1342/erel-segal-halevi)},
    HOWPUBLISHED = {Computer Science Stack Exchange},
    NOTE = {URL:http://cs.stackexchange.com/q/30073 (version: 2015-02-16)},
    EPRINT = {http://cs.stackexchange.com/q/30073},
    URL = {http://cs.stackexchange.com/q/30073}
}

I think that this is weird; there's lots of redundant URLs and having the profile URL in the author field is likely to skrew with all kinds of sorting and citation routines. (\authorcite, oh dear!)

If you were to propose updating their BibTeX output to SE Oversight, what would you change in the status quo resp. my proposal, and why?
To be clear, I'm asking for the (La)TeX perspective here, not the SE perspective.

3

I would stick with Bibtex setting (bibltex style citation could and should be added as an additional style, like the amsref they have there).

@misc is the correct type of entry, that fits unpublished or online items.

The most important issue, in my eyes, is to have all the data in the record. It is usually harmless to have extra data, so I'm not so frightened of the URL/EPRINT redundancy. I am missing the year field (which in my eyes should be the year when the question was posted); month may be optional.

One thing that bothers me is the author. Having "user18324" or "themonkeybeater" as an author, doesn't seem right. But maybe there's no other way around it. Adding a link to the author profile is a nice idea.

So I'd go with

@misc{CS:30073,
    title = {Cutting equal sticks from different sticks},
    author = {Erel Segal-Halevi},
    authorurl = {http://cs.stackexchange.com/users/1342/},
    howpublished = {Computer Science Stack Exchange},
    year= {2014},
    note ={[Online:] \url{http://cs.stackexchange.com/q/30073}},
    url = {http://cs.stackexchange.com/q/30073},
    urldate = {2014-11-26}
}

a bit unrelated: what if you wish to cite the entire thread, rather than the specific question / specific answers? In this case, I would cite the same way as above, but removing the author.

|improve this answer|||||
  • Ad unrelated: if that should happen, why not cite all contributions independently? – Raphael Sep 17 '15 at 22:07
  • Having BibTeX and Biblatex as separate options is a nice thought. – Raphael Sep 17 '15 at 22:09
  • Reg unrelated: seems over-redundant, especially if there are, say, 3+ posts. I see this as citing a single web-page, and would like it to appear as a single citation. – Ran G. Sep 17 '15 at 22:14
  • Then you can probably just cite the website using "normal" code. This feature as I understand it is specifically designed to give attribution for individual posts. – Raphael Sep 17 '15 at 22:18
  • 1
    (+1) But I would add month and day for BibTeX. I wonder if there is a way in Biblatex of telling it to skip the note for this entry. Then you could avoid the redundancy. – cfr Sep 17 '15 at 23:48
1

Here is what I have created for the same post after browsing the documentation of biblatex:

@online{cs.SE:30073,
  title = {Cutting equal sticks from different sticks},
  author = {Erel Segal-Halevi},
  nameaddon = {\url{http://cs.stackexchange.com/users/1342/}},
  howpublished = {Computer Science Stack Exchange},
  url = {http://cs.stackexchange.com/q/30073},
  urldate = {2014-11-26},
  date = {2014-09-17}
}

In particular, note that

  • the key is changed to be unique across SE sites (and more descriptive),
  • every piece of information goes into an appropriate value,
  • there is no redundant information, and
  • posting and access date are both kept.

This renders to (using biblatex (with biber or bibtex) and alphabetic style):

enter image description here

I find the result quite pleasing; nameaddon is missing and would have to be added to the style if necessary, e.g. like so (for biblatex, due to @moewe):

\renewbibmacro{author}{% 
  \printnames{author}% 
  \setunit{\addspace}% 
  \printfield{nameaddon}% 
}
\DeclareFieldFormat{nameaddon}{\mkbibparens{#1}}

This may break styff your chose style does in arbitrarily nasty ways, so use at your own risk. You have to show the author URL, though, so some change to the style and/or exported entry may be needed; this is a proof-of-concept.

For compatibility with older tools, one may want to add (redundant) year and month fields. Some styles (e.g. plainnat) support url, others (e.g. alpha) do not. Find an MWE here for playing around with.

|improve this answer|||||
  • I would feel more comfortable if you left out the \renewbibmacro{author} or explained more explicitly the problems it might cause (which are potentially huge: it will totally wreck authoryear-like styles, and it will have adverse effects on some of the options (dashed, useauthor) of other styles). – moewe Sep 18 '15 at 4:48
  • @moewe I mention it because the CC-by-SA 3.0 license requires attribution, which in this case means "Show the author names for every question and answer" and "Hyperlink each author name directly back to their user profile page on the source site". It's important that the bib exports enables users to fulfill the requirements. I think that between my disclaimer and your comment (thanks for reposting is here!) it's clear that adapting the style has to be done carefully on a case-by-case basis. – Raphael Sep 18 '15 at 6:48
  • 1
    Thank you. Though I don't think it is fair to suggest that the biblatex styles do nasty things. Even the default \newbibmacro*{author} in biblatex.def is more complicated than the code we have here and would be broken by the addition above. – moewe Sep 18 '15 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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