Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating 'smart' textbooks with mathematica?

32 views
Skip to first unread message

luke wallace

unread,
Apr 29, 2012, 2:08:38 AM4/29/12
to
I have a technical PDF that is hard to read because you could be on
pave 500 and it will tell you to "refer sections 1.1.4.5, 2.2.1.5,
3.4.3.2, and 6.1.2.4 for the rest of the information you need."

So you have to jump around the book, finding these sections, going
back and forth all day.

If Mathematica could automatically create 'links' to jump to section
headers throughout the whole book in one command for every section
header, then this would revolutionize the functionality of technical e-
books and make them ten times easier to understand.

In all technical books, the actual "Section 1.1" for example is always
different than the mere reference to "Section 1.1" because the real
one will be in bold, italics, a bigger font size, etc no matter where
it is actually randomly located.

Going through one by one and creating interlinks would take forever,
this one book alone I have has about 12,000 needed to be made.

So, if Mathematica could simply link all font size 10 text to the font
size 14 text of an identical string for all duplicate text strings
found, it would do this for all 12,000 references automatically!

Another way would be to link all non-bold font strings to their bold
counterparts.

Currently, Acrobat X, InDesign, FrameMaker, MS Word, and others can't
do this based on merely font size or font style.

Can anyone find a way to do this? By the way, I can easily convert the
PDF to Mathematica since the PDF has editable text. So that isn't an
obstacle.

djmpark

unread,
Apr 30, 2012, 4:40:40 AM4/30/12
to
I apologize for not directly answering your question or providing a solution
for your particular need but the title invites comment. (I suspect that the
solution would not be as simple as imagined, once you get rid of
non-relevant matches, insert proper pdf links, and translate the notebook
back into the original pdf document. Of course, the person who wrote the
original pdf could have provided links if he was in a position to do so and
cared more about his readers.)

Why don't people actually write smart textbooks with Mathematica?

One maxim would be: Don't jerk the reader around! Bring the material that a
reader needs to the point that he needs it. Once you move to another point
in the document you lose sight of the original material. Even if your
proposal succeeds it doesn't solve that problem.

Wouldn't it be nice if the reader became a reader/user and with the document
also had routines so he could start doing calculations and variations
immediately? Wouldn't it be nice if he could just recall an equation to his
place in the document? Or maybe the material could be displayed in a
separate window on the side of the notebook. Wouldn't it be nice if basic
axioms or theorems were available in a separate window where they could be
constantly referred to, or better yet used, by pasting them into the
document? Wouldn't it be nice if complex proofs or derivations could be
presented as a unity in one place, where one could flip back and forth
between various sections of the proof, or put several sections up
simultaneously?

Wouldn't it be nice if documents didn't have so many misprints, omissions,
or errors? Wouldn't it be nice if the material in the document had been
proofed by actual evaluation?

Suppose you could produce such a document and also publish a hard copy
version with the basic material without the nice usage features.

It's possible to do all of this now. It's called a Mathematica Application
and can be produced with Mathematica and Workbench. All one needs to read
and use the document is Mathematica. It's not that expensive. Such documents
are orders or magnitude better than conventional practice. It's the future.

The time and effort spent in trying to provide Mathematica solutions to
final non-Mathematica documents seems to me to be a poor use of time and
resources. They all fall short in some way or introduce extra problems.


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/index.html

David Reiss

unread,
Apr 30, 2012, 4:41:41 AM4/30/12
to
The short answer to this is that there are many ways to program this
in Mathematica and, indeed, many ways to programmatically interact
with a notebook or notebooks in pretty much arbitrary ways. Start to
read up on Notebook Programming, style sheets, and tagging. This will
give you a start on getting a sense of the wide scope of
possibilities.

Best,
David

Murray Eisenberg

unread,
Apr 30, 2012, 4:47:18 AM4/30/12
to
The LaTeX hyperref package allows a document author to insert links in a
resulting PDF, both internal links and links to external URLs.

In Mathematica, it's pretty easy to accomplish what you want -- and not
have to worry about subsequent renumbering of sections, subsections,
etc. Select a cell, e.g., a Section cell, use the Cell > Cell Tags menu
item, and add a tag to that cell -- use a good name describing the
contents or title rather than the section number.

Then, whenever you want to refer to that section, use menu item Insert >
Hyperlink, in the resulting dialog select Current notebook, then select
the cell-tag you previously assigned to the target Section cell.
--
Murray Eisenberg mur...@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305

David Bailey

unread,
Apr 30, 2012, 4:41:11 AM4/30/12
to
On 29/04/2012 07:08, luke wallace wrote:

>
> Can anyone find a way to do this? By the way, I can easily convert the
> PDF to Mathematica since the PDF has editable text. So that isn't an
> obstacle.
>

That depends on whether the formatting information is preserved somehow.
I imagine you would need to reformat all the headings, and if they had
names such as 3.4.3.2, you could probably rely on just converting all
such references to hyperlinks.

A good start would be to use NotebookGet[SelectedNotebook[]] to obtain
the entire BoxForm of the notebook (be careful not to print that out)
and pick out the headings. Then, for each heading you would use
NotebookFind to seek out the corresponding references in the notebook,
and replace them with a hyperlink.

Don't save the modified notebook on top of the original, because you
will almost certainly need to tweak your conversion code a bit!

David Bailey
http://www.dbaileyconsultancy.co.uk



0 new messages