Help:Printing: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit
 
(19 intermediate revisions by 15 users not shown)
Line 1:
{{redirect|WP:PRINT|guidance on sources in print|Wikipedia:Offline sources}}
{{Redirect|WP:PRINTABLE|the guidelines on printworthy page titles|Wikipedia:Printability}}
{{Use dmy dates|date=October 2014}}
{{Wikipedia how to}}
{{nutshell|To print a Wikipedia page, select File → Print from your web browser, or click on the browser print icon.}}
 
In general, printing a Wikipedia [[wp:article|article]] is as simple as selecting ''PrintPrintable pageversion''jje7k7 efrom MediaWikithe sidebartools 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 [[wp:self|self references]] like section edit links, navigation boxes, message boxes and metadata.<ref>The rationale for not printing navigation boxes is that these items contain [[wp:wikilinks|wikilinks]] that are of no use to print readers. (See [[User talk:Ruud Koot//en.wikipedia.org/w/index.php2010#Do you recall the reason?title=User_talk:Ruud_Koot&oldid=341560230#Do_you_recall_the_reason.3F]]) There are two problems with this rationale: First, other wikilink content does print, ''for example'' [[wp:ALSO|See also]] and [[Wikipedia:WikiProject Succession Box Standardization#Overview|succession boxes]]. Second, navigation boxes do contain useful information regarding the relationship of the article to the subjects of related articles.</ref>
 
==Printable version==
The default Vector skin has a selection in the lefttools sidebarmenu at the top-right for 'PrintPrintable pageversion'. 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 <code>media="print"</code> 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 <code>@media print</code> rules from user style sheets—sheets, see below.
Older browsers do not automatically apply print rules when using the browser print feature or don't apply them correctly. These browsers include:<ref>{{cite web |title=CSS print media browser conformance |url=http://www.codestyle.org/css/media/print-BrowserSummary.shtml |work=Code Style |accessdate=11 November 2009}}</ref><ref>{{cite web |url=http://w3development.de/css/assigning_external_css/link.html |title=Assigning external CSS > link |accessdate=9 April 2009}}</ref>
* Internet Explorer 6 and older
* Netscape Navigator 4.73 and older
* Firefox 5 and lower
 
Printable version does not apply <code>@media print</code> rules from user style sheets— see below.
 
==CSS==
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 admins[[Wikipedia:Interface administrators|interface administrators]].
 
===Classes===
Line 30 ⟶ 27:
 
===@media print===
CSS media types define the rules for different types of presentation media. The normal display uses <code>@media screen</code> rules; printing rules can be defined with defined <code>@media print</code>.
 
==Controlling print==
Line 43 ⟶ 40:
 
;Print URLs for references in citation templates:
<sourcesyntaxhighlight lang="CSS">/* print URLs for references */
#content cite a.external.text:after {display: inline;}</sourcesyntaxhighlight>
* Note: URLs will always print for references that do not use citation templates
 
;Do not print references:
<sourcesyntaxhighlight lang="CSS">/* do not print references */
@media print {
ol.references {display: none;}
}</sourcesyntaxhighlight>
 
;Change the print font size:
<sourcesyntaxhighlight lang="CSS">/* save ink and paper with very small fonts */
@media print {
#footer,
Line 68 ⟶ 65:
font-weight: normal;
}
}</sourcesyntaxhighlight>
 
;Remove: space above title, remove "From Wikipedia, the free encyclopedia", URL, categories, modification text and license text
<sourcesyntaxhighlight lang="CSS">/* Remove non-essential elements */
@media print {
.firstHeading { margin-top: 0; padding-top: 0; }
Line 78 ⟶ 75:
#catlinks, .catlinks { display: none; }
#footer { display: none; }
}</sourcesyntaxhighlight>
 
==Linking==
Line 92 ⟶ 89:
==See also==
* [[Help:Cascading Style Sheets]]
* [[Help:Books]]
* [[User:TheDJ/Print options]]— a script that gives you greater control of how Wikipedia pages are printed.