12
$\begingroup$

According to my bibtex files, I have made citations in my various published articles to 71 different posts on MathOverflow, both questions and answers, often multiple times in different articles, when the topic recurs in follow-up articles, such as in the emerging literature on infinite chess. I cite MathOverflow whenever it is relevant, and this has been the case in numerous circumstances.

I am truly thankful that it is easy and convenient to cite MathOverflow questions and answers. One need only click the "cite" button to get usable bibtex code for that post.

However, the default bibtex code that is provided can be improved in several respects. The current format seems to be a hodgepodge of sorts implementing various compromises, but I think we can design a more robust default bibtex format.

Let me explain what I would like to see. Currently, for example, if I click on "cite" on my post answering Extensions of PA+$\neg$Con(PA) with large consistency strength, what I get is:

@MISC {457828,
    TITLE = {Extensions of $PA+\neg Con(PA)$ with large consistency strength},
    AUTHOR = {Joel David Hamkins (https://mathoverflow.net/users/1946/joel-david-hamkins)},
    HOWPUBLISHED = {MathOverflow},
    NOTE = {URL:https://mathoverflow.net/q/457828 (version: 2023-11-06)},
    EPRINT = {https://mathoverflow.net/q/457828},
    URL = {https://mathoverflow.net/q/457828}
}

What I would like to get is something more like this:

@MISC {MO457828,
    TITLE = {Extensions of $PA+\neg Con(PA)$ with large consistency strength},
    AUTHOR = {Joel David Hamkins},
    authorid = {1946},
    authorurl = {https://mathoverflow.net/users/1946/joel-david-hamkins},
    HOWPUBLISHED = {MathOverflow answer},
    year = {2023},
    keywords = {lo.logic},
    URL = {https://mathoverflow.net/q/457828},
    urldate = {2023-11-06}
}

[Note: I updated the date format to YYYY-MM-DD per Willie's answer.]

To explain the requested features:

  • The year field should be set to the year of the post. This is an important basic bibtex field, which should definitely be set, but is not set in the default behavior.
  • The howpublished field should differentiate between "MathOverflow question" and "MathOverflow answer". This is an important distinction that I always observe in my own citations, and I think it should become standard.
  • The bibentry id can be improved by prefacing MO to the id number. This would follow MR practice. I expect that most people will make further edits to the id to follow their own personal naming practice.
  • The keywords fields can be set to a comma-separated list of the tags on the main post. This field is used currently by many bibtex styles, as well as by various web apps, mainly for the purpose of sorting bibliographies by topic.
  • The url should be in the url field only. Why are we setting the url in three different fields? When I use the bib data as-is, the url shows up three times in my bibliography. This weird handling of the url seems to have arisen as a compromise trying to accommodate various outdated bibtex usage practices (some predating the common use of urls), but is incompatible with current best practice. I think we should instead settle upon a robust sensible bibtex format, which will work going forward with current and new bibtex formats that people might design. Specifically, for the treatment of urls, I believe the most sensible format will be to use the url and the urldate fields.
  • the urldate should be set to the date of the post (or the date of access?). This is exactly what this field is for.
  • The author field should be used for the author name only, that is, the username. The other author information such as the id number and the url can be placed into other sensible author fields as I indicate. This will allow for easy edits of the bibtex entry, if someone should want to place that information into the author field, such as in the case of an anonymous author, but will also work well for what in my experience has been the main use case, where one is citing an author by their actual name. The authorurl field will enable bibstyles easily to set the author name itself as a hyperlink.

Question. What other requested behavior of the cite function might there be?

$\endgroup$
16
  • 1
    $\begingroup$ I agree that the "year" and "howpublished" fields can be improved along the lines you mentioned. It would be nice to set the ID with the prefix "MO", to match the MathSciNet "MR" prefix, but I think it's not very important: I expect most people use their own format for the IDs, anyway. $\endgroup$ Nov 20, 2023 at 15:52
  • $\begingroup$ I think the standard BibTeX format does not even recognize the "url" field, and the "note" field is used for this purpose instead. Perhaps the point of adding "url" and "eprint" fields is to allow other BibTeX styles to recognize URLs appropriately. I don't know if this is good or bad; it's perhaps unfortunate that your preferred style picks up all of them. $\endgroup$ Nov 20, 2023 at 15:56
  • 1
    $\begingroup$ Regarding the author field, are people actually generally using and wanting that extra info? If other people's experience is anything like mine, as I've mentioned, the anonymous-user case is a minor worry, which can be handled separately and which should not drive the main decision about the format. I think it would be more helpful/convenient to have the bibtex usable by default without edits, which it isn't now. Probably there are hundreds of cases of people who use the current bibtex data as-is and have all this extra junk in their published bibliographies. $\endgroup$ Nov 20, 2023 at 21:41
  • 2
    $\begingroup$ Well, I use it, and I don't consider it "extra junk". I don't know what the average use case is like. In my experience, I have to manually edit most of the BibTeX entries that I copy from elsewhere, so it wouldn't make much difference to me if the author field generated by the "cite" tool just had the post author's username. However, I believe it is good practice to include the user profile ID along with the username, so it's not "junk" for me. Your mileage may vary. $\endgroup$ Nov 20, 2023 at 22:52
  • $\begingroup$ Seems fine to keep it if there are many people using it. I don't view it as necessary in most cases--I am citing a person, not a user profile. We don't generally include userid info (e.g. Orcid) in the author field when citing an article. Why should citing MO be different? $\endgroup$ Nov 20, 2023 at 23:18
  • 1
    $\begingroup$ I have made some edits with various further specific suggestions that will allow I think for the desired usage. $\endgroup$ Nov 21, 2023 at 2:42
  • 1
    $\begingroup$ @Joel: We don't include an ORCID id or such because academic literature is "robust" and the question is "how do you find a paper?" which is why you should cite "A. Karagila" when published as such and "Asaf Karagila" when the journal uses my full name. But academic journals don't vanish, even if the author changed their name, you are citing a paper which is immutable to that name change. MO and SE don't work like that. When the user changes the account name, the old stuff changes with it (with the exception of CW answers, to an extent). $\endgroup$
    – Asaf Karagila Mod
    Nov 21, 2023 at 10:28
  • 1
    $\begingroup$ Case in point, mathscinet.ams.org/mathscinet/article?mr=1764420 was written by Alfred Tarski, but looking it up as a paper of Tarski requires knowing that it's him. On the other hand, looking it up as a paper by Tejtelbaum is easy. On the other hand, if you told me that I'm looking for an answer by "quid", mathoverflow.net/a/205811/7206 would not have been conducive to that search. Neither the fact that the name is "quid" nor the fact that the account had been deleted and the posts were anonymised since then. $\endgroup$
    – Asaf Karagila Mod
    Nov 21, 2023 at 10:34
  • 2
    $\begingroup$ Sure, you are making the case for the authorid field, which would be robust in the way that you are seeking. What I am seeking is a default bibtex format with all the relevant information in sensible fields. Let's make a robust bibtex format for MO. $\endgroup$ Nov 21, 2023 at 12:38
  • 2
    $\begingroup$ Just as a word of timeline, I will wait a couple of weeks for people to add more issues with the citation feature before going to SE with a concrete list of changes that can/should/would be made. Further announcements in due time... $\endgroup$
    – Asaf Karagila Mod
    Nov 22, 2023 at 14:57
  • $\begingroup$ Great! And there is of course no rush on this. $\endgroup$ Nov 22, 2023 at 15:05
  • $\begingroup$ I added a suggestion for the keywords field to be set with the tags. $\endgroup$ Nov 26, 2023 at 22:42
  • $\begingroup$ Could you please add to this question, the screenshot of how the final PDF would look when those BibTeX entries are compiled, for example with the AMS style? $\endgroup$ Nov 28, 2023 at 23:34
  • 2
    $\begingroup$ @NikeDattani If you mean the amsplain style, it doesn't support the url field, so that would not seem to be a good style to use for bibliographies with urls. Nevertheless, one can edit the url into the note field, which is the hack that people often use to get those styles to support urls. $\endgroup$ Nov 29, 2023 at 1:39
  • 1
    $\begingroup$ OK, sure, I'll put something up later. $\endgroup$ Nov 29, 2023 at 3:19

3 Answers 3

9
$\begingroup$

Aside from these cosmetic issues, there are actual serious problems with the BibTeX citation button that are actual bugs: it mangles author names (and post titles, I presume, though I haven’t tested it), creating invalid TeX input. For example, I just tried it on one of my own posts, and got

AUTHOR = {Emil Jeřábek (https://mathoverflow.net/users/12705/emil-je%c5%99%c3%a1bek)},

instead of the needed

AUTHOR = {Emil Je{\v{r}}{\'{a}}bek ...

(This is much worse than I expected. I mean, I can see that converting Unicode characters to TeX input is hard, and would understand if the button just spit out the name literally as Jeřábek, leaving the conversion to the user. But the way it replaced one of the two letters with diacritics with an HTML entity (!) is utterly bizarre.)

$\endgroup$
2
  • 1
    $\begingroup$ For your name at least, one can programmatically convert Unicode characters to TeX. But for users using, for example, the Chinese/Japanese/Korean portions of Unicode in their usernames, the problem does get much harder. // Note that bibtex also doesn't parse unicode at all. But biber / biblatex has no problem with it. $\endgroup$ Nov 22, 2023 at 16:38
  • 4
    $\begingroup$ I think supplying the unicode should be the default, especially for for users like მამუკა ჯიბლაძე mathoverflow.net/users/41291/… with a simple addition to the preamble the TeX engine should be able to render these just fine. Should the citation be to "Mamuka Jibladze" instead? I would presume there's a reason why the username was deliberately written in Georgian script. $\endgroup$
    – David Roberts Mod
    Nov 25, 2023 at 3:12
8
$\begingroup$

On a technical front

urldate formatting

urldate should not be formatted the way Joel suggests

For compatibility with biblatex, date fields must be formatted in YYYY-MM-DD format. (See, e.g. https://tex.stackexchange.com/a/429322/119)

author field formatting

Similarly, the current output of the author field is far from ideal. Regardless of what you think belong in that field, the data as currently presented breaks every attempt to sort/alphabetize authors correctly (in large part due to the parenthetical url).

As online names are not necessary real names, nor do they conform to standard western first/last name preferences, I would request that no matter what data is placed in the field, please at least make it so that the author field includes an extra pair of braces. So it presents as

 author = {{Joel David Hamkins (https://mathoverflow.net/users/1946/joel-david-hamkins)}},

instead. This way at least the sorting will be correct for pseudonymous users, and for users using their real names, one can easily edit the generated bibtex entry to read

author = {{Hamkins, Joel David (https://mathoverflow.net/users/1946/joel-david-hamkins)}},

to sort under H.

bibtex fields

There are two comments that I think should be called out: 1 and 2. BibTeX and BibLaTeX by design do not place any limits to what fields can be used in the .bib file. The system is extremely extensible in that one can create one's own bibliography style to include any field one wants. (See, e.g., how to do it for bibtex; biblatex is considerably easier.) Fields that are unused by the bibliography styles are silently ignored.

Proposing a way to generate bibtex entry, especially when it comes to "new fields" that are ignored by, say, plain.bst, is therefore incomplete without specifying what the intended bibtex/biblatex styles it is targeting.
This is exacerbated by the fact that while there is general agreement for printed matter what are the useful fields to include, for online matter there are rather divergent implementations between various commonly used bibtex styles and biblatex configurations. The current output is a sort of common denominator / compromise between the various styles. Unfortunately, I am quite pessimistic (especially since we are mathematicians) on the prospect of this community settling on one single bibtex style to use.

Defining a new document type?

One option is to explore is to maybe embrace biblatex; this makes it relatively easy to define new document types. (This would repace @misc with something like @mathoverflow or @stackexchange.) This would also allow us to design the data fields from scratch. With some community effort we can even publish a CTAN package specifically to enable the new data type when used with biblatex.

$\endgroup$
9
  • 1
    $\begingroup$ Can you explain how/why double nesting braces affects alphabetization? $\endgroup$ Nov 22, 2023 at 18:59
  • 2
    $\begingroup$ @JoelDavidHamkins By default, in the absence of commas, bibtex treats the last "word" of a name as the last name (there are some babel specific settings that can effect how things like von and van are sorted). This is undesirable when the author string includes additional information (such as an url). Additionally, even in the absence of an url, for usernames like "GH from MO", I don't think it should be interpreted as "MO, GH from". The insertion of braces tells bibtex the string is to be considered a single group. (Think of it like parentheses in order of operations.) $\endgroup$ Nov 23, 2023 at 1:49
  • 1
    $\begingroup$ Basically, the expression {{GH from MO}} is more-or-less saying that the author name has a single "word", which happens to have spaces as part of the word, instead of 3 separate words. $\endgroup$ Nov 23, 2023 at 1:52
  • $\begingroup$ In that case, I would rather have {Joel David Hamkins} than {{Joel David Hamkins}}, so that I am alphabetized by Hamkins, and so I don't think I agree with your double nesting proposal. (As a separate but related matter, my view is that the id and url info should go into their own fields, since they are not properly part of the name, except in the rare circumstance of anonymous authors, which is an unusual case that I don't think should drive the overall policy. I find it regretable that it is such a big part of this discussion.) $\endgroup$ Nov 23, 2023 at 1:53
  • 3
    $\begingroup$ Of the 36 people who earned the most reputation this quarter on the main site, we find GH from MO, YCor, Command Master, 2734364041, Saul RM. Other overall high rep users using pseudonyms include Gro-Tsen, fedja, KConrad, Emerton, Lucia, Sasha, abx, and gowers. I find your insistence on preferring an Anglo-Saxon parsing of names rather disagreeable. $\endgroup$ Nov 23, 2023 at 3:23
  • 1
    $\begingroup$ Though on a practical matter, if the url is removed from the author field, then the only person on the list given that would be impacted by the braces would be GH from MO. $\endgroup$ Nov 23, 2023 at 3:33
  • $\begingroup$ I don't see that I have insisted upon anything. $\endgroup$ Nov 23, 2023 at 15:50
  • 1
    $\begingroup$ Meanwhile, I agree with your proposal for a @mathoverflow bibtex type. This is perhaps ultimately the proposal behind my question. Let's make a high-quality bibtex format that has all the data that we would want, and then create the biblatex code to set it properly. $\endgroup$ Nov 23, 2023 at 15:50
  • 2
    $\begingroup$ Biblatex already has an @online type; we should use that, and add Mathoverflow under the organization field. $\endgroup$ Dec 25, 2023 at 21:20
3
$\begingroup$

I disagree with some of your requests.

It's true, that you and me and many others on the site, are using our real names (or at least the names that appear on our publications). Others do not. If I am citing a post given by "PseudoNeo", having just that name as the author is not reasonable and I wouldn't be surprised to find an editor who would complain about that sort of citation appearing in the bibliography (on the other hand, footnotes get a much broader pass). You say that in the case of an anonymous author this can be a reasonable thing after all, but how should the software recognise when a name is reasonable or not?

Secondly, the name of the reference is something that every person has their own convention. If MathSciNet exports in a way that doesn't match your convention, and I'm assuming that you're using that so much more than you're using the cite button on MathOverflow, then I don't see why MathOveflow should conform to one user's style or another. Having the post ID there is fine, with perhaps the change be "MO" or something.

Having said that, please remember that the cite feature is something that exists on multiple websites across the network, so making changes is something that while possible, will need to be in a modular enough way so that it doesn't change citations on Physics.SE or CS.SE or Math.SE to look like they came out of MathOverflow.

Finally, arXiv exports the eprint field, and presumably that one is used at least as much as the MathOverflow cite feature. And not everyone use biblatex either.

So, while we can probably take some of your requests and make them happen, and I agree that adding question/answer to the citation is a good distinction, I think that making edits for something to match your own personal style is something that we all quite literally need to contend with, and that's okay.

$\endgroup$
7
  • $\begingroup$ I don't understand your remark abour the arxiv and the eprint field. Are you saying the url should appear three times because of that? The only thing that makes sense to me is to have the url in the url field only. And we need the urldate field set to the date of access, since that is what it is for. $\endgroup$ Nov 20, 2023 at 12:58
  • 1
    $\begingroup$ If you're deleting a row, how is that different from deleting part of a row, Joel? I know, it's Ctrl-K vs. erasing a more specific bit (at least in Emacs), but this is not something that deserves two separate author fields. Come on now. For the MO thing, I agree, and I think this can be solved in-software fairly easily. As for the eprint, if you go to arXiv and export the bib data, the eprint field appears there. I don't like it, I remove it, and I don't see how it's any different to the bibtex data generated here. $\endgroup$
    – Asaf Karagila Mod
    Nov 20, 2023 at 13:21
  • 1
    $\begingroup$ I don't really care for your mocking tone in this thread. My request, in the main, is not about personal idiosyncratic formatting, but for sensible changes to the default format, which right now is rather low quality. $\endgroup$ Nov 20, 2023 at 13:26
  • $\begingroup$ The thing is that some of these requests are in fact your idiosyncratic formatting. Bringing up biblatex, which is a common platform but far from the universally accepted standard, is your choice. You even mention your personal practices. And while some of these changes are reasonable and we can certainly see what can be done about them, others, frankly, I perceive as "it will save me a few seconds and clicks". $\endgroup$
    – Asaf Karagila Mod
    Nov 20, 2023 at 13:29
  • 1
    $\begingroup$ Not really, but I have edited to remove some of the comments that have evidently served as a distraction from the main point. $\endgroup$ Nov 20, 2023 at 13:50
  • 2
    $\begingroup$ Meanwhile, the whole point of the cite button is to help save people a little time, so it seems worthwhile to implement it with that perspective. $\endgroup$ Nov 20, 2023 at 14:02
  • 1
    $\begingroup$ Yes, I agree, and I think that some of your suggestions are probably worth looking into, and I will definitely try and do that. $\endgroup$
    – Asaf Karagila Mod
    Nov 20, 2023 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .