This is a feature that blahtex has which is very nice, and was suggested from https://www.mediawiki.org/wiki/Requests_for_comment/Reduce_math_rendering_preferences as something that should help make 'always render' a more acceptable default.
dvipng has --height and --depth options which can be used to figure out where the text baseline in the image is. This can then be used in inline CSS to position the image relative to the actual text baseline, and should make things match up inline more often.
This should not be terribly hard to adapt, though will require some tweaks:
- drop dvips support, use dvipng exclusively
- include the parameters when texvc calls dvipng -- OR -- move dvipng call to PHP side
- capture the data and record it
- make use of it in rendering
Existing items should be invalidated so they won't conflict.
Version: unspecified
Severity: normal
URL: https://www.mediawiki.org/wiki/Requests_for_comment/Reduce_math_rendering_preferences#Issues_5706