La forma más fácil de añadir un índice de cánticos es duplicar el contenido de los títulos de cánticos \s usando una regla de Changes.txt como esta:
'(\\s )([^\\]+)( ?\r?\n)' > '\\toc1 \2\3\1\2\3'
Esto dice: busca un encabezado de sección \s y llama a ese grupo de coincidencia 1.
Luego, toma el contenido/texto de ese encabezado, llamando a ese grupo de coincidencia 2.
Toma el final de la línea (que necesita al menos un \n, pero podría tener un espacio y/o \r antes del \n final) y llama a ese grupo de coincidencia 3.
Luego, en el lado de reemplazo, coloca el nuevo marcador \toc1 seguido del contenido de 2 y la parte del final de la línea. Luego, coloca todo lo demás tal como lo encontraste (1,2,3).
Estos campos \toc1 deberían ser ahora recogidos y utilizados en el Índice.
Tenga en cuenta que también puede generar un índice ordenado (índice) a partir de estos mismos marcadores \toc1 para un índice al final del libro de cánticos. Simplemente use \ztoc|sorta\* en lugar 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\*
Traducción automática desde English