Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Superscript in Mtext. 1

Status
Not open for further replies.

KJJ

Structural
Mar 16, 2001
12
0
0
GB
Is it possible to super/subscript letters in Mtext? And if yes, how?
 
Replies continue below

Recommended for you

Dear KJJ;

This is copied directly from autocad 2000 help, it looks like you will need to modify an .shx file

Regards Adrian

The AutoCAD SHX fonts have limited superscript and subscript capabilities. However, it is relatively easy to modify shape definition files to improve superscript and subscript capability.

Creating superscripts and subscripts requires two steps. First, the "imaginary pen" that is creating the text, vector by vector, on your screen needs to be shifted up or down. Then, the font "scale" needs to be reduced. In addition, the reverse process has to take place to return to the normal font. The font needs to recognize four new keys: two for superscripts and two for subscripts. To avoid altering the existing font definitions, you can access these with the numeric keypad on your keyboard.

The following example procedure is based on the AutoCAD Romans font file, although a similar method applies to any AutoCAD font. This procedure adds four new shape definitions to a font: super_on, super_off, sub_on, and sub_off, which control the position and size of the characters that follow. For simplicity, this example replaces the left- and right-bracket characters ([ and ]) and the left and right curly brace characters ({ and }) with the new characters. You may choose to replace other characters or use a shape number in the extended range (ASCII codes 128 through 256). If you use an extended shape number, you need to use the %%nnn method (where nnn is the ASCII value of the character) for placing the new characters
 
A simpler way is to use the stacking feature in mtext.

To superscript an asterisk, (say) type:

*^<space>

hihlight that, and press the a/b button at teh top. Voila.
To do the opposite, just type the same thing but backwards <space>^*
 
Status
Not open for further replies.
Back
Top