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 Printable version  





2 CSS  



2.1  Classes  





2.2  @media print  







3 Controlling print  



3.1  Elements  





3.2  Personal customization  







4 Linking  





5 See also  





6 Notes  





7 External links  














Help:Printing






Català
Italiano
Malti
Nederlands


 

Edit 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
 




In other projects  



Wikibooks
 


















From Wikipedia, the free encyclopedia
 


In general, printing a Wikipedia article is as simple as selecting Printable version from the tools menu on the sidebar or at the top-right. Your browser probably has its own print preview feature.

The MediaWiki software that Wikipedia runs on uses Cascading Style Sheets in order to specify the style and layout that is suitable to a printed version of the page. In modern browsers, the print function of the browser should automatically use the rules in the style sheets when you print an article, therefore the print command of your web browser is also useful.

Certain page elements normally do not print; these include self references like section edit links, navigation boxes, message boxes and metadata.[1]

Printable version[edit]

The default Vector skin has a selection in the tools menu at the top-right for 'Printable version'. This printable version is often misunderstood, as it is not exactly a print preview. It does not show page numbers, headers and footers applied by your browser. For a proper print preview, use the one supplied by your browser.

Print page is not needed for any modern browser, as these browsers will parse the media="print" CSS styles included in the markup of Wikipedia pages. The print rules are applied automatically when the page is printed or previewed from the browser.

Printable version does not apply @media print rules from user style sheets— see below.

CSS[edit]

MediaWiki provides a print specific styling. This style sheet can be edited only by the developers.

The Wikipedia specific print style sheet is at MediaWiki:Print.css. This style sheet can supplement and override the base; it can only be edited by interface administrators.

Classes[edit]

MediaWiki:Print.css defines certain classes that are non-printable, specifically navbox, infobox.sisterproject, editlink, noprint, metadata, dablink. For example: since {{navbox}} uses the navbox class, any elements based on it will not print.

@media print[edit]

CSS media types define the rules for different types of presentation media. The normal display uses @media screen rules; printing rules can be defined with defined @media print.

Controlling print[edit]

Elements[edit]

When creating a new element that should not print, the noprint class can be applied; for example:

<span class="noprint">foo</span>

Here, the content foo would display, but not print. You can also use {{noprint}}, a template wrapper for the noprint class. Some other templates, such as {{unprintworthy-inline}}, also include the noprint class.

Personal customization[edit]

Readers with accounts can modify their Special:MyPage/skin.css to customize their individual printing experience. Remember that rules using @media print will show— or not show if that is the intent —in print preview but not printable version.

Print URLs for references in citation templates
/* print URLs for references */
#content cite a.external.text:after {display: inline;}
Do not print references
/* do not print references */
@media print {
    ol.references {display: none;}
}
Change the print font size
/* save ink and paper with very small fonts */
@media print {
    #footer,
    #content,
    body { font-size: 8pt !important; }
    h1 { font-size: 17pt }
    h2 { font-size: 14pt }
    h3 { font-size: 11pt }
    h4 { font-size: 9pt }
    h5 { font-size: 8pt }
    h6 {
        font-size: 8pt;
        font-weight: normal;
    }
}
Remove
space above title, remove "From Wikipedia, the free encyclopedia", URL, categories, modification text and license text
/* Remove non-essential elements */
@media print {
    .firstHeading { margin-top: 0; padding-top: 0; }
    #siteSub { display: none; }
    .printfooter { display: none; }
    #catlinks, .catlinks { display: none; }
    #footer { display: none; }
}

Linking[edit]

It is possible to include links to the printable version of a page. Such links should not be needed in articles, and the use elsewhere should consider the actual need and limitations.

The link to the printable page is of the format:

http://en.wikipedia.org/w/index.php?title=Help:Printable&printable=yes

A link to the printable version of a page can be created by using

{{fullurl:{{FULLPAGENAME}}|printable=yes}}

See also[edit]

Notes[edit]

  1. ^ The rationale for not printing navigation boxes is that these items contain wikilinks that are of no use to print readers. (See User talk:Ruud Koot/2010#Do you recall the reason?) There are two problems with this rationale: First, other wikilink content does print, for example See also and succession boxes. Second, navigation boxes do contain useful information regarding the relationship of the article to the subjects of related articles.

External links[edit]


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

Categories: 
Wikipedia how-to
Wikipedia interface help
Wikipedia sidebar help
 



This page was last edited on 23 May 2023, at 16:10 (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