Page MenuHomePhabricator

Oxford/Harvard style citations don't work well with VE
Closed, DuplicatePublic

Description

Many people, including yours' truly, prefer Oxford/Harvard style citations to standard all-in-one in-line references. Most wikis have handy templates for that: {{sfn}} on English Wikipedia, {{odn}} on Polish and so on. However, in VE they have to be added like any other template, there's no easy way to use the handy Cite tab for that. Due to the way VE handles templates by default, when one adds a sfn citation, it looks really bad: it stretches across multiple lines, adds some empty lines and whatnot. The edit then has to be saved, opened for edition in code editor and corrected by hand (removal of empty lines).

Is there a way to make VE treat this category of templates differently?

ve_sfn.png (529×1 px, 177 KB)

Event Timeline

Halibutt raised the priority of this task from to Needs Triage.
Halibutt updated the task description. (Show Details)
Halibutt added a project: VisualEditor.
Halibutt subscribed.

Related - perhaps, but not a duplicate. I don't see any problems with the numbering (which is what the other issue is about), sfn-style refs do not appear in re-use menu anyway, so no, this is not a duplicate.

What I'm pointing at is that sfn-style templates should be correctly shown in-line by the VE, but apparently VE adds both the call and the anchor one right next to each other and this causes the entire code to get messy (empty lines). Compare sfn template from my example above with how well a {{fact}} or {{weasel-inline}} look on English Wikipedia.

To re-create the behaviour:

  1. Add a reference template (such as cite book or cite news) with the parameter ref=harv somewhere. Say, {{Citation|last = Aaardvark|first = John|title = Short title | publication-date = 2012-01-27|ref = harv}}, (use VE, obviously)
  2. Add a corresponding sfn template (say, {{sfn|Aardvark|2012|p=123}}, but using VE) somewhere in the body of the article.
  3. Voila!