<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C L Snyder &#187; Mathematica</title>
	<atom:link href="http://www.clsnyder.com/WordPress/category/code/mathematica/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clsnyder.com/WordPress</link>
	<description>Kaizen with Sprezzatura</description>
	<lastBuildDate>Mon, 06 Feb 2012 22:52:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mathematica: Create a TOC</title>
		<link>http://www.clsnyder.com/WordPress/2008/05/18/mathematica-create-a-toc/</link>
		<comments>http://www.clsnyder.com/WordPress/2008/05/18/mathematica-create-a-toc/#comments</comments>
		<pubDate>Mon, 19 May 2008 01:02:46 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Mathematica]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=172</guid>
		<description><![CDATA[TOCForNotebook[] := Module[{nbr, data, cells, nb}, nb = EvaluationNotebook[]; SetOptions[nb, System`CreateCellID -> True]; SelectionMove[nb, All, Notebook, AutoScroll -> False]; NotebookWrite[nb, NotebookRead[nb]]; NotebookFind[nb, "Section", All, CellStyle]; nbr = NotebookRead[nb]; data = nbr /. {Cell[x_, "Section", ___, z : (CellID -> w_), &#8230; <a href="http://www.clsnyder.com/WordPress/2008/05/18/mathematica-create-a-toc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<pre class="prettyprint">
TOCForNotebook[] :=
  Module[{nbr, data, cells, nb}, nb = EvaluationNotebook[];
   SetOptions[nb, System`CreateCellID -> True];
   SelectionMove[nb, All, Notebook, AutoScroll -> False];
   NotebookWrite[nb, NotebookRead[nb]];
   NotebookFind[nb, "Section", All, CellStyle];
   nbr = NotebookRead[nb];
   data =
    nbr /. {Cell[x_, "Section", ___, z : (CellID -> w_), ___] :> {x,
        w}};
   cells =
    TextCell[
       Button[TextCell[#[[1]], "Hyperlink"],
        NotebookFind[EvaluationNotebook[], #[[2]], All, CellID],
        Appearance -> "Frameless"], "Text"] &#038; /@ data;
   cells = First[ToBoxes[#]] &#038; /@ cells;
   SelectionMove[EvaluationNotebook[], Before, Notebook,
    AutoScroll -> True];
   NotebookWrite[nb, cells];];
Button["Create a Table of Contents", TOCForNotebook[],
 Background -> Yellow]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2008/05/18/mathematica-create-a-toc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

