Añadiendo id:GLO| ya estás especificando ‘solo en el libro GLO’, por lo que no hay beneficio en usar otro marcador, a menos que quieras formatearlo de manera diferente.
Incluso si quieres formatear \m de manera diferente en GLO, puedes dejar el USFM sin cambios y formatear el marcador id:GLO|m La única razón por la que usaría un marcador especial sería si no es un \m ‘en esencia’.
Por cierto, \penalty se aplica exactamente en el lugar donde se encuentra, ya sea en modo horizontal (dividir una línea de texto en párrafos) o vertical (dividir párrafos en páginas).
Dado que al final del \k estamos en modo horizontal, insertarlo después del \k dice ‘no comiences un nuevo párrafo aquí’. TeX entonces se encuentra con el \p o \m, que incluye en su definición “Si estamos en modo horizontal, completa el párrafo con lo que se haya especificado y \penalty -10000”, y por lo tanto rompe allí en su lugar (incluso si no hubiera un relleno de fin de párrafo, las penalizaciones no son acumulativas, por lo que obedientemente no rompería en el 10000 y obedientemente rompería en el -10000).
Por cierto 2, No te tentes a intentar crear un hook para insertar un salto de párrafo después de un estilo de carácter. Lo intenté de varias maneras y concluí que simplemente confunde mucho el código si le pides que establezca un nuevo párrafo mientras procesa el final de un estilo de carácter.
By adding the id:GLO| you are already specifying ‘only in the GLO book’, so there’s no benefit to using another marker, unless you want to format it differently.
Even if you want to format \m differently in GLO, you can still leave the USFM unchanged, and format the marker id:GLO|m The only reason I’d use a special marker would be if it’s not a \m ‘at heart’.
FWIW, \penalty applies at exactly the place it’s met, whether that’s in horizontal (breaking a line of text into paragraphs) or vertical (breaking paragraphs into pages).
Since at the end of the \k it’s in horizontal mode, inserting it after the \k says ‘don’t start a new paragraph here’. TeX then meets the \p or \m which includes in its definition “If we are in horizontal mode, fill the paragraph with whatever has been specified and \penalty -10000”, and so it breaks there instead (even if there were no end-of-par fill, penalties are not cumulative, so it would obediently not break at the 10000 and obediently break at the -10000).
FWIW2, Don’t get tempted to try to make a hook to try to insert a paragraph break after a character style. I tried it several ways, and concluded that it just gets the code really really confused if you ask it to set up a new paragraph while it’s processing the end of a character style.
Traducción automática desde English