MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Equation Font

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19189] Re: Equation Font
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Tue, 10 Aug 1999 02:52:48 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <7odm0v$7rg@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 5 Aug 1999, Kevin J. McCann wrote:

> I have noticed that if I am typing a line of  Text that if  I do something
> like Hsub2, the Hsub2 converts itself into Courier font.  I assume that this
> is the default for Equations, but I can't find a place to change it so that
> it is whatever I generally use for text lines, e.g. Times New Roman or
> whatever.  Could someone please enlighten me on this?

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, etc.  This editor is normally used in heading and text style
cells.  It is also used for cells that use the InputForm format type. The
other is the "math" editor.  It is used to manipulate anything in the
notebook that is represented as a two-dimensional typeset structures
(BoxData).  The math editor is used wherever the front end is configured
to use the StandardForm or TraditionalForm format types.  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 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 what
FormatType is applied depends on the setting of the option.  You can query
this value by evaluating this expression in the notebook you're using:

"TextInline" /. (CommonDefaultFormatTypes /. 
      Options[EvaluationNotebook[], CommonDefaultFormatTypes])

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 the style sheet notebook in use with the 

	Format -> Edit Style Sheet ...

menu command and then expose the cell group that has the heading
"FormatType Styles", you'll see where all the mischief comes into play.
TraditionalForm typically does not have an explicit font setting, so it
inherits the default for the notebook.

	FontFamily /. Options[EvaluationNotebook[], FontFamily]

On most systems, this will return "Times" or the system lookalike 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, which includes Input and Output style cells.

--
P.J. Hinton
Mathematica Programming Group           paulh at wolfram.com
Wolfram Research, Inc.




  • Prev by Date: Precision Problems
  • Next by Date: Memory bloat -- what have I done?
  • Previous by thread: Re: Equation Font
  • Next by thread: Interesting Yaw, Pitch, Roll Problem