Re: Creating 'smart' textbooks with mathematica?
- To: mathgroup at smc.vnet.net
- Subject: [mg126305] Re: Creating 'smart' textbooks with mathematica?
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Mon, 30 Apr 2012 04:40:15 -0400 (EDT)
- Delivered-to: email@example.com
- References: <firstname.lastname@example.org>
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 188.8.131.52, 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