Borders, width, and alignment of blocks
Note
For information on how to work with formatting blocks in the new editor, see Formatting text.
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.
For text blocks with special formatting, you can add frames, adjust the width of a block and its position relative to the edges of the page. To do this, add additional parameters to the block markup.
Ready-made formatting templates
Use the wrapper
parameter to apply one of the block formatting templates. The main text of the page will flow around the block.
Parameter | Description |
---|---|
box |
A block in a green frame located on the right edge of the page. |
shade |
A block in a green frame located on the left edge of the page. |
text |
A block without a frame with right-aligned text. You can set up text alignment using the align parameter. |
page |
A block without a frame located on the left edge of the page. |
Tip
Example:
%%(wacko wrapper=box)
Text inside the block
%%
Setting up alignment
Use the align
parameter to adjust the position of a block on the page.
Along with the wrapper=text
parameter, the align
parameter allows you to adjust the alignment of text inside the block.
Parameter | Description |
---|---|
right |
Right-aligned. |
left |
Left-aligned. |
center |
Centered. This value is only valid in combination with the wrapper=text parameter. |
Example:
%%(css align=right)
.d { font-size:70% }
%%
Setting up the width of a block
Use the width
parameter to adjust the block width in pixels.
Example:
%%(css wrapper=box width=400)
.d { font-size:70% }
%%
Setting up the border of a block
Use the border
parameter to adjust the border around a block.
border="<thickness_in_pixels> <line_type> <line_color>"
Parameter | Description |
---|---|
Line types | |
solid |
Solid line. |
dashed |
Dashed line. |
Colors | |
red |
Red. |
green |
Green. |
blue |
Blue. |
grey |
Grey. |
yellow |
Yellow. |
Example:
%%(math wrapper=shade border="2px dashed red") X^{a+b}_{i-j} %%
Examples
Markup | Result |
---|---|
%%(wacko wrapper=text align=center) text centered %% |
![]() |
%%(wacko wrapper=page width=200) This text can't be wider than 200 pixels. %% |
![]() |
%%(wacko wrapper=box align=left width=170 border="5px dashed red") Text inside the block %% This text will wrap around the block. This text will wrap around the block. |
![]() |
%%(javascript nomark wrapper=box border="5px dashed red") alert("horay!"); %% |
![]() |
%%(css wrapper=shade) .d2 { font-size:70% } %% |
![]() |