Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1589
| From | John Fultz <jfultz@wolfram.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: StyleSheet -> SubInput & SubOutput |
| Date | 2011-04-11 11:06 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <inunbm$2cq$1@smc.vnet.net> (permalink) |
On Sat, 9 Apr 2011 18:00:27 -0400 (EDT), ShiftyMongoose wrote:
> Hi All,
>
> I've created two new format styles (SubInput & SubOutput) which is
> exactly the same as Input & Output format except that it is indented a
> few characters to the right.
>
> This was done by copying the format from Core.nb and changing
> "Cellmargins" start position.
>
> SubInput works fine, however after calculating the output, Mathematica
> will display the answer using the Output format instead of the SubOutput
> format.
>
> How do I instruct Mathematica to display the answer using the SubOutput
> format?
>
> Thanks,
> SM
Instead of copying the entire styles, you can actually base the
SubInput/SubOutput styles directly off of whatever Mathematica's existing
Input/Output styles are, which is less work and more portable across versions of
Mathematica. Here's a version of what I'm talking about, with the appropriate
GeneratedCellStyle option set (which is the option you were looking for):
{
Cell[StyleData["SubInput", StyleDefinitions -> StyleData["Input"]],
CellMargins->{{90, Inherited}, {Inherited, Inherited}},
GeneratedCellStyles->{"Output"->"SubOutput"}],
Cell[StyleData["SubOutput", StyleDefinitions -> StyleData["Output"]],
CellMargins->{{90, Inherited}, {Inherited, Inherited}}]
}
Copy the above list into your stylesheet, replacing the previous versions of
SubInput and SubOutput, and you'll have something that works like you want, I
think.
Sincerely,
John Fultz
jfultz@wolfram.com
User Interface Group
Wolfram Research, Inc.
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: StyleSheet -> SubInput & SubOutput John Fultz <jfultz@wolfram.com> - 2011-04-11 11:06 +0000
csiph-web