The Mathematica Journal
Current Issue
Tricks of the Trade
In and Out
Riemann Surfaces IIc
The Mathematica Programmer
New Products
New Publications
News Bulletins
Editor's Pick
Write Us
About the Journal
Staff and Contributors
Back Issues
Download This Issue

Inline Equations

Q: When entering text into a Text cell, if I enter a subscripted variable (say h-[_]0), it appears as an inline cell, , in Courier font. I assume that this is the default for inline cells. How can I change my settings so that it appears as ?

A: P. J. Hinton ( 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 Edit StyleSheet menu command and then expose the cell group that has the heading FormatType Styles, you will see where all the mischief comes into play.

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 Default Inline Format Type TraditionalForm. A less desirable alternative is to need to modify the FontFamily option that appears in the prototype cell for StandardForm. The reason that this is discouraged is that it will affect other cell styles which use the StandardForm prototype, including Input and Output style cells.

Copyright © 2002 Wolfram Media, Inc. All rights reserved.

[Article Index][Prev Page][Next Page]