[texhax] \overline and \phantom

William Adams will.adams at frycomm.com
Wed Aug 1 16:40:27 CEST 2012


On Aug 1, 2012, at 9:57 AM, Paul Stanley wrote:

> Could you provide examples of where `\vphantom' and `\hphantom' could be used?

I use them when I need a space which matches an existing element on a page, or when preparing a student's edition from an instructor's edition (have a command which typesets the answer for the instructor's edition, but for the students' edition, it sets the answer in an hphantom macro so that instead, an empty space for the student to write the answer is placed).

> I can only picture two dimensions on the page, height and width, where does the depth fit into this?

Depth is how far a character or a box descends below the baseline.

Letterforms of varying shapes are arranged in a line from an origin point. The line is the baseline, and the origin point defines where the baseline falls. For lowercase / miniscule letterforms:

 - some range from baseline to x-height: aceijmnorsuvwxz
 - some have ascenders which continue above the x-height: bdfhklt 
 - lastly some have descenders which be below the baseline: gpqy

It's that last group (more-or-less) which forces the need for depth.

> Finally, where would smash be used?

To typeset something w/o taking its height into consideration.

Some typefaces will have em-squares (spatial canvas on which a font is designed) which are different from others, so if set on a line w/ another typeface will have a taller cap-height and will push the baseline down when set on the same line (Agfa Mathematical Pi is particularly egregious for this), so if one wants such special chars in a line w/ other text w/o disturbing the placement of the baseline one would \smash them.

\overline sets a horizontal rule over an element in math mode which has some meaning which I'm unfortunately ignorant of. It's a good example of that class of commands which create elements as vector shapes which will not be visible to a screen reader.

William

-- 
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.




More information about the texhax mailing list