Difference between revisions of "Command/vphantom"
< Command
Jump to navigation
Jump to search
BruceH2020 (talk | contribs) m |
BruceH2020 (talk | contribs) m |
||
Line 12: | Line 12: | ||
<cd:description><!-- the long description of the command goes here --> | <cd:description><!-- the long description of the command goes here --> | ||
<tt>\vphantom</tt> typesets the supplied content and then throws it away, leaving a 'phantom' i.e. an invisible item that has zero width but the maximum height of the phantom text. This then influences the height of what follows.</cd:description> | <tt>\vphantom</tt> typesets the supplied content and then throws it away, leaving a 'phantom' i.e. an invisible item that has zero width but the maximum height of the phantom text. This then influences the height of what follows.</cd:description> | ||
− | <cd:examples><cd:example title="Aligning the height of square root (radical) signs">\startformula | + | <cd:examples><cd:example title="Aligning the height of square root (radical) signs">\starttext |
+ | \startformula | ||
\sqrt[3]{4n} \ne \sqrt[3] {n} | \sqrt[3]{4n} \ne \sqrt[3] {n} | ||
\stopformula | \stopformula | ||
Line 18: | Line 19: | ||
\sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n} | \sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n} | ||
\stopformula | \stopformula | ||
− | </cd:example></cd:examples> | + | \stoptext</cd:example></cd:examples> |
<cd:notes></cd:notes> | <cd:notes></cd:notes> | ||
<cd:seealso> | <cd:seealso> |
Revision as of 20:07, 21 August 2021
Contents
\vphantom
Summary
The command \vphantom creates an invisible item that has height but no width.
Settings
Description
\vphantom typesets the supplied content and then throws it away, leaving a 'phantom' i.e. an invisible item that has zero width but the maximum height of the phantom text. This then influences the height of what follows.
Examples
Aligning the height of square root (radical) signs
\starttext \startformula \sqrt[3]{4n} \ne \sqrt[3] {n} \stopformula \startformula \sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n} \stopformula \stoptext