1. Website for more info:

http://www.pmwiki.org/wiki/PmWiki/PmWiki

  1. To fix the title of the page as XXX , issue this command anywhere in the page:
    ( :title XXX :)
  2. To get a list of all the pages, do this (: pagelist :):
Click me to expand/hide
Note that there should be no space between (: and pagelist.
Sorting order for pagelist
  1. To hide or comment out a block of text, enclose between these two commands:
Click me to expand/hide
( :if false:)
...to be commented out...
( :ifend:)

Alternatively, hide the text inside a "comment" as in

( :comment This text will not show :).

But this is best for single-line text (but you can use line-continuation \ to extend it).
  1. To start a new line in the current local unit, type "\\".
    But to get an empty line, type "\\\".
    And to get a continuation line, type "\".

  2. Frames are very useful:
   
   >> frame <<
   This is enclosed in a frame!
   >><<

gives you this:

This is enclosed in a frame!

  1. Color fonts:

    Red Font is produced by typing "%red% Red Font%black%".
    But instead of "%black%", you could just type ""%%" to revert to previous font.
  2. Fancier fonts:
Click me to open/close
You could enter these font definitions at the beginning of your page:
% define= hilite bgcolor=#0ff%
% define= rediguana1 bgcolor=#ffffcc border='1px dotted red' padding=5px%

Now, if you type % hilite % xxx % , you will get: xxx .
Now, if you type % rediguana1 % xxx % , you will get: xxx (note the red dotted border).

Here are three more font definitions:
% define= Pm block bgcolor=#fdf% --Give the entire block a purple background
% define= goofy center bgcolor=#dfd border='3px dotted green'% --Center the entire block, give a 3 pixel dotted green border
% define= rediguana right bgcolor=#ffffcc border='1px dotted red' padding=5px% --Right justify block, with 1 pixel dotted red border
E.g.,

this is Pm

this is goofy

this is rediguana

  1. To indent, type - > (or - ->, - --> for more indentation) before the first word of paragraph.
    To exdent, type - < (or - -<, - --< for more exdentation)
  2. How to continue an enumerated list (e.g., above) that has been broken by something else (e.g., frame) ?
    Answer: Type # % item value=9 % for the enumeration to begin at 9.
    Of course, this has the inconvenience of remembering the number for restarting.
  3. Horizontal line: - - - - (four dashes)

  1. Emphasis and character formatting:
Click me to expand/collapse
Enclose text in doubled single-quotes (' 'text' ' => text),
i.e., two apostrophes, for emphasis (usually italics)
Enclose text in tripled single-quotes (' ' 'text' ' ' => text),
i.e., three apostrophes, for strong (usually bold)
Enclose text in five single-quotes (' ' ' ' 'text' ' ' ' '=> text),
or triples within doubles (five apostrophes)
for strong emphasis (usually bold italics)
Enclose text in doubled at-signs (@ @ text@ @=> text)
for monospace text
Use [ + large + ] for large text (or [ + + larger + + ]
for larger text
Use [ - small - ] for small for small text, and smaller for smaller.
Emphasis can be used multiple times within a line,
but cannot span across markup line boundaries (i.e., you can't put
a paragraph break in the middle of bold text).
italic and bold are available if enabled in config.php
  1. How to get embedded white spaces and new lines:
Click me to expand/collapse
[= ... =] will preserve white spaces because it is not interpreted by PmWiki, but paragraphs are reformatted.
[@ ... @] will preserve white spaces and multiple paragraphs.
Unfortunately, if you want white spaces in a table, the above devices do not work.
SOLUTION: type as many copies of &ensp; as needed (each gives a white space that is "en"-wide). IE does not support &ensp; and so IE gets served &nbsp; instead, plus an additional space to allow wrapping of lines.
  1. How to produce a table with thin (single line) borders.

    Type this

|| border = 1 bgcolor=#ccfffcc \
style="border-collapse:collapse" \
cellpadding="5" width=66%
||! Course Number: ||Data Structures, CSCI-UA.0102-00X (X=1,2,3) ||
||!  Instructor: ||Professor Chee  Yap, \\
    Room: WWH 301, Tel: 998-3115, Email: yap "at" cs.nyu.edu ||

and get this

Course Number:Data Structures, CSCI-UA.0102-00X (X=1,2,3)
Instructor:Professor Chee Yap,
Room: WWH 301, Tel: 998-3115, Email: yap "at" cs.nyu.edu
  1. Toggle/Untoggle (or how to open/close a paragraph)

Pattern Zero: Suppose you have some term which you want to associate with its definition.
You can do this by typing (on a new line)

: Some-Term : Definition of Some-Term

you will get this

Some-Term
Definition of Some-Term

Notice that the Definition of Some-term is indented on the next line after Some-Term.
This is nice. However, the definition is always displayed.

We would like to hide/expose this definition by clicking the term. What follows are several ways to do this.

Pattern One: If you type this (on a new line)

: Toggling-Term %toggle% : Hidden Definition of Toggling-Term :

You get this:

Toggling-Term
Hidden Definition of Toggling-Term :

NOTE: you must click on the Toggling-Term to expose/hide its definition.

Pattern Two: If you type this

   >>toggle<<
   Click here for more info.
   >>indent<<
   The div with class "indent" is the block right after the "toggle" switch,
   and it will be hidden or shown.

   It can contain several paragraphs, tables, images and other elements, but
   it is '''exactly''' the '''first''' element '''after''' the toggle block.
   >><<

you will get this:

Click here for more info.

The div with class "indent" is the block right after the "toggle" switch, and it will be hidden or shown.

It can contain several paragraphs, tables, images and other elements, but it is exactly the first element after the toggle block.

Pattern Three: if you type this

(:toggle hide box1 button=1:)
>>id=box1 border='1px solid #999' padding=5px bgcolor=#edf<<
The text in this section can be hidden/shown
>><<

you will get this:

The text in this section can be hidden/shown



As usual, you must click the box to show/hide the contents.

Pattern Four: This is called "dltoggle" (for FAQ's application).

If you type this

(:dltoggle:)
Definition list(s):
: term : definition
: term2 : definition2
Subheaders, etc.
: term1 : definition1
: term2 : def2
(:dltoggleend:)

then you get this:

Definition list(s):

term
definition
term2
definition2

Subheaders, etc.

term1
definition1
term2
def2

Go ahead: click on the terms to expose/hide the definitions!