NAME
Text::Amuse::Output::Image -- class to manage images
SYNOPSIS
The module is used internally by Text::Amuse, so everything here is pretty much internal only (and underdocumented).
METHODS/ACCESSORS
new(filename => "hello.png", width => 50, wrap => 'l')
Constructor. Accepts three options: filename
, width
, as a integer in percent, and wrap
, as a string denoting the position. filename
is mandatory.
These arguments are saved in the objects and can be accessed with:
- filename
- width
- wrap
-
If 'l', the 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 serie of images without text.
- fmt
- desc
-
Please note that we concatenate the caption as is. It's up to the caller to pass an escaped string.
Formatters
- width_html
-
Width in percent
- width_latex
-
Width as '0.25\textwidth'
METHODS
- as_latex
-
The LaTeX code for the image. Right and left floats uses the wrapfigure packages. To full page floats a \clearpage is appended.
- as_html
-
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; }
- output
-
Given that we know the format, just return the right one, using
as_html
oras_latex
.