Spaces and Rules

Adding and removing spaces

Frequently you will want to add an amount of space to "tweak" the appearance of an equation, when WebEQ does not automatically put it there by itself. A common example is the integral

\int x dx
WebEQ would take out the space between the x and the dx and show the integrand as xdx, since there is nothing in the source code to indicate that these symbols are not just three variables multiplied together. To obtain the traditional appearance for the integrand, it is necessary to place a thin space between these two symbols:
\int x \thinsp dx  or  \int x \, dx

There are three other sizes of spaces; in order of increasing width, these are \medsp, \thicksp, and \quad.

It is also possible to remove a space with the `negative space' command, \negsp. This command moves subsequent symbols to the left by a small amount.

There are short cuts for the two commands \thinsp and \negsp. The command \, is equvalent to \thinsp and \! is equivalent to \negsp.

x x
x \thinsp x
x \medsp x
x \thicksp x
x \quad x
x \negsp x
The WebTeX Examples include an example of the different spacing commands.

Phantom spaces

The \phantom{expr} command can be used to create a space that is exactly the size of the mathematical expression expr. For example, the 'B+C' section of the expression

A + B + C + D + E
is removed in the WebTeX expression:
A + \phantom{B+C} + D + E

A + B + C + D + E

Arbitrary size spaces and rules

Spaces of any size may be created with the \space{ht}{dp}{wd} command. This command has three parameters. The first parameter ht controls the height of the top of the box above the baseline, the second parameter dp controls the depth of the bottom of the box below the baseline, and the third parameter wd controls the width of the box.

The two vertical variables, ht and dp, are measured in units of tenths of an ex (the height of the letter x) and the horizontal variable wd is measured in units of tenths of an em (the width of the letter M).

The command \rule is similar to the \space command. The three arguments have the identical effect, with the difference that \rule creates a solid rectange instead of a blank space.

WARNING: The three arguments of \rule and \space are quite different from those used in LaTeX for the same commands.

The WebTeX Examples include an example showing the effect of using different arguments in \rule and \space.


[WebEQ Developers Suite]

Created: Dec 18 1997 --- Last modified: Sat Mar 24 17:25:21 2001
Copyright © 1997-2002 Design Science, Inc. All rights reserved.