Blocks with special formatting

Warning

Specially formatted blocks work in both dynamic tables and pages built with the legacy editor.

Creating new pages in the legacy editor is no longer possible.

However, you can easily convert any existing pages from the legacy editor to the new editor format. For more information, see Switching a page to the new editor format.

You can use block formating to present text as a block with a specified formatting. For example, you can highlight syntax in the source code, add a fragment of boxed text, or set up the width and position of a block on your page.

Wiki also supports markup of mathematical formulas and special languages for visualizing diagrams.

To add a special formatting block to a page created in the old editor, use the following markup:

%%(<format> <parameters>)
A text fragment, software code, or data markup in a specified format
%%

For example:

%%(php width=300 border="2px solid red")
<?
phpinfo();
$s = "Hello, World!\n";
print $s;
%%

Block formatting

To add special formatting to your text, specify a value for the <format> field in the block's markup:

Format Description
wacko Plain text.
Programming language.
For example: C, Python, or Java
Code in the specified programming language. View the list of supported languages in Supported programming languages.
csv Data in CSV format.
math Mathematical formula using text markup.
Diagram type:
  • graphviz
  • blockdiag
  • seqdiag
Diagram in text markup.
comment Comments: Text that will not be displayed on your page.

Block parameters

The list of available parameters depends on the selected block format.

These parameters are supported for all formats: wrapper, align, width, and border. For parameter descriptions, see Borders, width, and alignment of blocks.

See also