Access Keys:
Skip to content (Access Key - 0)

Q: How do I add code and noformat boxes to articles?

Answer

Code and noformat boxes are specified by wiki markup. Simply put the {code} or {noformat} markup tag on each side of the text you want included in the box. In the examples below you can see the wiki markup and the resulting box it creates. The {noformat} style displays the text exactly as you enter it in a mono-spaced font. The {code} tag automatically formats code and allows for additional formatting within the box.

Example {code} wiki markup:

{code} 
 #include <stdio.h>
 int main()
 {
        printf("hello, world");
        return 0;
 }
{code}

Resulting {code} box:

Example {noformat} wiki markup:
Note: The extra box within the panel is an artifact of displaying the noformat tag in an example. You can safely ignore it.

{noformat}

athena% lpq -Pajax
  Printer: ajax@paper-pusher  'HP8000 W20-575'
  Queue: 3 printable jobs
  Server: pid 27313 active
  Unspooler: pid 27531 active
  Status: printing data file 'dfA995w20-575-16.mit.edu' at 13:23:24.071
  Filter_status: device = 'Ready Online' at 13:23:37.539
  Rank   Owner/ID                Class Job Files                 Size Time
  active joeuser@w20-575-16+995    A   995 abstract.PS           8069 12:20:22
  1      janeuser@w20-575-1+432    A   432 thesis.ps            17239 12:23:19
  2      bobuser@w20-575-3+782     A   782 21W.575.doc         173564 12:24:52

{noformat}

Resulting {noformat} box:

athena% lpq -Pajax
 Printer: ajax@paper-pusher  'HP8000 W20-575'
  Queue: 3 printable jobs
  Server: pid 27313 active
  Unspooler: pid 27531 active
  Status: printing data file 'dfA995w20-575-16.mit.edu' at 13:23:24.071
  Filter_status: device = 'Ready Online' at 13:23:37.539
  Rank   Owner/ID                Class Job Files                 Size Time
  active joeuser@w20-575-16+995    A   995 abstract.PS           8069 12:20:22
  1      janeuser@w20-575-1+432    A   432 thesis.ps            17239 12:23:19
  2      bobuser@w20-575-3+782     A   782 21W.575.doc         173564 12:24:52

The K.B. Handbook

Documentation and information about using The Knowledge Base


Last Modified:

March 09, 2012

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki