%META:TOPICINFO{author="ProjectContributor" date="1284905286" format="1.1" version="1"}%
%META:TOPICPARENT{name="UsersGuide"}%
---+ Shorthand Basics
%TOC%

%STARTINCLUDE%
If you can enter text, you're ready for Foswiki. With a few simple rules, you'll be able to use plain text to create well-styled postings, instantly. What you are going to learn here is called <b>T</b>opic <b>M</b>arkup <b>L</b>anguage, or simply TML. So here comes a fast-track guide to shorthand basics:

---++ General text formatting

   * Separate each *paragraph* with a blank line.

   * To display a *bold type* word or phrase, use asterisks: =*bold type*=.

   * To display an _italic_ word or phrase, use underscores: =_italic_=.

   * To display __bold with italics__ word or phrase, use _double_ underscores: =__bold italic__=.

   * To display a word or phrase in =MONOSPACED TYPE=, use equal signs: =<nop>=like this==.

   * Use =<nop>=<nop>=double equal signs=== for bold: ==bold mono==.

   * To display colored text, enter:__ =%<nop>RED% red text %<nop>ENDCOLOR% and %<nop>GREEN% green text %<nop>ENDCOLOR%= to get %RED% red text %ENDCOLOR% and %GREEN% green text %ENDCOLOR%.
      * =%&lt;color&gt;%= text must end with =%<nop>ENDCOLOR%=. If you want to switch from one color to another one you first need to end the active color with =%<nop>ENDCOLOR%=, e.g. write =%<nop>RED% some text %<nop>ENDCOLOR% %<nop>GREEN% more text %<nop>ENDCOLOR%=.
      * DefaultPreferences defines some commonly used colors: *%YELLOW% %<nop>YELLOW%%ENDCOLOR%, %RED% %<nop>RED%%ENDCOLOR%, %PINK% %<nop>PINK%%ENDCOLOR%, %PURPLE% %<nop>PURPLE%%ENDCOLOR%, %TEAL% %<nop>TEAL%%ENDCOLOR%, %NAVY% %<nop>NAVY%%ENDCOLOR%, %BLUE% %<nop>BLUE%%ENDCOLOR%, %AQUA% %<nop>AQUA%%ENDCOLOR%, %LIME% %<nop>LIME%%ENDCOLOR%, %GREEN% %<nop>GREEN%%ENDCOLOR%, %OLIVE% %<nop>OLIVE%%ENDCOLOR%, %MAROON% %<nop>MAROON%%ENDCOLOR%, %BLACK% %<nop>BLACK%%ENDCOLOR%, %GRAY% %<nop>GRAY%%ENDCOLOR%, %SILVER% %<nop>SILVER%%ENDCOLOR%* and *%<nop>ENDCOLOR%*.

   * To display headings, type (from the beginning of a line) three dashes (-), from one to six plus signs (+), a space, and your heading text.
      * The quantity of plus signs is related to the size of the heading - the more plus signs you use, the smaller the heading.
      * You can insert a nested table of contents, generated from headings, by placing =%<nop>TOC%= wherever you like on a page (see [[%SYSTEMWEB%.Macros]] for more =%<nop>TOC%= options).

   * Use ==&lt;verbatim&gt;== to enclose code excerpts, filenames, and other unformatted text:<verbatim class="tml">
 <verbatim>
 unformatted text!
 and more of it!
 </verbatim></verbatim>

---+++ Working with special characters (advanced)
   * If you want to display angle brackets, enter them as HTML codes instead of typing them in directly:
      * =&amp;lt;= = =&lt;= %BR%
        =&amp;gt;= = =&gt;=
      * __You enter:__ =(a &amp;gt; 0)= %BR%
        __Result:__ =(a &gt; 0)=

   * Sometimes you will not see the =&= character and you need to escape it to see it as it is. The reason behind is that =&= has a special meaning in HTML - it starts so called character entities, like ='&amp;copy;'= which is the =&copy;= copyright character.
      * Type ='This &amp;amp; that'= to get ='This &amp; that'=.

---+++ Preventing [[Macros][Macro]]/variable expansion (advanced)
Place =&lt;nop&gt;= within a =%<nop>MACRO%= statement to prevent it from being expanded, as follows:
   * =%&lt;nop&gt;MACRO%=, result: %<nop>MACRO%

---+++ Working with =&lt;verbatim&gt;= (advanced)
Although text inside a =&lt;verbatim&gt;= block should be displayed exactly as it is typed (without being expanded), Foswiki does not necessarily ignore it. The following examples show TML that Foswiki will process inside a =&lt;verbatim&gt;= block:
<pre class="tml">&lt;verbatim&gt;
Example 1:
   &#42; Set VARIABLE = This variable may be used as normal, Eg. %<nop>VARIABLE%

Example 2:
%<nop>STARTSECTION{"section"}%
This section may be used as normal, Eg. %<nop>INCLUDE{"%TOPIC%" section="section"}%
%<nop>ENDSECTION{"section"}%

Example 3:
%<nop>TMPL:DEF{"template"}%
This template definition may be used as normal, Eg. %<nop>TMPL:P{"template"}%
%TMPL:END%
&lt;/verbatim&gt;</pre>

---++ Internal and external links

   * To link to another Wiki topic in the same web, type the WikiWord of that topic: =<nop>%HOMETOPIC%=.  Acronyms will also be linked if the topic exists. See ACRONYM.

   * To link to a Wiki topic in a different web, type the name of the web, and a dot, first: =%SANDBOXWEB%.<nop>%HOMETOPIC%=.

   * A Wiki topic that doesn't exist will appear highlighted, with question mark at the end, prompting you (or someone else) to start that topic by clicking the *?*: ExampleOfANewTopic (click the *?*, but don't save, to preserve the example!).

   * To create an external link, type the full URL: =http://foswiki.org/=.

   * To prevent a <nop>WikiWord from becoming a link, place =&lt;nop&gt;= or an exclamation mark (=!=) in front of the <nop>WikiWord: ==&lt;nop&gt;NoLinkPlease== or ==!NoLinkPlease==.

   * To escape the exclamation mark escape, try prefixing a =&lt;nop>=, e.g. write =A &lt;nop>!=<nop> B= to get "A <nop>!= B". Alternatively, use the HTML entity =&amp;#33;=, which renders as an exclamation mark, e.g. write =A &amp;#33;=<nop> B= to get "A &#33;= B".

---++ Bullet and numbered lists

   * To indent with a bullet, enter =[space][space][space][asterisk][space]=.
      * Use multiples of 3 spaces to *nest bullets*.
         * That's 3-6-9 spaces...

   * To create a numbered list:
      1 Start items in a *numbered list* with =[space][space][space][1][space]=.
      1 The "1" (or *any number*) will be replaced by a correct numbering order.
      1 To add a new paragraph without restarting list numbering, use the %<nop>BR% variable, like this:%BR% Text added (in a new paragraph)
      1 and the numbered list continues.

Always start *counting* spaces for bullets or numbers from the beginning of a new line.

---++ Others

   * To display an image in a topic, [[FileAttachment][attach it]] and type in edit mode: <br /> =%<nop>ATTACHURL%/yourimagefilename.jpg=

   * Three (or more) consecutive *hyphens* will create a horizontal rule:%BR% =---=

Follow GoodStyle recommendations when editing topics. In general, it is always nice to add one's signature at the end of a topic or comments. To add your signature, type =%USERSWEB%.YourName=, it will then expand to %WIKIUSERNAME%.

See EditingShorthand for the complete set of formatting rules.

%STOPINCLUDE%
__Related Topics:__ WikiWords, [[Macros]], EditingShorthand, FileAttachment
<!--%JQREQUIRE{"chili"}%-->
