Community Wishlist Survey 2017/Editing/Automatically create a reference id for pictures with a label

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Random proposal ►

◄ Back to Editing


  • Problem:

There is a problem, when an article has e.g. different pictures included. To address the pictures within the article, an unambiguous reference to the picture is necessary.

Example:

  • There are three pictures in the article, with the captions: "Figure 1: xyz", "Figure 2: abc", "Figure 3: klm".
  • In the text they are referenced with fig. 1, fig. 2, and fig. 3.
  • Now another picture is added between fig. 2 and fig 3.
  • The former figure 3 has to be renamed to figure 4, and the new figure gets the number 3.
  • This procedure is difficult and prone to errors, when there are dozens of figures in the article.
  • Who would benefit:

Editors of article with a large number of figures.

  • Proposed solution:
  • A figure, which should get a number, is provided with a unique label. (e.g. in the example above "xyz", "abc", "klm")
  • The figure gets a certain number for each label.
  • The labeled figure's caption starts with "Figure ###", where ### is the number of the label.
  • In the text fig. "abc" is replaced by fig. ###.
  • More comments:
  • Phabricator tickets: T7600
  • Proposer: Boehm (talk) 20:42, 18 November 2017 (UTC)

Discussion[edit]

  • An example of something like this can be seen in Scholarpedia. They use <figref>Particle-path.png</figref> to insert a reference to an image. —TheDJ (talkcontribs) 17:44, 29 November 2017 (UTC)
  • This is kind of a weird proposal. The use of figure references is kind of unknown on most wikis, or used only rarely. It doesn't seem like a very high-value proposal. --Izno (talk) 03:46, 30 November 2017 (UTC)
    It is perhaps like the en:Chicken or the egg causality dilemma. If it is hard to implement a correct caption for figures, it is no wonder, that there are so few examples. Once it is easy to reference a certain figure correctly, more authors might consider using it. And that is why there is this wishlist: To identify the need for such a feature. --Boehm (talk) 22:55, 30 November 2017 (UTC)
    Doubtful that this is an egg. Or a chicken. The more likely reason it is unused is because everyone puts their images next to the text they want to highlight, or gives the image a detailed caption that should and does make a linking tool unnecessary. --Izno (talk) 02:14, 1 December 2017 (UTC)
    Indeed, authors put their images next to the text and refer to the image e.g. as the image on the left. But in some articles there are more than one figures on the left, and on the mobile version there is no left or right at all. It is a bad style to reference the figures that way. In wikibooks it is the most common way to address the figures with a unambiguous number, like in classical books. --Boehm (talk) 18:16, 1 December 2017 (UTC)
    We already have a unique label for every figure on the wiki: the filename. Do you want to be able to make a (local?) alias for it? Would a redirect do?
    I think numbering figures is archaic in an environment with hyperlinks, but I am well aware that Wikipedia is often used in environments without hyperlinks, like print.
    In hypertext, I recently referenced a figure with <ref>[[:File:Penn NY original floor.jpg|Photo]], 2015</ref>. This would not work in a print-out, as although the picture is in the article the filename of it would be hidden in print. Writing (see [[:File:Infographical Marvelousness|figure of I.M.]]) would also not work in print. We can already refer to sections: {{Crossreference|selfref=no|(for an illustration, see also the diagram of Infographical Marvelousness, the topmost image on the left in [[#Section|Sectionname]])}}. This would work in print.
    I'd support an extension of this to do internal linking to figures as well as sections, for off-wiki reusabilty (what do print-out conversions do now? anyone know?). You could then have (see [[#File:Infographical Marvelousness|figure of I.M.]]), and when it was exported for print it would re-format to add the description of the (relative?) location of [[#File:Infographical Marvelousness]] and optionally a figure number of the same file, both calculated on-the-fly (the former would also simplify the "See *" templates at Wikipedia:Template:See above, but this might not be worth the processing). Dynamically numbering the figures as you went to print would seem to make more sense than cluttering a hypertext version with them. Any what-you-see-is-what-you-mean editor will automatically number figures for you, so I entirely agree that shuffling them manually is silly. HLHJ (talk) 05:55, 8 December 2017 (UTC)
    • "We already have a unique label": No, we just have a unique label for a file. If files are used multiple times (e.g. a logo, or a reference picture, which is compared to different modifications) it is no more unique.
    • Some figures have no captions, therefore they don't need a figure number, which they would get in case of the file name label.
    • "Would a redirect do?": No, a redirect is nice to have, and an unambiguous reference number is essential.
    • "I think numbering figures is archaic": The same is valid for numbered citations, which a used in every article. Do you really think that numbering citation is archaic?
    • We need in addition to a label a figure counter. This can not be realized with any of your solutions.
    • "so I entirely agree that shuffling them manually is silly.": Yes it is. And thousands of authors are doing this silly thing in lack of an automatic numbering, which any other text editing software can do despite the wikimedia.
    --Boehm (talk) 20:38, 8 December 2017 (UTC)
  • This is interesting, but on a slightly higher level. We lack a mechanism to reference a lot of things on the page, and put some kind of highlight on that thing. The problem isn't really to renumber the sequence, that can be fixed pretty easily, the problem is to create the in-page references in a consistent way. Note also that some of the in-page references should be automatically generated, and some of those should also have some kind of visual anchor. This can be described as a smart anchor-template, but not quite. It needs to interface with the parser to work properly, and probably it would imply changing some extensions. — Jeblad 23:26, 10 December 2017 (UTC)

Voting[edit]

  • Support Support An example how something like this works in practice using MediaWiki can be seen at scholarpedia.org Debenben (talk) 18:12, 27 November 2017 (UTC)
  • Support Support Mahir256 (talk) 09:02, 28 November 2017 (UTC)
  • Support Support β16 - (talk) 10:34, 28 November 2017 (UTC)
  • Support Support --Liuxinyu970226 (talk) 13:05, 28 November 2017 (UTC)
  • Support Support Ninovolador (talk) 21:09, 28 November 2017 (UTC)
  • Support Support Thomas Obermair 4 (talk) 21:48, 28 November 2017 (UTC)
  • Support Support I think this functionality will help the article writer integrate the illustrations into the article. Downtowngal (talk) 23:29, 28 November 2017 (UTC)
  • Support Support Donald Trung (Talk 🤳🏻) (My global lock 🔒) (My global unlock 🔓) 10:02, 29 November 2017 (UTC)
  • Support Support i like what scholarpedia is doing here, though some further refinement might be in order. —TheDJ (talkcontribs) 17:43, 29 November 2017 (UTC)
  • Support Support -<(kmk)>- (talk) 01:54, 30 November 2017 (UTC)
  • Support Support - yona B. (D) 07:02, 30 November 2017 (UTC)
  • Support Support Trizek from FR 20:40, 30 November 2017 (UTC)
  • Support Support Dromedar61 (talk) 20:53, 30 November 2017 (UTC)
  • Support Support but not just for pictures. We need a general system where sequential elements of a single kind (pictures, media files, graphs, interlinear glossed texts..) are automatically numbered with some easy way to refer back to them. Uanfala (talk) 02:01, 2 December 2017 (UTC)
  • Support Support MichaelSchoenitzer (talk) 14:30, 2 December 2017 (UTC)
  • Support Support Waldir (talk) 10:27, 3 December 2017 (UTC)
  • Support Support Ciao • Bestoernesto 02:36, 4 December 2017 (UTC)
  • Support Support Trockennasenaffe (talk) 20:43, 4 December 2017 (UTC)
  • Support Support Fixer88 (talk) 20:46, 4 December 2017 (UTC)
  • Support Support Klaas `Z4␟` V:  21:52, 6 December 2017 (UTC)
  • Support Support Dut in a slightly more advanced version. — Jeblad 23:27, 10 December 2017 (UTC)
  • Support Support Actually, I think that every single paragraph should have an html id, at least in the "permanent link" version. The idea is that often you would like to point to a particular passage of a text, but you end up either with a link to the closest section, or you add an ad hoc anchor. Also, actually being able to pass a text that should be highlighted would be awesome. Psychoslave (talk) 07:58, 11 December 2017 (UTC)