text formatting headache
- To: mathgroup at smc.vnet.net
- Subject: [mg20171] text formatting headache
- From: Henrik Weimer <henrik at rice.edu>
- Date: Sun, 3 Oct 1999 21:07:39 -0400
- Organization: Rice University
- Sender: owner-wri-mathgroup at wolfram.com
Hello!
I am trying to build a table of contents for a large document in
Mathematica. You can find an example of what I think a decent table of
contents should look like on the first few pages of your favorite
math/physics/chemistry/etc. textbook.
I wrote something that munges notebooks and builds table of contents
entries for chapters, sections etc. Basically, the cells representing
the table of contents entries look something like the following.
Cell[TextData[{
CounterBox["Chapter", {"ch1.nb", "tocTag0"}],
" Functions as Fractals ",
CounterBox["Page", {"ch1.nb", "tocTag0"}]
}], "ToCChapter"]
This the front end formats quite nicely as:
1 Functions as Fractals 1
Now imagine a table of contents containing many many such lines. Here
comes my question: Is there a way to get the page numbers (the right
most 1 in the example) aligned on the right border of the page? Has
anybody come across this problem before? I am sure somebody out there
must have built a decent table of contents in Mathematica, no?
Thanks you for any hints....
Helpless but hopeful,
Henrik
henrik at rice.edu