<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.wikiworld.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ACode</id>
	<title>Template:Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.wikiworld.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ACode"/>
	<link rel="alternate" type="text/html" href="https://www.wikiworld.org/index.php?title=Template:Code&amp;action=history"/>
	<updated>2026-05-12T15:41:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://www.wikiworld.org/index.php?title=Template:Code&amp;diff=128&amp;oldid=prev</id>
		<title>JamesCrook: Template.</title>
		<link rel="alternate" type="text/html" href="https://www.wikiworld.org/index.php?title=Template:Code&amp;diff=128&amp;oldid=prev"/>
		<updated>2020-09-06T12:15:41Z</updated>

		<summary type="html">&lt;p&gt;Template.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;{{Intro|The '''''Code'' Template''' is intended to enclose '''lines or blocks of programming code, mathematical formulas, regular expressions''' and similar inside a thin box with pink text of slightly larger size than the rest of the page content. |}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The template provides a replacement for placing code inside &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; tags which produces an extremely faint pink background color:&lt;br /&gt;
:&amp;lt;code&amp;gt; this is not distinct enough &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This template also avoids the troublesome excessive line length that can result from the traditional Wiki method of showing code by adding a space in front of a line thus: &lt;br /&gt;
&lt;br /&gt;
 this is going to become far too long...&lt;br /&gt;
{{Hint|Wrapping code inside &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; tags may look better than using Template:Code if your code is inside a colored div such as provided by [[Template:Hint]] or [[Template:Advice]].}}&lt;br /&gt;
&lt;br /&gt;
Although part of the line length saving comes from a smaller character spacing, the text does wrap, so this template is not appropriate if the code you are representing depends on unbroken lines. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''NOTE:''''' This template should be used '''only for ''code, formulas, regular expressions and closely related content.''''' Other templates are available for other uses, see [[:Category:Templates]].''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Usage of [[Template:Code]]''':&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;code|''text to be formatted''&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, typing this: &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; {{code|$c: // (-%7)}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
will cause the following to be displayed:&lt;br /&gt;
&lt;br /&gt;
{{code|$c: // (-%7)}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Breaks and spaces:''' This template is a left-indented HTML table, so:&lt;br /&gt;
* text will automatically wrap round to the next line when it &amp;lt;br&amp;gt;reaches the end of the line. &lt;br /&gt;
* if you want to force a break in the text, use &amp;lt;nowiki&amp;gt;&amp;lt;BR&amp;gt;&amp;lt;/nowiki&amp;gt; in preference,&amp;lt;br&amp;gt; because entering a carriage return may give variable results.&amp;lt;br&amp;gt; A carriage return will enforce a new paragraph, so give a greater&amp;lt;br&amp;gt; space between lines than &amp;lt;nowiki&amp;gt;&amp;lt;BR&amp;gt;&amp;lt;/nowiki&amp;gt;, but further down the table &amp;lt;br&amp;gt; you may need to use two carriage returns to force a new paragraph. &lt;br /&gt;
* more than one space in the text will be ignored, so use the '''&amp;amp;amp;nbsp;'''&amp;lt;br&amp;gt; entity to force an extra space between characters.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''''IMPORTANT NOTE:''''' Wiki parsing issues mean that using some symbols inside a template &amp;quot;call&amp;quot; might cause your intended code to not display properly. The equals sign (=) is a known offender. If you have problems, enclose the text part of the call inside  &amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; tags. For example, to display this:&lt;br /&gt;
&lt;br /&gt;
{{code|&amp;lt;nowiki&amp;gt;$c = (%7) + (%4)&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
you need to type this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;code|&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;$c = (%7) + (%4)&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or alternatively if an equals sign is the problem, type &amp;quot;1=&amp;quot; (without quotes) after the pipe:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{code|1=$c = (%7) + (%4)}} &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Using [[Template:Code]] in bulleted or ordered lists:'''&lt;br /&gt;
&lt;br /&gt;
Optionally you can use:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;codelist|''text to be formatted''&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
instead of [[:Template:Code]] when inserting code in lists. Using the codelist template, the code will be indented a little further into the body of the page.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{|style=&amp;quot;margin-left:10px;line-height:1.1em;letter-spacing:-0.04em;background-color:#F4F4FE;font-family:monospace;font-size:1.1em;border:1px dashed black&amp;quot; cellpadding=&amp;quot;5px&amp;quot;&lt;br /&gt;
|{{{1}}}&lt;br /&gt;
|}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>JamesCrook</name></author>
		
	</entry>
</feed>