Template:Pre: Difference between revisions
en>David Kernow (category) |
en>Komusou (" {{#ifeq:{{SUBPAGENAME}} | sandbox " code, {{pp-semi-protected| small=yes | reason=No need for such template to be anon-editable. }}, and Category:Templates using ParserFunctions) |
||
Line 1: | Line 1: | ||
<div style="border: 1px dashed #2F6FAB; border-bottom:none; margin: 1em 0px 0px 0px; padding: 3px 3px 0.7em 3px; background: #F9F9F9; text-align: right; font-size: 0.5em; line-height: 1ex; color: #2f6fab;{{#if:{{{width|}}}|width: {{{width}}}|}}">[[Template:Pre|pre]]</div> | <div style="border: 1px dashed #2F6FAB; border-bottom:none; margin: 1em 0px 0px 0px; padding: 3px 3px 0.7em 3px; background: #F9F9F9; text-align: right; font-size: 0.5em; line-height: 1ex; color: #2f6fab;{{#if:{{{width|}}}|width: {{{width}}}|}}">[[Template:Pre|pre]]</div> | ||
<div style="border: 1px dashed #2F6FAB; border-top:none; margin: 0px 0px 1em 0px; padding: 0px 1em 0.8em 1em; background: #F9F9F9; line-height: 2.1ex; font-family: monospace; color: #000; overflow: auto; white-space: {{{space|auto}}};{{#if:{{{width|}}}|width: {{{width}}}|}}">{{#if:{{{1|}}}|{{{1}}}|Pre-formatted text looks like this.}}<!-- | <div style="border: 1px dashed #2F6FAB; border-top:none; margin: 0px 0px 1em 0px; padding: 0px 1em 0.8em 1em; background: #F9F9F9; line-height: 2.1ex; font-family: monospace; color: #000; overflow: auto; white-space: {{{space|auto}}};{{#if:{{{width|}}}|width: {{{width}}}|}}">{{#if:{{{1|}}}|{{{1}}}|Pre-formatted text<BR />looks like this.}}<!-- | ||
//-->{{#if:{{{2|}}}|{{!}}{{{2}}}|}}<!-- | //-->{{#if:{{{2|}}}|{{!}}{{{2}}}|}}<!-- | ||
//-->{{#if:{{{3|}}}|{{!}}{{{3}}}|}}<!-- | //-->{{#if:{{{3|}}}|{{!}}{{{3}}}|}}<!-- | ||
Line 20: | Line 20: | ||
//-->{{#if:{{{19|}}}|{{!}}{{{19}}}|}}</div><noinclude> | //-->{{#if:{{{19|}}}|{{!}}{{{19}}}|}}</div><noinclude> | ||
- | ==Usage== | ||
<PRE><NOWIKI> | |||
{{Pre| | |||
Pre-formatted text | |||
looks like this. | |||
}} | |||
</NOWIKI></PRE> | |||
This template mimics the appearance of <code><nowiki><pre></pre></nowiki></code> tags. Main differences include: | This template mimics the appearance of <code><nowiki><pre></pre></nowiki></code> tags. Main differences include: | ||
Line 29: | Line 36: | ||
See the [[Template talk:Pre|Talk page]] for examples of use and further information. | See the [[Template talk:Pre|Talk page]] for examples of use and further information. | ||
{{pp-semi-protected| small=yes | reason=No need for such template to be anon-editable. }} | |||
{{#ifeq:{{SUBPAGENAME}} | sandbox | |||
| {{Template sandbox notice}} | |||
<!-- | {{Template doc}} --> | |||
}} | |||
[[Category:Formatting templates|{{PAGENAME}}]] | [[Category:Formatting templates|{{PAGENAME}}]] | ||
[[Category:Templates using ParserFunctions|{{PAGENAME}}]] | |||
</noinclude> | </noinclude> |
Revision as of 16:08, 22 September 2007
Pre-formatted text
looks like this.
looks like this.
Usage
{{Pre| Pre-formatted text looks like this. }}
This template mimics the appearance of <pre></pre>
tags. Main differences include:
- It allows mid-line-breaks
- Dissallows the text to overflow the page.
- Due to limitations, if the parameter contains any HTML or other Wikimarkup, it will be rendered as such. Thus if a parameter might contain any Wikitext, enclose it manually in
<nowiki></nowiki>
tags.
See the Talk page for examples of use and further information.