Template:Usage: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
m
(Created page with "<onlyinclude><b>{{((}}{{PAGENAME}}{{#if: {{{sub|}}}|/{{{sub}}}|}}</b>{{#if: {{{1|}}} | <b>{{!}}</b><i> {{{1}}} </i> |}}{{#if: {{{2|}}} | <b>{{!}}</b><i> {{{2}}} </i> |}}...")
 
Line 110: Line 110:
Other times it may be necessary to lay out the code and the result in a table. To simplify this, use {{Usage|sub=Example}} and {{Usage|sub=Result}}. Start with {{Usage|sub=Example}}, then wrap the code in <nowiki><pre></nowiki> tags. Finally, copy the code - without the <nowiki><pre></nowiki> tags - as an argument to {{Usage|sub=Result}}.
Other times it may be necessary to lay out the code and the result in a table. To simplify this, use {{Usage|sub=Example}} and {{Usage|sub=Result}}. Start with {{Usage|sub=Example}}, then wrap the code in <nowiki><pre></nowiki> tags. Finally, copy the code - without the <nowiki><pre></nowiki> tags - as an argument to {{Usage|sub=Result}}.


{{Float|left}}<pre>
{{Float|left|<pre>
{{Usage/Example}}
{{Usage/Example}}
<pre>{{TemplateCode}}&lt;/pre>
<pre>{{TemplateCode}}&lt;/pre>
Line 116: Line 116:
{{TemplateCode}}
{{TemplateCode}}
}}
}}
</pre>{{Float|end}}
</pre>}}


Note that {{Usage|sub=Example}} is used by itself with the example code following it, while {{Usage|sub=Result}} takes the result code as an argument.
Note that {{Usage|sub=Example}} is used by itself with the example code following it, while {{Usage|sub=Result}} takes the result code as an argument.

Navigation menu