diff --git a/tutorial/html_section_pages.pike b/tutorial/html_section_pages.pike
new file mode 100644
index 0000000000000000000000000000000000000000..6e55e117623ed529c9e061c0f6195bf2b5e82db1
--- /dev/null
+++ b/tutorial/html_section_pages.pike
@@ -0,0 +1,25 @@
+inherit "html.pike";
+
+void split_and_remove_section(object t,object prev)
+{
+   if (t->data)
+      foreach (t->data,object t2)
+	 if (objectp(t2))
+	 {
+	    split_and_remove_section(t2,t->tag=="anchor"?t:0);
+	    if (t2->tag=="section")
+	    {
+	       object tq;
+	       if (prev)
+	       {
+		  sections[t2->params->number]=({t});
+		  prev->data-=({t});
+	       }
+	       else
+	       {
+		  sections[t2->params->number]=({t2});
+		  t->data-=({t2});
+	       }
+	    }
+	 }
+}