Extension talk:Cite

Citation is not numbered when i use ":"

1
Bedtry (talkcontribs)

Normally, the citation on the bottom of the page is automatically numbered.

When the last "sentence" of the page uses a ":" infront the citation will loose its numbering.

I tried fixing it with

$(document).ready(function(){

    $('.mw-references-wrap').before('<h1>References</h1>');
});

So that there will be a heading over the last sentence of the page but it does not work.

Any ideas?

Reply to "Citation is not numbered when i use ":""

Is there a technical reason for why the tag name cannot be a simple integer?

11
Elominius (talkcontribs)

For example, <ref name=2022>test</ref> results in "Cite error: The <ref> tag name cannot be a simple integer."

I don't mind this restriction, but I am just asking out of curiosity.

Ancheta Wis (talkcontribs)

The explanation looks something like "the object should be symbolic in nature, and not a number (in C programming, a symbol is like a string; a symbol does not begin with a number -- that would fool the parser into thinking the object being parsed is some kind of number)".

Jdforrester (WMF) (talkcontribs)

I believe this restriction comes from the HTML specification. If you want to use a number-like value as the name, you should quote it (which ideally you should do anyway), i.e. <ref name="2022">test</ref> or similar.

MasterQuestionable (talkcontribs)

Typically most (if not all) parsers make no distinction of strings and numbers in this context. ("everything is string" likely)

Ancheta Wis (talkcontribs)

<ref name= a12345 >test</ref> works perfectly well.

Jdforrester (WMF) (talkcontribs)

It "works" because people are lazy and write it without quotes, but, as I said, properly you should quote it.

Thiemo Kreuz (WMDE) (talkcontribs)

It's not about the quotes. The original reason is that <ref> tags without a name=… are automatically named – with numbers. While there would be a way to allow both (e.g. by prepending two different prefixes) the original authors of this extension found it easier and less confusing for everybody to reserve numbers for internal use.

I hope this helps.

This post was hidden by MasterQuestionable (history)
Reply to "Is there a technical reason for why the tag name cannot be a simple integer?"

How to make references appear in an info box when clicking on them

3
Shine0202 (talkcontribs)

Hello, I'm not sure how I can make it so that when I click on a reference, a box appears with the information in the text itself. Can anyone help me clear this up?

Ancheta Wis (talkcontribs)

On Wikipedia, a Navigation Popup (NavPop) can do this-- Wikipedia:Tools/Navigation popups. It is a JavaScript file that each editor enables and initializes --Ancheta Wis (talk) 14:43, 25 August 2022 (UTC)

Ancheta Wis (talkcontribs)

NavPop pops up when you float the cursor over the wikilink or reference

[Bug] MediaWiki cannot properly handle references in references

2
MasterQuestionable (talkcontribs)
Thiemo Kreuz (WMDE) (talkcontribs)

What should the example illustrate?

Reply to "[Bug] MediaWiki cannot properly handle references in references"

Why can ref names not be purely numerical?

3
79.249.149.73 (talkcontribs)

Not that it bothers me, but is there any technical reason for said restriction?

Thiemo Kreuz (WMDE) (talkcontribs)

As far as I can tell from the code, the reason is that refs without a name are automatically numbered, starting from 1. We want to avoid confusion between such automatically numbered and manually named refs.

An additional argument might have been that the (classic) HTML and CSS standards don't allow names, ids and such to start with a number either. It's typically a good idea to follow well-established standards.

Ancheta Wis (talkcontribs)

Sample from 06:32, 19 August 2022 (UTC) <ref name= a12345 >test</ref> </references> --Ancheta Wis (talk) 06:32, 19 August 2022 (UTC)

Reply to "Why can ref names not be purely numerical?"
Bedivere (talkcontribs)

Hello there. I would like to know if there is a way to hide references to unregistered users. I have found some copy the references but refuse to cite my website.

I've thought maybe it's a good idea to restrict access to the Reflist template, but I'm not sure how to do that. I'd be glad if somebody could help me out.

Want (talkcontribs)
Bedivere (talkcontribs)

Hi there. I have tried doing so, but the references still show up automatically. Haven't found a way to prevent Cite from adding them.

Want (talkcontribs)

You add example code, please. I use next code for it:

{{#if:{{CURRENTLOGGEDUSER}}
|Wikicode for registered users
|Wikicode for anonymous
}}
Bedivere (talkcontribs)

Yeah, I did the same, but using ifeq (which provides similar results). However, the references list still appears to unregistered users because it is added automatically, I presume by the extension itself.

Bedivere (talkcontribs)

I have reviewed the extension code and found no easy way (parameters) to prevent the references from showing up despite there being no <references /> tag. There is a workaround using CSS, but the references are generated anyway and may be found and extracted.

Want (talkcontribs)

Solution may be template. For it I must see example of code.

Reply to "Hiding references"

Placeholder citation numbers are all ampersands

1
Summary by Thiemo Kreuz (WMDE)

Example page appears fixed.

Thadius856 (talkcontribs)

Howdy. We installed MediaWiki 1.37.1 a few weeks back. Today we enabled this extension and noticed that all of the reference numbers are given as solely an ampersand (&). The same character for every reference number.

The output of both <references /> and {{reflist}} behave normally. The anchors seems to be functioning, as is the text-decoration that fire after clicking one of the up arrows.

Can't find anything on Google remotely related and I went through every page I could find here, plus 30 minutes looking through Phabricator without finding anything similar.

Here's a test page on my sandbox at that wiki with nothing else on it.

Nomination for deletion of Template:Footnote group

2
Summary by Thiemo Kreuz (WMDE)

Misplaced on mediawiki.org.

Manabimasu (talkcontribs)
Dinoguy1000 (talkcontribs)

What is the point to reposting this notice here? These templates do not appear to exist on MediaWiki.org, and even if they did, their deletion on Wikipedia would not affect their use here.

Summary by Thiemo Kreuz (WMDE)

Duplicate question, see Topic:W636cdc70qyw5a8f.

Juandev (talkcontribs)

Does site format references regarding any standard? Is there a way to change standards of references how they display?

Dinoguy1000 (talkcontribs)

Cite doesn't format references itself, and it doesn't care about how they're formatted, so you can do whatever you like.

Juandev (talkcontribs)

Does the output follows any citation standard? Is there a possibility to switch between citation standards?

Thiemo Kreuz (WMDE) (talkcontribs)
Juandev (talkcontribs)

Well, on the side of Wikipedia you can modify how the references look in References paragraph via template. But can you modife it in the text? E.g. insted of having anchors lik [1], use somethig like (Peters, 2015)?

Thiemo Kreuz (WMDE) (talkcontribs)
Reply to "Citation standard"
Return to "Cite" page.