Program Float
A floating program can be created using the program environment.
- \begin{program}[label='pgm2'
- caption='This is the caption of the program.']
- Body of the program.
- \end{program}
\begin{program}[label=name
caption=text
style=cssname -> plain - to omit the label
note=text
width=#
align=left|right} -> Figure #. caption-text
. . .
\begin{caption}
Caption text.
\end{caption}
\end{program}
\begin{caption}
This is the caption of the program.
\end{caption}
The latter is used for more complex text that may contain wiki styles.
- label
-
Defines a reference label or name for the program. The label can be used with the \ref{label} command to create a reference link to the program.
- caption
-
The description or caption of the program. The text of this argument should be simple and not include any other plugin elements. If styling or plugin elements are needed, the caption environment can be used instead.
- style
-
The name of one or more block specific css class names for modifying the default style of the program. There are two styles currently defined, plain is used for omitting the Program label from the caption and flush is used to remove the top margin.
- note
-
Adds text to the image as a HTML comment which can be used to denote a copyright or other relevant information about the program.
- width
-
The horizontal size of the program block. By default, the program is the full width of the parent container.
- align
-
Whether the program box should be aligned left or right on the page. This argument is only useful if the width is also set. By default, the program is the full width of the parent container and thus, can not float left or right.