HoTMetaL PRO 6.0 Auxilarty Table Editing Macros

Tables

These macros provide quick keyboard shortcuts for the modification of table cell spanning and alignment.

How to remember the Macro keystrokes

Aligning and spanning table cells and content is based on the four main compass point directions. You align to the left, right or center, cells can be spanned up, down, left or right, etc. Ideally, we would base the macro "direction" on keys on the numeric keypad, and use the modifyer keys CTRL, ALT and SHIFT to create the many key combinations required. The layout is shown below, with the 5 key as the center:

7 8 9
4 5 6
1 2 3

A hardware limitation of PC computers with 101 key keyboards prohibits using modifiers, like CTRL, ALT or SHIFT, in combination with the numeric keypad to indicate the "direction" of the desired action. Even with NUMLOCK on, this hardware limitation causes the keystroke "CTRL-SHIFT-7" to send the keystroke "CTRL-SHIFT-HOME", as though NUMLOCK was off. These keystrokes are reserved by Windows for cursor movement and selection, so we can not assign macros to the numeric keypad. In addition to this technical limitation, notebook computers don't have a numeric keypad.

Using the layout of the top row of numeric keys from the numeric keypad as a guide, we retain the numerals for the top row of keys. So, instead of using the numeric keypad layout:

7 8 9
4 5 6
1 2 3

we will use the alpha-numeric keyboard keys

7 8 9
U I O
J K L

Cell Content Alignment

Cell content alignment is achieved by setting the cell's ALIGN and VALIGN attributes. If the ALIGN and VALIGN attributes have no values, the content will be aligned horizontally to the left, and vertically aligned in the middle. The macros below set both attribute values at the same time.

Press and hold CTRL and ALT together, then press the following keys:

7 8 9
U O
J K L

The I key will center the content both vertically and horizontally.
The Y key will remove both cell content alignment attribute values.

Contracting and Expanding Cells

The visual principle behind contracting and expanding cells is moving a particular cell border such that it encapsulates the content of the adjacent cell in the desired direction. The direction keys do not indicate which cell border (left, right, top, or bottom) but the direction the cell border will move. If you think of moving a border in a particular direction, the keystrokes are even easier to remember.

Expanding Cells

Press and hold CTRL and SHIFT together, then press the following keys

8
U Extend Cell Up O
{short description of image} {short description of image}
{short description of image}
K

Contracting Cells

Contracting cells may appear backward, but think of it this way; if you want to contract a spanned cell, so the new cell appears on the left of the current cell, what you'll be doing is pulling the cell border towards the center of the cell, from the left, towards the right. Since the direction the cell border moves is left to right, we want to use the right directional key, the "o"

Press and hold CTRL, ALT and SHIFT together, then press the following keys

8
U O
K

If you would like to print a template, we have included a version of this page that without the text. View this page in a browser, and select Print... from the File Menu. Keep it handy when you're doing table editing and you'll find that they become second nature in no time.