in this question a composite symbol "diamond plus" is requested for use with plain TeX.
a good-looking version was provided, but it works in only one size.
if the same symbol is needed for a title or a footnote (i.e., in a larger
or smaller size), the image produced by the provided code will be deformed.
this would be true for LaTeX as well as plain TeX, and is a different
problem than the one addressed by \mathchoice.
the overlay technique is sensitive to a couple of things:
the need to use explicit dimensions, and (often) the need to pack at least
one of the components in a box, which "freezes" the size at the current value.
(\rlap, \llap and \[math]clap, while very useful, are underlain by boxes, so
are subject to the "single size" limitation.)
there are some TeXniques than can be brought to bear on this situation:
to adjust for relative current size, the
amsmathcommand\textis available.dimensions can be expressed as
ex,emormuto accommodate to the current size, but they must be employed carefully at appropriate places in a definition to get the desired effect. it is also the case that (for computer modern fonts) the different design sizes may not have the same aspect ratio; this is particularly true for bold vs. normal weight.another possibility is to take advantage of the fact that
\mathopwill vertically center a single glyph on the math axis.
has anyone come up with a robust, flexible mechanism for overlaying glyphs to form a composite symbol that will reliably adjust to the size of type in the current environment? for simplicity in a first cut, it's acceptable to stick to computer modern/latin modern fonts.
the questions overlay symbol with another, how to add a custom symbol to LaTeX, and several others deal with the construction of particular symbols, but i'm looking for a general technique.
\scalebox, sotikzisn't that outlandish a suggestion, but it's really an answer to a different question.\footnotesizeto\hugebut it does drift off in some cases but without access to the glyph shape it's hard to see how this can be avoided. – David Carlisle Feb 10 '12 at 15:41