Re: Styles for inline boxes
- To: mathgroup at smc.vnet.net
- Subject: [mg115559] Re: Styles for inline boxes
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Fri, 14 Jan 2011 06:20:29 -0500 (EST)
Either I don't understand what you're asking or you're overlooking
something obvious...
With the input you specified, you don't get anything that, in the
underlying expression for the Text cell is an "InlineFormula". You just
get there:
Cell[BoxData[
FormBox["different", TraditionalForm]],
FormatType->"TraditionalForm"]
for that text you entered between the Ctrl+( and Ctrl+).
And then you can change its color, or size, or face, or font the same
way as for anything, either using the Format menu or some specialized
palette.
Moreover, there's no need to use the Ctrl+( and Ctrl+) to distinguish
the part of the text you want to color. Any text you select you can
color, change its size, etc., also using the Format menu, etc.
For example, if in a Text cell you have entered
This is some text, which includes something different inside.
and if you use the Format menu to change the Text Color of "different"
to Purple, then the underlying Text cell's expression will now be:
Cell[TextData[{
"This is some text, which includes something ",
StyleBox["different",
FontColor->RGBColor[0.5, 0, 0.5]],
" inside."
}], "Text"]
If you're changing font properties a lot, you might find it useful to
use Ingolf Dahl's SetFaceAndFont palette:
http://www.familydahl.se/mathematica/
When you're changing text properties, you might
>
> I'm recently decided to give a determined go for Mathematica's style-
> system. Since it is very flexible, it gives a good coverage over my
> desire, though some points are totally obscure to me. One particular
> is: how to define a style for inline formulae, which I enter into a
> text cell with CTRL+9, like this:
>
> **text cell starts**
> This is some text, which includes something [CTRL+9]different[CTRL+0]
> inline.
> **text cell ends**
>
> Note: I have some definitions for the text cell, and I want to assign
> extra definitions (above those inherited from the text cell) to the
> inline formula, i.e. to the box *only*, e.g. to display its content in
> purple. And I of course want to do this without explicitely changing
> the style of the inline word "different" to InlineFormula. Is it
> possible, that a style is automatically assigned to the object entered
> with CTRL+9 into a text cell?
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305