I’m working on a document for a course that I teach, and I’ve come up against two problems:
First, I’m showing some mathematica work with a “equals aligned” math cell from the Writing Assistant Palette, and they involve some algebraic fractions. The program automatically shrinks these fractions, but I’d like to leave them in the 12 point font. I thought I might be able to get around this by putting an “AllowScriptLevelChange → False” in the code for the cell, but my attempts failed. Then I thought I might be able to edit the Stylesheet to do what I wanted, but I don’t know how.
Second, I want to put a definition in a frame (which requires a text cell), and I’d like to have some of the cell be left-aligned, and some of the cell to be center-aligned. Ordinarily I’d just create two cells, but I need all of the contents in a single frame. Is there a way to do switch alignments mid cell?
Basically, you want to prevent script level changes inside from the fractions, without allowing any surrounding boxes (like GridBox) to interfere with their own opinions.
You can also do this at a higher or lower level interactivly by selecting something, opening the options inspector, searching for FractionBoxOptions, and toggling AllowScriptLevelChange.
As for your second problem, I think you’d want a cell containing two inline cells, each own with its own alignment.
CellPrint @ Cell[
BoxData[FrameBox[RowBox[{
Cell["Hello\nI'm left aligned", "Text"],
Cell["And I am\ncenter-aligned", "Text", TextAlignment -> Center]
}]]],
"Text" (* or "Input", or whatever you want the overall style to be. *)
]