| ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||
|
Inline EquationsQ: When entering text into a Text cell, if I enter a subscripted variable (say h A: P. J. Hinton (paulh@wolfram.com) writes: There are two different editing environments in the notebook front end. The "text editor" is used for handling regular text (TextData), possibly with some style enrichments such as modifications in font family, color, weight, and so on. Heading and plain text cells use the "text editor" by default. The "text editor" is also used when InputForm cells are being modified. The "math editor" is used to manipulate anything in the notebook that is represented as a two-dimensional typeset structure (BoxData). If a cell style uses either the StandardForm or TraditionalForm format types, then the "math editor" will be used to modify the contents. The front end switches between editing environments based on settings that normally reside in your notebook's style sheet. When you attempt to enter a subscript in a plain text cell, the front end handles this by creating an inline cell and switching from the text editor to the math editor. The appearance of the space occupied by the inline cell is set by a cell style in your style sheet known as InlineCellEditing. It is applied to the contents of the inline cell if your text cursor resides within the boundaries of the cell. By default, this color is RGBColor[1, 0.749996, 0.8], which produces that pink background color. Inline cells do not immediately obey the formatting settings of the encapsulating cell. Instead, the settings are inherited from one of the FormatType style cells that is in your notebook's style sheet. Just which FormatType is applied depends on the setting of the option. You can query this value by evaluating the following expression in the notebook you are using. In most situations, TraditionalForm will be returned. However, you may be using a notebook that uses StandardForm instead. That would account for the use of Courier in your subscripting. If you open a notebook's style sheet with the Format Note that you can open a notebook's style sheet by executing the following command. FrontEndTokenExecute allows you to send from the kernel any command that the front end can execute. These commands include both menu items and control sequences. See Section 2.10.4 of The Mathematica Book. TraditionalForm typically does not have an explicit font setting, so it inherits the default for the notebook. On most systems, this will return Times or the system look-alike for this font. However, StandardForm does have a default font choice in most style sheets -- Courier. If your notebook is using StandardForm as the FormatType for inline cells, you could probably do one of two things to fix your problem. The first is to simply change the value of
DefaultInlineFormatType to TraditionalForm by using the menu command Cell Copyright © 2002 Wolfram Media, Inc. All rights reserved. |