Hi,
I use the following CSS to use the alt attribute defined for images as image captions:
The html code for the image is
The inline width property is ignored when the img.align-right:after block is active; i.e. the image is put into the document unscaled. The border itself is drawn according to the width property, though!
I quickly created to sample pngs (200x300 with 50by50 checkerboard b/w), one with resolution info, one without: The one with resolution is used unscaled, the other one is a bit smaller; probably at the default prince resolution (96dpi?).
I can workaround this setting prince-image-resolution, but that just a band-aid that's not feasible for documents with images that come in different sizes and are expected to fill different amounts of space on a page.
The same happens if I change the code to have the width in the CSS proper and/or try using relative widths.
I use the following CSS to use the alt attribute defined for images as image captions:
img.align-right {
border: 1pt solid black ;
margin-left: 1em ;
margin-top: 1em ;
margin-bottom: 1em ;
float: right ;
}
img.align-right:after {
font-size: 7pt ;
font-family: "FontinSans" ;
content: attr(alt) ;
text-align: center ;
float: none ;
}
The html code for the image is
<img align="right" alt="Some Image Caption" class="align-right" src="images/sample.png" style="width: 5cm;" />
The inline width property is ignored when the img.align-right:after block is active; i.e. the image is put into the document unscaled. The border itself is drawn according to the width property, though!
I quickly created to sample pngs (200x300 with 50by50 checkerboard b/w), one with resolution info, one without: The one with resolution is used unscaled, the other one is a bit smaller; probably at the default prince resolution (96dpi?).
I can workaround this setting prince-image-resolution, but that just a band-aid that's not feasible for documents with images that come in different sizes and are expected to fill different amounts of space on a page.
The same happens if I change the code to have the width in the CSS proper and/or try using relative widths.