Difference between revisions of "Template:C"

From Maths
Jump to: navigation, search
m (Fixed typo)
m
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This is like the <code>M</code> template on [http://maths.kisogo.com maths.kisogo.com] only for code instead, adds a code block with optional styling.
+
This is like the <code>M</code> template only for code instead, adds a code block with optional styling.
 +
 
 +
Note that it uses a <code>&lt;span&gt;</code> tag instead of the <code>&lt;code&gt;</code> tags
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 16: Line 18:
 
| Optional styling, eg <code>color:#ffffff;</code> for white font
 
| Optional styling, eg <code>color:#ffffff;</code> for white font
 
|}
 
|}
</noinclude><code{{#if:{{{style|}}}|style="{{{style}}}"|}}>{{{1|}}}</code>
+
</noinclude><includeonly><span style="font-family: monospace,Courier;{{{style|}}}">{{{1|}}}</span></includeonly>

Revision as of 19:28, 16 October 2015

This is like the M template only for code instead, adds a code block with optional styling.

Note that it uses a <span> tag instead of the <code> tags

Attribute Default Comment
1 (empty string) This is the code to show
style (empty string) Optional styling, eg color:#ffffff; for white font