MathGroup Archive 1999

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

Search the Archive

text formatting headache

  • To: mathgroup at
  • Subject: [mg20171] text formatting headache
  • From: Henrik Weimer <henrik at>
  • Date: Sun, 3 Oct 1999 21:07:39 -0400
  • Organization: Rice University
  • Sender: owner-wri-mathgroup at


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.

                      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 at

  • Prev by Date: Rationalize[] in Mathematica3 vs. Mathematica4
  • Next by Date: simplifying expressions
  • Previous by thread: Re: Rationalize[] in Mathematica3 vs. Mathematica4
  • Next by thread: simplifying expressions