Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  



























Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Reference list  



1.1  Adjust font size  





1.2  Suppress display  





1.3  Highlight clicked reference in blue  





1.4  Put in a box with a scrollbar  





1.5  Disable columns  





1.6  Add dividers (rules) between columns  







2 In-text cites  



2.1  Hide in-text footnote markers  





2.2  Don't include citation numbers when selecting text (e.g. to copy and paste)  





2.3  Keep reference superscript and subscript text from breaking the line-spacing  





2.4  Prevent wrapping  





2.5  Add a space before the in-text citation  





2.6  Hide the brackets for the inline cite  





2.7  Hide in-text cites  





2.8  Larger, bolder in-text citations  





2.9  Inconspicuous in-text citations  







3 Pop-ups  





4 Error messages  



4.1  Show citation errors in all namespaces  





4.2  Show non-fatal errors  
















Help:Reference display customization







Add links
 









Help page
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 


















From Wikipedia, the free encyclopedia
 


red-outlined triangle containing exclamation point Warning: You are not logged in. Please create an accountorlog in to proceed.

You can customize how inline citations and reference lists appear to you when you are logged into your account by adding any of these rules to your CSS. After editing, bypass your cache.

Reference list[edit]

Adjust font size[edit]

/* Set the font size for reference lists */
ol.references,
div.reflist,
div.refbegin {
  font-size: 90%;
}

Change 90% to the desired size. See also Special:Preferences → Gadgets → Disable smaller font sizes of elements such as Infoboxes, Navboxes and References lists.

Suppress display[edit]

/* Suppress display of the reference list */
ol.references {
  display: none;
}

Highlight clicked reference in blue[edit]

/* Highlight clicked reference in blue to help navigation */
ol.references li:target,
sup.reference:target,
span.citation:target {
  background-color: #DEF;
}

See web colors.

Put in a box with a scrollbar[edit]

/* Reference list in a box with a scrollbar */
@media screen {
  div.reflist {
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.5em;
    max-height: 320px;
  }
}

To show the reference list in a collapsible box, see User:TheDJ/Folded references.

Disable columns[edit]

/* Disable columns for {{reflist}} and {{refbegin}} */
.references-column-count, .references-column-width {
  column-count: 1 !important;
  column-width: auto !important;
}

To set a fixed number of columns, change 1 to the desired number.

Add dividers (rules) between columns[edit]

/* Add dividers (rules) between columns */
.references-column-count, .references-column-width {
  column-rule: 1px solid #aaa;
}

You can alter the appearance of the dividers by changing the values.

In-text cites[edit]

Hide in-text footnote markers[edit]

Edit your common JavaScript and add: {{subst:lusc|User:Zhaofeng Li/RefToggle.js}}

Don't include citation numbers when selecting text (e.g. to copy and paste)[edit]

Edit your CSS to add:

sup.reference { user-select: none; } /* Don't copy citation numbers */

Keep reference superscript and subscript text from breaking the line-spacing[edit]

#content sup.reference {
  vertical-align: baseline;
  position: relative;
  bottom: 0.33em;
}

#content sub.reference {
  vertical-align: baseline;
  position: relative;
  bottom: -0.25em;
}

Prevent wrapping[edit]

This fixes a cosmetic issue with Internet Explorer where a wikilink followed immediately by an in-text cite may cause the link and cite to be underlined together; not supported by IE6 and IE7

/* Add a zero-width space before the in-text citation */
sup.reference:before {
  content: "\200B"; text-decoration: none;
}

This will join the in-text cite to the preceding text, preventing it from wrapping; it does not add a space; does not work for Internet Explorer

/* Add a zero-width joiner before the in-text citation */
sup.reference:before {
  content: "\200D"; text-decoration: none;
}

Add a space before the in-text citation[edit]

This will join the in-text cite to the preceding text, preventing it from wrapping; a space will show between the text and the in-text cite; not supported by IE6 and IE7

/* Add a non-breaking space before the in-text citation */
sup.reference:before {
  content: "\A0"; text-decoration: none;
}

Hide the brackets for the inline cite[edit]

/* Hide the brackets for the inline cite */
sup.reference a span {
  display: none;
}

Hide in-text cites[edit]

/* Hide in-text cites */
.reference {
  display: none;
}

Larger, bolder in-text citations[edit]

/* Larger, bolder in-text citations */
p sup.reference a {
  font-weight: bold;
  font-size: 140% !important;
  color: #55C !important;
  background: #FFF !important;
}
hover sup.reference a {
  background: #FFFF00 !important;
  color: #1010FF !important;
}
hover sup.reference a:visited {
  color: #5A3696 !important;
}
hover sup.reference a:active {
  color: #FAA700 !important;
  background: #0808F8 !important;
}

Inconspicuous in-text citations[edit]

The :before and :after pseudo-elements are not supported by IE6 and IE7

/* inconspicuous in-text citations */
sup.reference {
  white-space: nowrap;
}
sup.reference a {
  font-size: 0.85em;
  font-weight: lighter
}
sup.reference:after {
  content: ' '; /* non-break space after cites */
  text-decoration: none;
}
sup.reference a span {
  display: none; /* hide the brackets */
}
p sup.reference a,
tr sup.reference a,
caption sup.reference a,
ol sup.reference a,
ul sup.reference a,
dl sup.reference a {
  color: black;
}
p:hover sup.reference a,
tr:hover sup.reference a,
caption:hover sup.reference a,
ol:hover sup.reference a,
ul:hover sup.reference a,
dl:hover sup.reference a {
  color: rgb(0, 43, 184);
  text-decoration: underline;
}
p:hover sup.reference a:visited,
tr:hover sup.reference a:visited,
caption:hover sup.reference a:visited,
ol:hover sup.reference a:visited,
ul:hover sup.reference a:visited,
dl:hover sup.reference a:visited {
  color: #5A3696;
}
p:hover sup.reference a:hover,
tr:hover sup.reference a:hover,
caption:hover sup.reference a:hover,
ol:hover sup.reference a:hover,
ul:hover sup.reference a:hover,
dl:hover sup.reference a:hover {
  color: #002BB8;
}
p:hover sup.reference a:active,
tr:hover sup.reference a:active,
caption:hover sup.reference a:active
ol:hover sup.reference a:active,
ul:hover sup.reference a:active,
dl:hover sup.reference a:active {
  color: #FAA700;
}

Pop-ups[edit]

To add pop-ups for the in-text citation that show the full citation, see User:Blue-Haired Lawyer/Footnote popups.

Also, the Gadget at Special:Preferences#mw-prefsection-gadgets->Browsing->Reference Tooltips.

Error messages[edit]

Show citation errors in all namespaces[edit]

By default error messages only show for article, user, template, category, help and file pages. Errors do not show on talk, Wikipedia, MediaWiki, portal and book unless enabled:

/*show cite errors on all pages*/
.mw-parser-output span.brokenref {
  display: inline;
}

Show non-fatal errors[edit]

Additionally, in the Article namespace citation templates suppress non-fatal errors by default. These messages can be made visible using:

.mw-parser-output span.cs1-hidden-error { display: inline; }

Retrieved from "https://en.wikipedia.org/w/index.php?title=Help:Reference_display_customization&oldid=1169778121"

Category: 
Wikipedia how-to
 



This page was last edited on 11 August 2023, at 06:25 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki