Message Boards Message Boards

Indexing or searching a collection of notebooks for teaching.

Posted 10 years ago

Hello, For two classes that I teach, I distribute dozens of mathematica notebooks as lecture material. I would like the students to be able to search through these notebooks for topics and examples. I'd like to construct a tool that is a hybrid between a search engine and an index.

I am hoping that I could get advice about how to proceed.

Ideas that come to mind: 1) Create a palette that opens all notebooks below a given top directory and uses front end functions such as NotebookFind[]. However, opening all notebooks seems like overkill.

2) Just create a PDF of all the notebooks and use a pdf search tool. However, this wouldn't link to the particular notebooks.

3) Extensively tag all of the cells in all of the notebooks; write some front end code to programmatically create a palette. The palette would be updated as the lectures grow. However, it is going to be a hassle to usefully tag all of the cells.

POSTED BY: W. Craig Carter
3 Replies

Several suggestions.

Package your course as an Application, which will be unzipped into the UserBaseDirectory/Application folder. The top folder might have a name like Coursexxx and the notebooks might go in a folder CourseNotebooks. This has several advantages and the first is that you now know the paths to all the notebooks. There might also be a StudentNotebook folder where the student can put his notebooks associated with the course. Another advantage is that you might write a package for general routines used in the notebooks and include it at the top level. The students could have access to these routines also. You could also include StyleSheets and Palettes. All of these things will be automatically found by Mathematica. This isn't a direct answer to your question but at least it starts with a manageable and WRI supported structure.

(One problem I find is that users will put their work anywhere than in the UserBaseDirectory/Application folder and always have some reason for it. The reasons are never good enough to overcome the advantages of this location.)

Then you could have a CourseContents notebook that contained links to the various notebooks. Again, avoiding the chore of writing a general search function, a lot can be achieved by using long descriptive names for the notebooks and within the notebooks similar descriptive names for the Sections and Subsections. Grouped under each notebook link could be links to the various sections and then other links to specific cells that might be useful.

Links within a notebook should probably be with CellTags. My experience with CellIDs is that the link is selected but if it is in a lower subsection it will remain invisible because the containing sections are not opened!

Within each a notebook, a student could always use the Find function, which might be quite useful if there is a fair amount of textual discussion within the notebook.

If you're using Mathematica 10 (I've backed off to Mathematica 9) the Association capability might be a way to build a flexible index for the course but I'm not certain and it probably would be a major diversion.

One thought that comes to mind is that, if your notebooks have the relevant phrases in their Section, Subsection, and Subsubsection cells (and perhaps a small group of other cell types. Then you could create a data structure with the these cells' contents--perhaps suitably pre-processed-- along with the notebooks that they come from. This could then be placed in a user interface (which would reside in the directory structure of the notebooks) where one could type in a search phrase in an input field and then be presented with a list (with hyperlinks) of the notebooks where the search phrases are located. The data structure would be created by processing the set of notebooks, and embedded in the UI notebook which is permanently saved in the top level directory of your set of lecture notebooks.

I know that this is a very vague idea, but I think it's doable...

POSTED BY: David Reiss

Thanks David, I see the idea and I think I can implement something along those lines. Thanks.

POSTED BY: W. Craig Carter
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract