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

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

⬅ Back to Citations

  • Problem: Different people prefer different citation styles both within WM markup and within articles.
  • Who would benefit: Both readers and editors
  • Proposed solution: Allow people to select between certain options and than arrange the refs as much as possible to consistently fit that option. For example:
  1. Some people like refs over one continuous line within mediawiki markup
  2. Some people like each element of a ref to get its own line
  3. Some like the ref to come right after the punctuation. Other like it to come before the punctuation.
  4. Some like vancouver style
  5. Some like the whole ref meta data to exist within the text. Others like it all at the end of the article.

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

  • More comments: This might be easier to achieve once WD does references well, so the project might be a little early.
  • Phabricator tickets:
  • Proposer: Doc James (talk · contribs · email) 21:30, 13 November 2017 (UTC)


Reformatting wikitext like that seems like it would be very prone to creating dirty diffs. Anomie (talk) 14:47, 14 November 2017 (UTC)
Would not change the underlying mediawiki markup. Doc James (talk · contribs · email) 15:36, 14 November 2017 (UTC)
@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)
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
"<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>"
<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
|date=October 2008
Doc James (talk · contribs · email) 14:20, 15 November 2017 (UTC)
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)
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)
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)

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)