Extension talk:Cite

Use a cite template across multiple pages

Sera denoir (talkcontribs)

I don't know that this is a bug, a feature request, or me not knowing what I'm doing. Use case is this:

My wiki hosts a number of documents related to court proceedings. Most are standard formats, but one is unique. I'm using a cite note for that format to explain to users what they need to read the file (for example, see the FTR cite at this link court(dot) raindrop(dot)works/wiki/21CR61225#Media - you'll have to copy/paste because of the link spam warning)

Any case that I'm working on that has this file type will have the same cite. I know there's a way to cite the same material multiple times in the same page, but is there a way to do the same across multiple pages?

Thiemo Kreuz (WMDE) (talkcontribs)

People on Wikipedia sometimes do this with templates that can be used in as many references as needed. Here is an example. When used in wikitext it looks like this:

<ref name="Iranica">{{Encyclopaedia Iranica}}</ref>
Sera denoir (talkcontribs)

Thanks .. it looks like that'll work. I'm going to have to dig more into it to make sure I set it up right, but it does seem like a usable option!

Sera denoir (talkcontribs)

Yep, I was able to get it to work!

And now that I'm learning more about how the ref tags work, seems I don't even have to name it (which since it's only likely going to be used once per page, might make sense)

Ancheta Wis (talkcontribs)

In the wiki article, the named ref could be thus, with a unique name, say aPmm2 in camelCase <ref name= aPmm2 >AuthorName [ThisIsTheURL (dateHere) This is the Title] More information here.</ref>

And when you cite aPmm2 again, use Here is another sentence.<ref name= aPmm2 />

Additional information can be added using the rp template:Here is a third sentence.<ref name= aPmm2 />{{rp| page 2}}

The real use of aPmm2 occurred in https://en.wikipedia.org/wiki/Common_Security_and_Defence_Policy

You would have to transclude the definition of named ref aPmm2 to each of your target articles.

This post was hidden by Ancheta Wis (history)
Reply to "Use a cite template across multiple pages"

Citation is not numbered when i use ":"

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


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

Any ideas?

Thiemo Kreuz (WMDE) (talkcontribs)

I'm afraid I can not reproduce this. On which wiki does this happen? Do you have an example page?

Bedtry (talkcontribs)

Does it stay numbered for you, if the last sentence starts with ":"? If so i will provide pictures to show how it is in my wiki

Thiemo Kreuz (WMDE) (talkcontribs)

You can post a small wikitext example that triggers the error for you.

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

Style font size of cite with css

Bedtry (talkcontribs)

Any chance to style the font size of the cite on the bottom of the page?

I tried changing it with .mw-body { ..

Thiemo Kreuz (WMDE) (talkcontribs)

That should generally be possible with normal CSS selectors. You probably want one that includes .references. However, it depends on what you want to achieve and which wiki this is about. By default the Cite extension doesn't touch the default font-size, but some communities changed it for their wiki.

Bedtry (talkcontribs)

oh yes that works!

Reply to "Style font size of cite with css"
C holtermann (talkcontribs)

I'm looking for a way to include the text of a reference in the text of the page. I'd like to have something like:

This is a text from [1].

These are some of the books referenced on this page:

  • Some author, Some book [<- This is what I'd like to achieve, identical to what is shown in References]


[1] Some author, Some book

Is there a possibility to achieve that?

Thiemo Kreuz (WMDE) (talkcontribs)

Not with this extension, sorry. You can link to the same reference twice, but it can't be displayed in two different places.

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)

Why can ref names not be purely numerical?

3 (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)

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

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)

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

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

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

What should the example illustrate?

Reply to "[Bug] MediaWiki cannot properly handle references in references"
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:

|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"
Return to "Cite" page.