Text::Amuse::Output::Image -- class to manage images
The module is used internally by Text::Amuse, so everything here is pretty much internal only (and underdocumented).
Constructor. Accepts three options: filename, width, as a integer in percent, and wrap, as a string denoting the position. filename is mandatory.
filename
width
wrap
These arguments are saved in the objects and can be accessed with:
If 'l', the float will wrap on the left, if 'r' will wrap on the right, if 'f' it's not floating, but it's intended as fullpage (will insert a clearpage after the image). This is handy if there is some long series of images without text.
Please note that we concatenate the caption as is. It's up to the caller to pass an escaped string.
Width in percent
Width as '0.25\textwidth'
The LaTeX code for the image. Right and left floats uses the wrapfigure packages. To full page floats a \clearpage is appended.
The HTML code for the image. Classes used:
img.embedimg { margin: 1em; } div.image, div.float_image_f { margin: 1em; text-align: center; padding: 3px; background-color: white; } div.float_image_r { float: right; } div.float_image_l { float: left; } div.float_image_f { clear: both; margin-left: auto; margin-right: auto; }
Given that we know the format, just return the right one, using as_html or as_latex.
as_html
as_latex
To install Text::Amuse, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Amuse
CPAN shell
perl -MCPAN -e shell install Text::Amuse
For more information on module installation, please visit the detailed CPAN module installation guide.