MathGroup Archive 2005

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

Search the Archive

Re: Text Manipulation

  • To: mathgroup at
  • Subject: [mg58052] Re: [mg57945] Text Manipulation
  • From: Omega Consulting <info at>
  • Date: Fri, 17 Jun 2005 05:18:58 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

Here's a simple function that produces what you want.

Proposition[foo_] :=
CellPrint[Cell[TextData[{"Propostion ",
           CounterBox["Proposition",foo]}], "Text"]]

Then you call it for the desired tag


You can cut and paste the the output to where you want it. These kinds 
of operations are discussed in the upcoming issue of Mathematica in 
Education & Research (MIER).

Also, with one of our packages, you can easily make this into a palette.


       "Insert Proposition",
         foo = InputString["Enter tag:"];
       InputNotebook[],Cell[TextData[{"Propostion ",

Omega Consulting
The final answer to your Mathematica needs.

On Jun 13, 2005, at 4:51 AM, Garry Helzer wrote:

> I spend a lot of time using Input > Create Automatic Numbering
> Object . . .  to create references of the form : Proposition 3.7.9.
> The relevant part of the cell expression is something like
> TextData[{
>    "Propostion\[NonBreakingSpace]",
>    CounterBox["Title", "foo"],
>    ".",
>    CounterBox["Section", "foo"],
>    ".",
>    CounterBox["Proposition", "foo"]
> }]
> Here "foo" is a cell label and "Proposition" is a defined cell style.
> I would like a more efficient way to do this. What I have in mind is
> something like a function propref["foo"] which when evaluated in
> place changes to Proposition 3.7.9, or a button, or a palette, or
> something.
> Any suggestions of the best way to go about this?
> Garry Helzer
> gah at

  • Prev by Date: Re: For Loop and Array related
  • Next by Date: Baker-Campell-Hausdorff
  • Previous by thread: Text Manipulation
  • Next by thread: Re: Text Manipulation