Module:Pseudo image/doc

This module is supposed to take all the normal File:/Image: parameters from the call to a parent template (though it will might use its own args in preference for debug purposes) and return them back one by one for use by a template. Most important, it figures out by a process of elimination which of these is the caption.

Usage
This is designed to be used with a template like Template:Pseudo image which receives the parameters that used to go to a File: or Image: thumbnail. For example,



is replaced in the template by

The current division of labor in the process is that the Template:Pseudo image accepts this call, and outputs the graphics, while this module is limited to sorting out the parameters. Therefore, calls to the module itself accept an extra parameter query=(field name) and return the desired field for use within the template. The field names presently supported are:


 * thumb - returns the value "yes" if there a |thumb| or |thumbnail| is given.
 * frame - returns "yes" if there is a |frame|
 * px - returns the horizontal pixel size ### if there is a |###px| or |###x##px|
 * xpx - returns the vertical pixel size ### if there is a |##x###px| or |x###px|
 * float - returns left, right, center, none if any one of these is present
 * vertical - returns baseline,middle,sub,super,text-top,text-bottom,top, or bottom if any of these is present
 * caption - returns the first field that isn't any one of the preceding. Note: as a convenience, it also ignores blank fields and picks a later nonblank field instead, though that shouldn't happen anyway.
 * If two different values are given for the same field (Pseudo image|thumb|left|right|center|, whichever comes later as they're listed above should dominate, but let's call it "undefined", i.e. don't do this. ;)
 * Note that this module ignores fields like alt=, link= etc. for determining the caption because they are not unlabeled fields, but should actually return the values if queried anyway. But there's no obvious reason not to use those as simply, etc. without #invoking anyway.