diff --git a/generate-epub.retro b/generate-epub.retro index 1a61a86..16682fc 100755 --- a/generate-epub.retro +++ b/generate-epub.retro @@ -89,7 +89,9 @@ Then create `META-INF/container.xml`. ' } [ file:s:put file:nl ] a:for-each -#0 TOC [ #1 a:fetch over dup dup '____Chapter_%n s:format file:s:put file:nl n:inc ] a:for-each drop +:a:unpack [ ] a:for-each ; + +#1 TOC [ a:unpack 'abc 'acbaaa reorder '____Chapter_%n:_%s s:format file:s:put file:nl n:inc ] a:for-each drop { ' ' @@ -125,12 +127,12 @@ that are used in the book. '__ file:s:put file:nl '____ file:s:put file:nl -#0 TOC [ #1 a:fetch over swap '____ s:format file:s:put file:nl n:inc ] a:for-each +#1 TOC [ #1 a:fetch 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 -#0 TOC [ drop dup '____ s:format file:s:put file:nl n:inc ] a:for-each drop +#1 TOC [ drop dup '____ s:format file:s:put file:nl n:inc ] a:for-each drop '__ file:s:put file:nl ~~~ diff --git a/tools/book-chapters.retro b/tools/book-chapters.retro index d09373d..73daf64 100755 --- a/tools/book-chapters.retro +++ b/tools/book-chapters.retro @@ -47,7 +47,7 @@ This contains the list of files for the chapters in the book. { 'Errors 'techniques/errors } { 'Lexical_Scope 'techniques/lexical-scope } { 'The_Stacks 'techniques/the-stacks } - { 'Naa 'internals/nga } + { 'The_Nga_Virtual_Machine 'internals/nga } { 'Interface_Layers 'internals/interface-layers } { 'I/O 'internals/io } { 'Image 'internals/image }