<#-- Generates the Table of Contents pages for the FMPP Manual --> <@pp.dropOutputFile/> <@generateTocPage manualFiles, true /> <#macro generateTocPage seq, mainToc=false> <#local tocDesc = seq[0]> <@pp.nestOutputFile name=pp.home+tocDesc.file> <@page title=tocDesc.title keywords=tocDesc.keywords?if_exists> <#if tocDesc.preToc??> <@tocDesc.preToc?interpret /> <#if mainToc> <@recursiveToc seq[1..], 'Table of Contents' /> <#else> <@recursiveToc seq[1..], 'Chapter Contents' /> <#if tocDesc.postToc??> <@tocDesc.postToc?interpret /> <#list seq as subseq> <#if subseq?is_sequence> <@generateTocPage subseq /> <#macro recursiveToc seq title=''> <@toc title> <#list seq as f> <#if f?is_sequence> <@toci href=pp.home+f[0].file title=f[0].title> <@recursiveToc f[1..f?size - 1] /> <#else> <#if !pp.s.manualFileTitles[f]??> <#stop "Missing file or file didn't used <@page>: ${f}"> <@toci href=pp.home+f title=pp.s.manualFileTitles[f] />