—————————SCRIPTURE REF PREPERATION—————————#f## ———TOC—————————#f## a-review existing \h, \mt, \toc's#ei#\\(h|mt|toc)\d? .*(?=\r\n) b-compare \h with \toc1 — if equal, delete \toc1#e#(?<=\\(h|toc)\d?) .*(?=\r\n) c-remove TOC's (to start from scratch)#r#\\toc\d.*?\r\n# ———TOC1—————————#f## 1-create TOC1 from 4 part book titles#r#\\mt(\d*)( .*?)\r\n\\mt(\d*)( .*?)\r\n\\mt(\d*)( .*?)\r\n\\mt(\d*)( .*?)\r\n#\\toc1\2\4\6\8\r\n\\a\1\2\r\n\\a\3\4\r\n\\a\5\6\r\n\\a\7\8\r\n 2-create TOC1 from 3 part book titles#r#\\mt(\d* )(.*?)\r\n\\mt(\d* )(.*?)\r\n\\mt(\d* )(.*?)\r\n#\\toc1 \2 \4 \6\r\n\\a\1 \2\r\n\\a\3 \4\r\n\\a\5 \6\r\n 3-create TOC1 from 2 part book titles#r#\\mt(\d*)( .*?)\r\n\\mt(\d*)( .*?)\r\n#\\toc1\2\4\r\n\\a\1\2\r\n\\a\3\4\r\n 4-create TOC1 from 1 part book titles#r#\\mt(\d* )(.*?)\r\n#\\toc1 \2\r\n\\a\1 \2\r\n 5-restore \mt's from temporary \a's#r#\\a(?<=\d*)#\\mt 6-cleanup all duplicate spaces (some created in 1-4 above)#r#( +)# ———TOC2 & TOC3————————#f## 11-change TOC2 to TOC3 when TOC2 contains abbrev.#r#\\toc2#\\toc3 12-change TOC1 to TOC2 when TOC1 contains short name.#r#\\toc1#\\toc2 13-swap TOC1 and TOC2 contents#r#(\\toc1 )(.*?\r\n)(\\toc2 )(.*?\r\n)#\1\4\3\2 14-create TOC2 from \h & and create a TOC3 @#r#(?s)(\\h )(.*?)(\r\n)(\\.*?)(?=\\mt)#\1\2\3\4\\toc2 \2\3\\toc3 @\r\n 15-create TOC3 from bookid in \id XXX (Use when BK ABBR. DO NOT exist)#r#(?s)(\\id )(...)(.*\\toc2 .*?\r\n)#\1\2\3\\toc3 \2\r\n 16-add missing TOC3 @ after existing TOC2 (Use when BK ABBR. DO exist)#r#(\\toc2 .+\r\n)#\1\\toc3 @\r\n 17-change toc3 @ to match toc 2 short name#r#(\\toc2 )(.*\r\n)(\\toc3 )@\r\n#\1\2\3\2 18-review TOC3#e#(?<=\\toc3 ).*?(?=\r) 19-reorder TOC2,3,1 --> TOC1,2,3#r#(\\toc2 .*\r\n\\toc3 .*\r\n)(\\toc1 .*\r\n)#\2\1