Editing Help:Tables

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
{{PD Help Page}}
 
 
 
Tables may be authored in wiki pages using either HTML table elements directly, or using wikicode formatting to define the table. HTML table elements and their use are well described on various web pages and will not be discussed here. The benefit of wikicode is that the table is constructed of character symbols which tend to make it easier to perceive the table structure in the article editing view compared to HTML table elements.
 
Tables may be authored in wiki pages using either HTML table elements directly, or using wikicode formatting to define the table. HTML table elements and their use are well described on various web pages and will not be discussed here. The benefit of wikicode is that the table is constructed of character symbols which tend to make it easier to perceive the table structure in the article editing view compared to HTML table elements.
  
Line 7: Line 5:
 
== Wiki table markup summary ==
 
== Wiki table markup summary ==
  
{|cellpadding="5" cellspacing="0" border="1" width="600"
+
{|cellpadding="5" cellspacing="0" border="1"
 
|<nowiki>{|</nowiki> || start '''table'''
 
|<nowiki>{|</nowiki> || start '''table'''
 
|-
 
|-
Line 56: Line 54:
 
</pre>
 
</pre>
 
|}
 
|}
 
 
===Alternative===
 
===Alternative===
 
For more table-ish looking wiki markup cells can be listed on one line separated by ||. This does not scale well for longer cell content such as paragraphs. It works well for short bits of content however, such as our example table.
 
For more table-ish looking wiki markup cells can be listed on one line separated by ||. This does not scale well for longer cell content such as paragraphs. It works well for short bits of content however, such as our example table.
  
Extra spaces within cells in the wiki markup can be added, as I have done in the wiki markup below, to make the wiki markup itself look better but they do not affect the actual table rendering.
+
Extra spaces within cells in the wiki markup can be added, as I have done in the wiki markup below, to make the wiki markup itself look better but they do not effect the actual table rendering.
  
HTML attributes can be added to tables on this page but have been left out of the following example for simplicity.
+
HTML attributes can be added to this table following the examples in other tables on this page but have been left out of the following example for simplicity.
 
{| width="100%"
 
{| width="100%"
 
|width="50%"|
 
|width="50%"|
Line 113: Line 110:
 
</pre>
 
</pre>
 
|}
 
|}
 
 
====align="center" border="1"====
 
====align="center" border="1"====
 
{| width="100%"
 
{| width="100%"
Line 142: Line 138:
 
|}
 
|}
  
====Attributes on cells ====
+
====align="right" border="1"====
 
You can put attributes on individual '''cells.''' Numbers for example may look better aligned right
 
You can put attributes on individual '''cells.''' Numbers for example may look better aligned right
 
{| width="100%"
 
{| width="100%"
Line 177: Line 173:
 
|}
 
|}
  
====Attributes on rows====
+
 
 
You can put attributes on individual '''rows,''' too.
 
You can put attributes on individual '''rows,''' too.
 
{| width="100%"
 
{| width="100%"
Line 239: Line 235:
 
</pre>
 
</pre>
 
|}
 
|}
 
 
====cellpadding="20" cellspacing="0" border="1"====
 
====cellpadding="20" cellspacing="0" border="1"====
 
{| width="100%"
 
{| width="100%"
Line 267: Line 262:
 
</pre>
 
</pre>
 
|}
 
|}
 
''Note: This cellpadding example is not currently working properly on mediawiki.org  It is supposed to look like [http://test.wikipedia.org/wiki/Table_test this]''
 
  
 
===With HTML attributes and CSS styles===
 
===With HTML attributes and CSS styles===
Line 338: Line 331:
 
</pre>
 
</pre>
 
|}
 
|}
 
 
====Colspan="2"====
 
====Colspan="2"====
 
{| width="100%"
 
{| width="100%"
Line 532: Line 524:
 
|width="50%"|
 
|width="50%"|
 
<pre>
 
<pre>
{| border="3" cellpadding="20" cellspacing="0"
+
{| border="1" cellpadding="20" cellspacing="0"
 
|colspan="2"|
 
|colspan="2"|
 
===Yummiest===
 
===Yummiest===
Line 548: Line 540:
 
|}
 
|}
  
==Caveat==
+
==Special Tables==
===Negative numbers===
+
===Property tables===
Negative value minus sign can break your table (it may display missing some values) if you start a cell on a new line with a negative number or a parameter that evaluates to a negative number (|-6) because that is the wiki markup for table row, not table cell. To avoid this, insert a space before the value (| -6) or use in-line cell markup (||-6).
+
Property tables, are a special type of table. They are always two columns wide. The left most column is the property and the right is the description. They are very easy to construct, using a very simple coding. This is not a standard mediawiki construct, but is provided by an extension.
  
==External links==
+
<properties>
{{meta|Help:Table}}
+
position=defines the center of the box in X and Y and the bottom of the box in Z.
 +
rotation=defines a rotation around the Z axis for the box, in degrees.
 +
size=defines the distance from the center to the side of the box in X and Y, and the total height of the box in Z.
 +
matref=reference to a predefined [[material]].
 +
phydrv=reference to a predefined [[physics|physics driver]].
 +
</properties>
 +
<pre>
 +
<properties>
 +
position=defines the center of the box in X and Y and the bottom of the box in Z.
 +
rotation=defines a rotation around the Z axis for the box, in degrees.
 +
size=defines the distance from the center to the side of the box in X and Y, and the total height of the box in Z.
 +
matref=reference to a predefined [[material]].
 +
phydrv=reference to a predefined [[physics|physics driver]].
 +
</properties>
 +
</pre>
  
{{Languages|Help:Tables}}
 
 
[[Category:Help|Tables]]
 
[[Category:Help|Tables]]
[[Category:Tables]]
 

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)