MathGroup Archive 2005

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

Search the Archive

Re: How was this typed?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61907] Re: How was this typed?
  • From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
  • Date: Fri, 4 Nov 2005 05:11:28 -0500 (EST)
  • References: <dk6v7u$fn0$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Here is a complete list of instructions to manually create a cell that looks 
like the one you want. I have appended it as a CellExpression, which you 
copy and paste into Mathematica, and it turns itself into a notebook.

Steve Luttrell

Cell[CellGroupData[{Cell["Manual Creation of Complex Text Cells", \
"Title"],

Cell["Here is the cell we want to create manually.", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[BoxData[
    FormBox[GridBox[{
          {Cell[TextData[{
              StyleBox["StyleForm[", "MR"],
              StyleBox["expr", "TI"],
              StyleBox[",", "MR"],
              " ",
              StyleBox["options", "TI"],
              StyleBox["]", "MR"],
              " "
            }]], Cell["print with the specified style options "]},
          {Cell[TextData[{
              StyleBox["StyleForm[", "MR"],
              StyleBox["expr", "TI"],
              StyleBox[",", "MR"],
              " ",
              StyleBox["\"", "MR"],
              StyleBox["style", "TI"],
              StyleBox["\"]", "MR"],
              " "
            }]], Cell["print with the specified cell style "]}
          },
        ColumnAlignments->{Right, Left}],
      TraditionalForm]], "DefinitionBox",
  GridBoxOptions->{RowSpacings->0.4,
  RowLines->False},
  CellTags->"S2.9.9"],

Cell["Create an empty text cell.", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell["", "Text"],

Cell[TextData[{
  "Insert a ",
  Cell[BoxData[
      FormBox[GridBox[{
            {"\[Placeholder]", "\[Placeholder]"},
            {"\[Placeholder]", "\[Placeholder]"}
            }], TraditionalForm]]],
  " in an in-line cell."
}], "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[TextData[Cell[BoxData[
    FormBox[GridBox[{
          {"\[Placeholder]", "\[Placeholder]"},
          {"\[Placeholder]", "\[Placeholder]"}
          }], TraditionalForm]]]], "Text"],

Cell["\<\
Put text cursor in top left cell, select new style using \
Format/Style/Program, and type \"StyleForm[]\" (without the inverted \
commas).\
\>", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[TextData[Cell[BoxData[
    FormBox[GridBox[{
          {
            StyleBox[
              RowBox[{"StyleForm", "[", "]"}],
              "Program"], "\[Placeholder]"},
          {"\[Placeholder]", "\[Placeholder]"}
          }], TraditionalForm]]]], "Text"],

Cell[TextData[{
  "Put text cursor inside the ",
  StyleBox["[]", "Program"],
  " of  \"",
  StyleBox["StyleForm[]", "Program"],
  "\", select new style using Format/Style/Text, select italic, and \
type \"expr,options\""
}], "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[TextData[Cell[BoxData[
    FormBox[GridBox[{
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", "options"}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}], "\[Placeholder]"},
          {"\[Placeholder]", "\[Placeholder]"}
          }], TraditionalForm]]]], "Text"],

Cell["Copy top left cell to bottom left cell.", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[TextData[Cell[BoxData[
    FormBox[GridBox[{
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", "options"}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}], "\[Placeholder]"},
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", "options"}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}], "\[Placeholder]"}
          }], TraditionalForm]]]], "Text"],

Cell["\<\
In the bottom left cell select \"options\", convert it to an in-line \
cell (in Windows this is Ctrl 9), type \"style\" (including the \
inverted commas).\
\>", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[TextData[Cell[BoxData[
    FormBox[GridBox[{
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", "options"}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}], "\[Placeholder]"},
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", Cell["\"style\""]}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}], "\[Placeholder]"}
          }], TraditionalForm]]]], "Text"],

Cell["\<\
Put text cursor inside top right cell, type \"print with the \
specified style options\" (without the inverted commas).\
\>", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[TextData[Cell[BoxData[
    FormBox[GridBox[{
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", "options"}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}],
            RowBox[{
            "print", " ", "with", " ", "the", " ", "specified", " ",
              "style", " ", "options"}]},
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", Cell["\"style\""]}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}], "\[Placeholder]"}
          }], TraditionalForm]]]], "Text"],

Cell["\<\
Put text cursor inside bottom right cell, type \"print with the \
specified cell style\" (without the inverted commas).\
\>", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[TextData[Cell[BoxData[
    FormBox[GridBox[{
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", "options"}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}],
            RowBox[{
            "print", " ", "with", " ", "the", " ", "specified", " ",
              "style", " ", "options"}]},
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", Cell["\"style\""]}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}],
            RowBox[{
            "print", " ", "with", " ", "the", " ", "specified", " ",
              "cell", " ", "style"}]}
          }], TraditionalForm]]]], "Text"],

Cell["\<\
Now let's do some global formatting to make the result look nice. For \
this you need the Option Inspector:
1. Select cell bracket, in the Option Inspector do Cell \
Options/Display Options/Background Color and select a tasteful \
colour.
2. Select cell bracket, in the Option Inspector do Cell \
Options/Display Options/CellFrame and select True.
3. Select cell bracket, in the Option Inspector do Formatting \
Options/(Table/Matrix/Palette Formatting)/Column Options/Column \
Alignments and select Left.\
\>", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]],

Cell[TextData[Cell[BoxData[
    FormBox[GridBox[{
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", "options"}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}],
            RowBox[{
            "print", " ", "with", " ", "the", " ", "specified", " ",
              "style", " ", "options"}]},
          {
            RowBox[{
              StyleBox["StyleForm",
                "Program"],
              StyleBox["[",
                "Program"],
              StyleBox[
                RowBox[{"expr", ",", Cell["\"style\""]}],
                "Text",
                FontSlant->"Italic"],
              StyleBox["]",
                "Program"]}],
            RowBox[{
            "print", " ", "with", " ", "the", " ", "specified", " ",
              "cell", " ", "style"}]}
          }], TraditionalForm]]]], "Text",
  CellFrame->True,
  Background->RGBColor[0.933333, 0.909804, 0.815686],
  GridBoxOptions->{ColumnAlignments->{Left}}],

Cell["That is fairly close to the required result.", "Text",
  CellFrame->True,
  Background->GrayLevel[0.833326]]
}, Open  ]]



  • Prev by Date: Re: ExportString[exp, "MathML"]
  • Next by Date: Re: Re: 2.9.2 How Input and Output Work
  • Previous by thread: Re: Re: How was this typed?
  • Next by thread: Re: How was this typed?