BlockMarkup-Talk
This is a talk page for improving BlockMarkup.
Block marking
>>X Y<<
is a shortcut for "(:div:)%div X Y apply=div%
" [1].
A block can be marked as follows
>>wiki style<<
>>change in wiki style<<
>><<
and continues until the wiki 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:)
(:div2:) %div rframe% How do I use rframe in a block? (:div2end:) [[<<]] (:div class="rfloat frame":) How do I use rframe in a block? (:divend:) | How do I use rframe in a block?
How do I use rframe in a block? |
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
|
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 |
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 |
Use [[<<]]
to force a line break that will clear floating elements.
Use [[<<]] to force a line break that will clear floating elements. | Use |
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.
Headings in summary
The detail's summary allows heading content, but !! etc do not appear to work. Is it possible to permit headings in the detail summary in PmWiki?
Not at this point, see PmWiki philosophy #2 "PmWiki doesn't make any attempt to do everything that can be done in HTML." --Petko June 23, 2020, at 11:11 AM
Is BlockMarkups finalized, DocumentationIndex does not have a link to it ?
VKrishn
This is a talk page for improving PmWiki.BlockMarkup.