diff --git a/generate-epub.retro b/generate-epub.retro
index 996db3d..0ae5629 100755
--- a/generate-epub.retro
+++ b/generate-epub.retro
@@ -17,9 +17,7 @@ Our structure will look like:
|-- stylesheet.css
|-- cover.xhtml
|-- toc.xhtml
- |-- chapterAA.xhtml
- |-- ...
- `-- chapterZZ.xhtml
+ |-- chapters/...
Begin by defining some helper functions for writing to a
@@ -91,12 +89,12 @@ Spine:
'__ file:s:put file:nl
'__ file:s:put file:nl
-#0 TOC [ over swap '____ s:format file:s:put file:nl n:inc ] a:for-each
+#0 TOC [ over swap '____ s:format file:s:put file:nl n:inc ] a:for-each
drop
'__ file:s:put file:nl
'__ file:s:put file:nl
-(spine)
+#0 TOC [ drop dup '____ s:format file:s:put file:nl n:inc ] a:for-each drop
'__ file:s:put file:nl
'__ file:s:put file:nl