Recent Changes - Search:

PmWiki

pmwiki.org

BlockMarkup-Talk

This is a talk page for improving BlockMarkup.


This page covers all the block markup character combinations and related markup, eg wraps, joins, and breaks. If you are new to wiki markup, visit Edit Getting Started first.

While this documentation can be found elsewhere, eg the markup master index it is preserved here as a single point of reference.

Block marking

>>X Y<< is a shortcut for "(:div:)%div X Y apply=div%" [1].

A block can be marked as follows

>>change in wiki style<<
>><<

and continues until the style changes or empty brackets are encountered. A block cannot be nested using this markup, but a block can contain a table or the following markup

A block can be marked as follows

(:div class="c1 c2" style="atr1:z;atr2:y;":)
(:divend:)

Blocks can be nested by naming (with numbers) the blocks, viz

(:div5 class="c1 c2" style="atr1:z;atr2:y;":)
(:div2 class="c1 c2" style="atr1:z;atr2:y;":)
(:div2end:)
(:div5end:)

A block can also be a table.

Text wraps, joins and breaks

Text on two lines in a row will wrap and fill as needed (the normal HTML behavior).

Text on two lines in a row
will wrap and fill as needed
(the normal HTML behavior).

Text on two lines in a row will wrap and fill as needed (the normal HTML behavior).

To turn off automatic text filling, use the (:linebreaks:) directive above the paragraph.

(:linebreaks:)
Text on two lines in a row
will wrap and fill as needed
(the normal HTML behavior).
(:nolinebreaks:)

Text on two lines in a row
will wrap and fill as needed
(the normal HTML behavior).

Use \ (backslash) at the end of a line to join the current line to the next one.

Use \ (backslash) at the end of a line \
to join the current line to the next one.

Use \ (backslash) at the end of a line to join the current line to the next one.

Use \\ (2 backslashes) at the end of a line to force a line break.

Use \\ (2 backslashes) at the end of a line \\
to force a line break.

Use \\ (2 backslashes) at the end of a line
to force a line break.

Use \\\ (3 backslashes) at the end of a line to force 2 line breaks.

Use \\\ (3 backslashes) at the end of a line \\\
to force 2 line breaks.

Use \\\ (3 backslashes) at the end of a line

to force 2 line breaks.

Use [[<<]] to force a line break that will clear floating elements.

Use [[<<]] to force a line break that will clear floating elements.

Use
to force a line break that will clear floating elements.

Preformatted blocks

The [= and =] markup can be applied to multiple input lines, including empty lines. This makes it useful for displaying lines of code, which will be shown as monospaced font and not interpreted by PmWiki. Just leave an empty space in front of the opening [=, and finish with a closing =]. If there are [=...=] pairs in the code, put a =][= after each =]. For example:

[=
Code goes here like [[PmWiki.PmWiki]]
$CurrentTime $[by] $AuthorLink:  [=$ChangeSummary=]=][='; #just some code
=]
 
Code goes here like [[PmWiki.PmWiki]]
$CurrentTime $[by] $AuthorLink:  [=$ChangeSummary=]'; #just some code

The same effect can be achieved using the [@...@] syntax; in this case you don't need a leading space or the extra =][= markup.

[@
Code goes here like [[PmWiki.PmWiki]]
$CurrentTime $[by] $AuthorLink:  [=$ChangeSummary=]'; #just some code
@]
Code goes here like [[PmWiki.PmWiki]]
$CurrentTime $[by] $AuthorLink:  [=$ChangeSummary=]'; #just some code

It is also possible to use [= ... =] within other wiki structures, which enables the inclusion of new lines in text values. The example below shows how to include a multi-line value in a hidden form field.

(:input hidden message "[=Line1
Line2=]":)

The "pre" style can also be applied

>>pre<<
This style preserves white    space, and
[[(Wikipedia:)newline]]s.
>><<

This style preserves white space, and newlines.

Note that it does not cause the text to be displayed in a monospaced font.

See also

More advanced formatting can be achieved with wiki styles and page directives.

This is a talk page for improving PmWiki.BlockMarkup.

Edit - History - Print - Recent Changes - Search
Page last modified on August 30, 2014, at 09:17 AM