From the WikiPublisher

Tip of the Week: 00013

Images: How Wikipublisher processes images

What factors affect the way Wikipublisher processes images in Web pages when these are typeset for print?


A printer’s ornament

Behind the scenes, we go to great lengths so that, in general, images “just work”. When preparing an image for printing, Wikipublisher has to consider a number of inter-related things:

Image processing has 3 stages:

  1. the author sets any special handling requirements
    1. provide links to separate high resolution images, with small thumbnails so the Web page loads quickly
    2. use the imagesize option to allow wide images to rotate, use side captions, or make all images smaller
    3. use the floathere option to try to place images at the point they are mentioned1
  2. Wikipublisher works out how big to make each image, taking account of the paper size, image aspect ratio (height to width), special handling instructions such as deciding whether to rotate the image, and swapping out any thumbnails for their high resolution replacements
  3. LATEX processes the images according to the instructions received from Wikipublisher
    1. shrink large images to the designated size; this is how we get sharp printed images — start with a large image and shrink it
    2. rotate any wide images through 90°, if that option is set
    3. float images to where they best fit; text automatically flows back to fill the vacated white space

If the image has a left or right float style (or imagesize=sidecaps), we place the caption beside the image, making sure the image takes up no more than 60% of the text width (the Golden Ratio [1]). The image is printed with the caption on the inside margin. Otherwise, for non-floating image styles, captions print below the image. Figures with captions are numbered automatically. If no caption is specified, it uses the image alt text — we assume authors know that is it good practice to specify alt text for all images.

To implement high resolution image substitution, Wikipublisher re-interprets the [[text or image1 -> image2]] link markup. If it finds markup in this form, it uses image2 for the print version of the page. If image1 has alt text, it transfers this to image2.

Several people have asked for a way to fix an image “here” and flow text around it. There is no easy way to do this. By fixing an image in place, we have to trust the author to verify that the image is not, for example, too close to the bottom of the page on which it prints. But the same wiki page can be printed on its own, as part of one or more trails, or as part of a search result. It can also be printed with any of 3 paper sizes. So an author cannot know whether the image will fit where she specifies. It gets worse. If we fix an image “here”, it is possible that an image defined above it will float past it, and the figure numbers will be out of sequence.

 

1 This is a new feature; by default, images float to the bottom of the current page, the top of the next page, or to a separate float page. (↑)

Category: typography

Copyright © 2005–2023 the Wikipublisher wiki and its authors

Links

  1. en.wikipedia.org/wiki/Golden_ratio

Retrieved from http://www.wikipublisher.org/wiki/TipOfTheWeek/00013

Page last modified on 21 February 2008 at 07:45 PM