Community Wishlist Survey 2017/Citations/Allow readers / editors to see the citation style they like

From Meta, a Wikimedia project coordination wiki

Allow readers / editors to see the citation style they like

  • Problem: Different people prefer different citation styles both within WM markup and within articles.
  • Who would benefit: Readers
  • Proposed solution: Allow people to select between certain options and then arrange the refs as much as possible to consistently fit that option.

This would be a gadget that people could turn on if they wish.

Discussion[edit]

Reformatting wikitext like that seems like it would be very prone to creating dirty diffs. Anomie (talk) 14:47, 14 November 2017 (UTC)[reply]
Would not change the underlying mediawiki markup. Doc James (talk · contribs · email) 15:36, 14 November 2017 (UTC)[reply]
@Doc James: ehm.. you mean it would just create a different presentation of the wikicode for each and every person ? But things like line breaks have meaning inside wikicode, we can't just arbitrarily remove and add them and expect the same kind of output to appear... I don't see how that would work. —TheDJ (talkcontribs) 13:19, 15 November 2017 (UTC)[reply]
First step could be adjusting what readers see. This would simple require taking the individual elements of a reference and rearranging the other to a persons preference.
With respect to mediawiki markup line breaks within cite journal templates do not affect the final output
Thus:
"<ref name=Review08>{{cite journal |vauthors=Chen LX, Schumacher HR |title=Gout: an evidence-based review |journal=J Clin Rheumatol |volume=14 |issue=5 Suppl |pages=S55–62 |date=October 2008 |pmid=18830092 |doi=10.1097/RHU.0b013e3181896921 |url=}}</ref>"
Equals
<ref name=Review08>
{{cite journal
|vauthors=Chen LX, Schumacher HR
|title=Gout: an evidence-based review
|journal=J Clin Rheumatol
|volume=14 |issue=5 Suppl
|pages=S55–62
|date=October 2008
|pmid=18830092
|doi=10.1097/RHU.0b013e3181896921
|url=}}
</ref>
Doc James (talk · contribs · email) 14:20, 15 November 2017 (UTC)[reply]
You seem to be missing the point. So, say that MediaWiki does reformat the first bit of wikitext into the second to display to someone based on their preference. Then, on save, it has to transform it back. But if there was a different reference that was already formatted like the second fragment, it has to be sure not to transform that one back. That's a hard problem even when you're able to include a ton of metadata in the "wikitext" like VisualEditor and Parsoid do; it's probably impossible to do sanely for plain textarea-based wikitext editor where metadata can't be transparently kept while things are being edited.
After that's ruled out, your proposal is left with just the reader-oriented bits. Moving the reference marker with respect to punctuation seems so trivial that we really shouldn't fragment the parser cache for it; someone could probably write a gadget to do it via JavaScript, although the user experience might be somewhat poor as the article would load one way and then be adjusted after it fully loads. The "Vancouver style" thing, as far as I can tell, is what the Cite extension already does; converting to any other style would require all <ref> tags be edited to include more metadata, or would be very specific to each wiki's citation templates (and do nothing if someone didn't use those templates for an article). Anomie (talk) 14:37, 15 November 2017 (UTC)[reply]
I don't understand how this proposal would benefit readers because readers don't look at wikicode. Editors look at wikicode while editing but readers who aren't editing wouldn't be doing that. I'm confused. Ca2james (talk) 05:09, 18 November 2017 (UTC)[reply]
This proposal suggests two things 1) adjusting the mediawiki markup that editors see 2) adjusting the reference style that readers see. Doc James (talk · contribs · email) 05:45, 18 November 2017 (UTC)[reply]

Indeed the futuristic solution for this is m:WikiCite - global citation data via Wikidata. Part of that project is coming up with a standard data structure for citations, and once that's worked out, it's easy to implement a local non-Wikidata-based version as well, by making ref tags (or a new type of citation tag) take more arguments like Anomie says, and have the software do the citation formatting.

As for the markup part, seems like you want a visual editor for wikitext? :-) --Tgr (WMF) (talk) 06:46, 18 November 2017 (UTC)[reply]

  • one of the problems with m:WikiCite is the lack of a single accepted format--different subjects (and users at different levels) have different requirements. But it does not have to be individually variable--there are a few standard reference formats. Most journal databases provide the ability to download in a range of the usual possibilities, and the various citation managers have very great flexibility. DGG (talk) 02:03, 20 November 2017 (UTC)[reply]
A related problem are those bots that come along and change the references. So unless there is some agreement on a standard format, all those bots may have to be retrained. There is one bot that follows me around archiving live links to articles. Then other editors come behind me and reformat references also. Best Regards, Barbara (WVS) (talk) 06:52, 20 November 2017 (UTC)[reply]
  • Lack of common format is not problematic at all - common data structure is what's important. Once you have that, you can just make a separate formatter for each format, and use a template parameter / user preference / whatever to select the right one. (There is also a standard way to autogenerate the format.) Currently different citation templates have different data structures, and different wikis have different sets of templates -- that is a problem. --Tgr (WMF) (talk) 03:30, 20 November 2017 (UTC)[reply]

@Doc James: I don't think adjusting the mediawiki markup that editors see is going to be feasible (per Anomie) as this would cause lots of problems. Adjusting the citation style that readers see (for example, switching to Vancouver style) would be feasible though. Would you be willing to re-scope this proposal to just cover the displayed citation style? Kaldari (talk) 18:28, 20 November 2017 (UTC)[reply]

Thanks Kaldari. Will do as I have time. Might be best to leave this until WD is ready, so maybe simple best to withdraw it all together. Doc James (talk · contribs · email) 19:18, 20 November 2017 (UTC)[reply]
  • Interesting in theory, but needs more work. And this was a poor example because: A) We should not be using the awful, metadata-mangling, barely readable |vauthors style if the whole point is to be producing generic, reformattable-on-the-fly citations; it would be coded as |last1=Chen|first1=L. X.|last2=Schumacher|first2=H. R. (at en.wikipedia, anyway), then munged into that "Chen LX, Schumacher HR" output for someone who demanded Vancouver style citations as what they see. B) We should not ever be using something like |journal=J Clin Rheumatol because these abbreviations are meaningless and confusing to non-expert readers, i.e. the people our citations are for. Always give the full name of the journal, and link it on first occurrence if the journal is notable and we have an article on it.

    That said, yes we need to do something like this. w:en:WP:CITEVAR really needs to die. We should have a single citation format at the code level, and customized output.

    This can probably be done on-wiki with a combination of better Lua coding in the citation templates, a new Javascript-based gadget that does stuff with it, and after it's shown to work at a change in w:en:WP:CITE guidelines to consistently use templated citations (or to just write untemplated ones but get out of the way of those who convert them to templated). And similar changes at other wikis.

    We can do a similar thing some day in providing auto-"translation" to particular dialects (at en.WP, I mean w:en:MOS:ENGVARs), e.g. with markup like {{eng|US=tire|GB=tyre}} and various defaults set (e.g. IE, AU, NZ, etc. would default to GB unless overridden, and whatever). And we can do this for other things, e.g. {{vern|bald eagle|IOC=Bald Eagle|...}} for different capitalization conventions for vernacular names of species in different subfields of biology; default to lowercase per w:en:MOS:LIFE, have a gadget for fans of IOC or whatever other standards to get case conversion exactly as they like it (e.g. capitalization after a hyphen varies by "authority").
     — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  07:24, 4 December 2017 (UTC)[reply]

Voting[edit]