Help:Ignoring Formatting
You don't need to be Editor-In-Chief to add or edit content to WikiDoc. You can begin to add to or edit text on this WikiDoc page by clicking on the edit button at the top of this page. Next enter or edit the information that you would like to appear here. Once you are done editing, scroll down and click the Save page button at the bottom of the page.
Overview
Sometimes there is value in displaying the underlying code so that others can learn how to edit pages.
This is called ignoring formatting.
There are 3 ways to ignore the formatting:
- Surrond the text with the words <nowiki> text </nowiki>
- Put a space in front of the text
- Use the editing toolbox to highlight the words and use the 9th button from the left (a w with a red line through it
Using <nowiki> Tags
Wiki formatting can be ignored by using the <nowiki> and </nowiki> tags. This is particularly handy when writing tutorials on how to use wikimarkup and templates. Examples of the former use can be seen throughout the Editing Help Area. The quick button for inserting non-wikiformatted text is above the edit box, third button from the right.
Here is an example of a normal wiki table that has simply been surrounded by the <nowiki> tags:
{| border="1" |- |bgcolor="#cccccc"|Look at me! I'm a naked table! |}
(Note: normally, any excerpt of code should really be surrounded with the <code> tags, the <pre> tags, or with leading spaces to match W3C convention. The above example was not due to it being a literal representation of what a naked table would look like.)
When you click on "edit", the above looks like this:
<nowiki>
{| border="1"
|-
|bgcolor="#cccccc"| Look at me! I'm a naked table!
|}
</nowiki>
Without the <nowiki> tags, the above wikimarkup will normally produce a bordered table with a grey background color:
| Look at me! I'm a naked table! |
It should be noted that many people are using a leading space in combination with the <nowiki> tags. This is inefficient. The <pre> tags should be used instead.
Using <pre> Tags
Note that even surrounded by <nowiki> tags, the output text for the table still got mushed onto one line. By default, the wiki ignores line breaks and repeated whitespace. In order to preserve your original line breaks and tabs, you need to use tags to inform the wiki that your material is pre-formatted. If you surround your poem with <pre> and </pre>, the wiki will respect your use of whitespace.
Using the <pre> tag stops the wiki from altering the layout (line breaks and whitespace). In addition, the <pre> tag blocks wiki markup. The <pre> tag will also place your text inside a grey box with a dashed blue outline.
For example, the following code in the edit window:
<pre>
You smash at the barricade. It creaks.
... and again.
... and again.
... and again.
... and again.
You are out of IP hits.
</pre>
comes out as:
You smash at the barricade. It creaks.
... and again.
... and again.
... and again.
... and again.
You are out of IP hits.
Markup symbols and links contained inside the <pre> tags are ignored -- the code inside the blue-dashed box below looks exactly like the same as it appears in the edit window:
'''Markup symbols''' and [[Main Page|links]] <u>contained</u>
inside a pre-formatted box using the <pre> tags
are <br /> ... completely ignored.
Using Leading Space
In order to preserve line breaks and whitespace while still using wiki markup, put a space in front of each line of the block of text. Any series of one or more lines that each begin with a space will be placed inside a blue-dashed box. The layout and whitespace seen in the editing window will be preserved, while all the wiki markup (such as bold, italics, signatures, and links) will be interpreted normally.
For example, the following code in the edit window:
This line doesn't have leading space. Whitespace is ignored.
This line does have leading space. Whitespace is preserved.
The following lines ''(including the next one)'' begin with a space.
Text can be '''''formatted''''' and you
can have [[Main Page|links]]. (Last changed: ~~~~~)
will produce:
This line doesn't have leading space. Whitespace is ignored.
This line does have leading space. Whitespace is preserved.
The following lines (including the next one) begin with a space.
Text can be formatted and you
can have links. (Last changed: 19:11, 14 April 2006 (BST))
| ||||
Acknowledgement and Attribution Regarding Sources of Content
Some of the initial content on this page may be incorporated in part from copyleft sources in the public domain including wikis such as Wikipedia and AskDrWiki. Drug information for patients came from the The National Library of Medicine. Infectious disease information may have come from the Centers for Disease Control (CDC). Differential Diagnoses are drawn from clinicians as well as an amalgamation of 3 sources: 1.The Disease Database; 2. Kahan, Scott, Smith, Ellen G. In A Page: Signs and Symptoms. Malden, Massachusetts: Blackwell Publishing, 2004:3; 3. Sailer, Christian, Wasner, Susanne. Differential Diagnosis Pocket. Hermosa Beach, CA: Borm Bruckmeir Publishing LLC, 2002:7 .

