<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://turingcomplete.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ATruthtable%2FDocumentation</id>
	<title>Template:Truthtable/Documentation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://turingcomplete.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ATruthtable%2FDocumentation"/>
	<link rel="alternate" type="text/html" href="http://turingcomplete.wiki/w/index.php?title=Template:Truthtable/Documentation&amp;action=history"/>
	<updated>2026-04-25T12:21:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>http://turingcomplete.wiki/w/index.php?title=Template:Truthtable/Documentation&amp;diff=2178&amp;oldid=prev</id>
		<title>Gelthor: Created page with &quot;Template to put at the top of table declarations to standardise the appearance of truth tables. By default it will place the table &quot;floating&quot; on the left hand side. If you want the table to apear on the right side then use: &lt;nowiki&gt;{{truthtable|float=right}}&lt;/nowiki&gt;. If you want the table to fill the whole width of the page, call the template as follows: &lt;nowiki&gt;{{truthtable|wide=1}}&lt;/nowiki&gt;. Additionally, you can mark the table as sortable (i.e. if it&#039;s a table of sor...&quot;</title>
		<link rel="alternate" type="text/html" href="http://turingcomplete.wiki/w/index.php?title=Template:Truthtable/Documentation&amp;diff=2178&amp;oldid=prev"/>
		<updated>2023-11-01T13:02:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Template to put at the top of table declarations to standardise the appearance of truth tables. By default it will place the table &amp;quot;floating&amp;quot; on the left hand side. If you want the table to apear on the right side then use: &amp;lt;nowiki&amp;gt;{{truthtable|float=right}}&amp;lt;/nowiki&amp;gt;. If you want the table to fill the whole width of the page, call the template as follows: &amp;lt;nowiki&amp;gt;{{truthtable|wide=1}}&amp;lt;/nowiki&amp;gt;. Additionally, you can mark the table as sortable (i.e. if it&amp;#039;s a table of sor...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Template to put at the top of table declarations to standardise the appearance of truth tables.&lt;br /&gt;
By default it will place the table &amp;quot;floating&amp;quot; on the left hand side. If you want the table to apear on the right side then use: &amp;lt;nowiki&amp;gt;{{truthtable|float=right}}&amp;lt;/nowiki&amp;gt;. If you want the table to fill the whole width of the page, call the template as follows: &amp;lt;nowiki&amp;gt;{{truthtable|wide=1}}&amp;lt;/nowiki&amp;gt;. Additionally, you can mark the table as sortable (i.e. if it&amp;#039;s a table of sortable values, such as {{t|yes}} or {{t|no}}), by using the &amp;quot;sortable&amp;quot; parameter: &amp;lt;nowiki&amp;gt;{{truthtable|sortable=1}}&amp;lt;/nowiki&amp;gt;. Text can be left-aligned in the table using &amp;lt;nowiki&amp;gt;{{truthtable|text left=1}}&amp;lt;/nowiki&amp;gt;. Finally, extra styling can be added using the &amp;quot;style&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Using the &amp;quot;wide&amp;quot; parameter is discouraged for normal situations: Truth tables should be left- or right-floated if that makes things look better.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;wide&amp;#039;&amp;#039;&amp;#039;: If a value is given (1, 0 or anything) it will make the table stretch to fit the area it is contained in.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;sortable&amp;#039;&amp;#039;&amp;#039;: If a value is given, it allows columns to be sorted by clicking on the little icon within the header cell at the top of the column.&lt;br /&gt;
**To change individual columns to be unsortable (for instance for images), use the &amp;quot;unsortable&amp;quot; class on the header cell.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;text left&amp;#039;&amp;#039;&amp;#039;: If a value is given, text will be left-aligned, otherwise centre-aligned by default.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;float&amp;#039;&amp;#039;&amp;#039;: A side on which to float the table (&amp;quot;left&amp;quot;, &amp;quot;right&amp;quot; and &amp;quot;none&amp;quot; are the allowed values). If neither &amp;quot;float&amp;quot; nor &amp;quot;wide&amp;quot; are given &amp;quot;left&amp;quot; is the default.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;style&amp;#039;&amp;#039;&amp;#039;: Additional style values are allowed; usage is simply the CSS values &amp;#039;&amp;#039;not&amp;#039;&amp;#039; surrounded by quotes.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;class&amp;#039;&amp;#039;&amp;#039;: Additional CSS class names (separated by spaces) to apply to the table.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Not Wide===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{| {{truthtable}}&lt;br /&gt;
! Input One !! Input Two !! Output&lt;br /&gt;
|-&lt;br /&gt;
| {{No}}|| {{No}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{No}}|| {{Yes}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Yes}}|| {{No}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Yes}}|| {{Yes}}|| {{No}}&lt;br /&gt;
|}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| {{truthtable}}&lt;br /&gt;
! Input One !! Input Two !! Output&lt;br /&gt;
|-&lt;br /&gt;
| {{No}}|| {{No}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{No}}|| {{Yes}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Yes}}|| {{No}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Yes}}|| {{Yes}}|| {{No}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Wide===&lt;br /&gt;
&amp;lt;pre&amp;gt;{| {{truthtable|wide=1}}&lt;br /&gt;
! Input One !! Input Two !! Output&lt;br /&gt;
|-&lt;br /&gt;
| {{No}}|| {{No}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{No}}|| {{Yes}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Yes}}|| {{No}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Yes}}|| {{Yes}}|| {{No}}&lt;br /&gt;
|}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| {{truthtable|wide=1}}&lt;br /&gt;
! Input One !! Input Two !! Output&lt;br /&gt;
|-&lt;br /&gt;
| {{No}}|| {{No}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{No}}|| {{Yes}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Yes}}|| {{No}}|| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Yes}}|| {{Yes}}|| {{No}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Symbols===&lt;br /&gt;
&amp;lt;pre&amp;gt;{| {{truthtable}}&lt;br /&gt;
! A !! NOT(A)&lt;br /&gt;
|-&lt;br /&gt;
| {{Off}} || {{On}}&lt;br /&gt;
|-&lt;br /&gt;
| {{On}} || {{Off}}&lt;br /&gt;
|}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| {{truthtable}}&lt;br /&gt;
! A !! NOT(A)&lt;br /&gt;
|-&lt;br /&gt;
| {{Off}} || {{On}}&lt;br /&gt;
|-&lt;br /&gt;
| {{On}} || {{Off}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Full example===&lt;br /&gt;
&amp;lt;pre&amp;gt;{| {{truthtable|float=right|sortable=1|text left=1|style=font-size:1.5em}}&lt;br /&gt;
|+ NAND Gate Truth Table&lt;br /&gt;
! Input One !! Input Two !! class=&amp;quot;unsortable&amp;quot; | Output&lt;br /&gt;
|-&lt;br /&gt;
|data-sort-value=&amp;quot;0&amp;quot;| {{off}}|| data-sort-value=&amp;quot;0&amp;quot;| {{off}}  || {{on}} &lt;br /&gt;
|-&lt;br /&gt;
|data-sort-value=&amp;quot;0&amp;quot;| {{off}}|| data-sort-value=&amp;quot;1&amp;quot;| {{on}}  || {{on}} &lt;br /&gt;
|-&lt;br /&gt;
|data-sort-value=&amp;quot;1&amp;quot;| {{on}} || data-sort-value=&amp;quot;0&amp;quot;| {{off}} || {{on}} &lt;br /&gt;
|-&lt;br /&gt;
|data-sort-value=&amp;quot;1&amp;quot;| {{on}} || data-sort-value=&amp;quot;1&amp;quot;|  {{on}}  || {{off}}&lt;br /&gt;
|}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| {{truthtable|float=right|sortable=1|text left=1|style=font-size:1.5em}}&lt;br /&gt;
|+ NAND Gate Truth Table&lt;br /&gt;
! Input One !! Input Two !! class=&amp;quot;unsortable&amp;quot; | Output&lt;br /&gt;
|-&lt;br /&gt;
|data-sort-value=&amp;quot;0&amp;quot;| {{off}}|| data-sort-value=&amp;quot;0&amp;quot;| {{off}}  || {{on}} &lt;br /&gt;
|-&lt;br /&gt;
|data-sort-value=&amp;quot;0&amp;quot;| {{off}}|| data-sort-value=&amp;quot;1&amp;quot;| {{on}}  || {{on}} &lt;br /&gt;
|-&lt;br /&gt;
|data-sort-value=&amp;quot;1&amp;quot;| {{on}} || data-sort-value=&amp;quot;0&amp;quot;| {{off}} || {{on}} &lt;br /&gt;
|-&lt;br /&gt;
|data-sort-value=&amp;quot;1&amp;quot;| {{on}} || data-sort-value=&amp;quot;1&amp;quot;|  {{on}}  || {{off}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Template documentation|P]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gelthor</name></author>
	</entry>
</feed>