La façon la plus simple d'ajouter un index des chants est de dupliquer le contenu des titres de chants \s à l'aide d'une règle Changes.txt comme celle-ci :
'(\\s )([^\\]+)( ?\r?\n)' > '\\toc1 \2\3\1\2\3'
Cela signifie : rechercher un en-tête de section \s et appeler ce groupe de correspondance 1.
Puis récupérer le contenu/le texte de cet en-tête, en appelant ce groupe de correspondance 2.
Récupérer la fin de ligne (qui nécessite au moins un \n, mais peut avoir une espace et/ou un \r avant le \n final) et appeler ce groupe de correspondance 3.
Ensuite, du côté de la chaîne de remplacement, insérez le nouveau marqueur \toc1 suivi du contenu du groupe 2 et de la partie fin de ligne. Puis remettez tout le reste tel que vous l'avez trouvé (1, 2, 3).
Ces champs \toc1 devraient maintenant être détectés et utilisés dans la table des matières.
Notez que vous pouvez également générer une table des matières triée à partir de ces mêmes marqueurs \toc1 pour un index à la fin du livre de chants. Utilisez simplement \ztoc|sorta\* au lieu de \ztoc|main\*
The easiest way to add an index of songs is to duplicate the contents of the \s Song Titles using a Changes.txt rule like this:
'(\\s )([^\\]+)( ?\r?\n)' > '\\toc1 \2\3\1\2\3'
This says, look for a \s section heading and call that match-group 1.
Then grab the content/text of that heading, calling that match-group 2.
Grab the end of line (which needs at least an \n but might have a space and/or \r before the final \n) and call that match-group 3.
Then, on the replace-with side, put in the new marker \toc1 followed by the contents of 2 and the end of line piece. Then put everything else back as you found it (1,2,3).
These \toc1 fields should now get picked up and used in the Table of Contents.
Note that you can also generate a sorted (table of contents) from these same \toc1 markers for an index at the back of the song book. Just use \ztoc|sorta\* instead of \ztoc|main\*
Traduit automatiquement depuis English