Re: Text Manipulation
- To: mathgroup at smc.vnet.net
- Subject: [mg58052] Re: [mg57945] Text Manipulation
- From: Omega Consulting <info at omegaconsultinggroup.com>
- Date: Fri, 17 Jun 2005 05:18:58 -0400 (EDT)
- References: <200506130951.FAA29398@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Here's a simple function that produces what you want. Proposition[foo_] := CellPrint[Cell[TextData[{"Propostion ", CounterBox[ "Title",foo],".", CounterBox["Section",foo],".", CounterBox["Proposition",foo]}], "Text"]] Then you call it for the desired tag Proposition["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). http://www.ijournals.net/ Also, with one of our packages, you can easily make this into a palette. <<FormMaker` DisplayNotebook[MakeNotebook[ ActionBox[ "Insert Proposition", Module[{foo}, foo = InputString["Enter tag:"]; NotebookWrite[ InputNotebook[],Cell[TextData[{"Propostion ", CounterBox["Title",foo],".",CounterBox["Section",foo],".",CounterBox[" Proposition",foo]}],"Text"]] ] ],NotebookStyle->"Palette"]] http://omegaconsultinggroup.com/Products/form/ ---------------------------------------------- Omega Consulting The final answer to your Mathematica needs. http://omegaconsultinggroup.com 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 math.umd.edu >
- References:
- Text Manipulation
- From: Garry Helzer <gah@math.umd.edu>
- Text Manipulation