Help:Printable: Difference between revisions

From Web
Jump to navigation Jump to search
m (1 revision(s))
 
m (1 revision(s))
(No difference)

Revision as of 17:33, 18 November 2006

Template:H:h

Printers

If you use the default skin ("Monobook"), MediaWiki uses Cascading Style Sheets in order to specify the style and layout of the printable version of a page. In modern browsers, the print function of the browser should automatically select this style sheet when you print an article -- hence the "Print" command of your web browser is normally all you need to know.

If you are using other, older skins such as the "Standard" skin, you can get a printable version of a page using the "Printable version" link, or by adding the text "&printable=yes" to the URL, e.g.

http://meta.wikimedia.org/w/wiki.phtml?title=Help:Template&printable=yes

You create a URL to the printable version of the current page with:

{{SERVER}}{{localurl:{{PAGENAME}}|printable=yes}}

which displays:

//web.ing.unimo.it/wiki/index.php?title=Printable&printable=yes

Screen

To view a print optimized version of a page one can provide "&printable=yes" in the URL, e.g.

http://meta.wikimedia.org/w/wiki.phtml?title=Help:Template&printable=yes

This does not work with Monobook and Myskin (hence it also does not work when not logged in). The other skins have a link to this URL. Printing an ordinary page should also automatically print this version, even though it is not on the screen. To see it on the screen, use the Print Preview feature of your browser. However, this is not quite the same: depending on your print settings, it may include page numbers, etc.

CSS

http://meta.wikimedia.org/style/wikiprintable.css :

/* MediaWiki print stylesheet */

body {
 color: #000000; background: #ffffff;
}


/* MSIE/Win doesn't understand 'inherit' */
a, a.external, a.new, a.stub {
 color: black ! important;
	text-decoration: none ! important;
}
#article {
	margin: 0 ! important;
}

/* Continue ... */
a, a.external, a.new, a.stub {
	color: inherit ! important;
	text-decoration: inherit ! important;
}

/* Hide ugly UI stuff */
#quickbar, #topbar, #footer, #siteNotice,
.editsection, .toctoggle {
	display: none;
}

/* */
#article {
	position: relative;
	margin: inherit ! important;
}

/* Show some stuff */
.urlexpansion {
	display: inline ! important;
}

.printfooter {
	border-top: solid 1px black;
	display: block ! important;
}

/* Old stuff, fixme:
.bodytext { }
a.CBlink { color: #0000AA; text-decoration: none; font-size: 12pt; }
a.interwiki, a.external { color: #3333BB; text-decoration: none; }
h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
i.link, u.link { color: #000066; }
p.subtitle { padding-top: 0; margin-top: 0; }
*/

Template:H:f