Acabei de identificar a causa de uma falha no projeto de alguém em uma linha. Infelizmente, houve um equívoco quando alguém estava escrevendo o modelo para livros FRT, e essa linha foi incluída:
\rem sorta will sort by \toc1, sortb by \toc2, sortc by \toc3
Isso é praticamente garantido para causar uma falha / comportamento indefinido.
Se você tiver um Front matter que inclua essa linha, altere-a para que leia:
\rem sorta will sort by toc1, sortb by toc2 , sortc by toc3
Ou seja, remova as barras. Caso contrário, você terá falhas.
As versões anteriores do padrão USFM eram um pouco vagas, mas o Paratext e o padrão USFM-3 NÃO descrevem \rem como 'ignorar o resto desta linha', mas como um estilo de parágrafo que não produz saída.
Isso significa:
-
\rem continua até o próximo marcador de parágrafo
-
\rem ainda precisa processar quaisquer marcadores que contenha. (de outra forma, como ele detectaria o próximo marcador de parágrafo?).
- Como
\toc1 e afins também são descritos como marcadores de parágrafo (embora não sejam usados como tal), eles devem cancelar \rem
I’ve just tracked down the cause of a crash on someone’s project to a line Unfortunately there was a think-o when someone was writing the template for FRT books, and this line was included:
\rem sorta will sort by \toc1, sortb by \toc2, sortc by \toc3
This is pretty much guaranteed to cause a crash / undefined behaviour.
If you have a Front matter that includes that line, change it so that it reads:
\rem sorta will sort by toc1, sortb by toc2 , sortc by toc3
I.e. remove the slashes. Otherwise you will experience crashes.
Earlier versions of the USFM standard were a bit vague, but Paratext and the USFM-3 standard do NOT describe \rem as ‘ignore the rest of this line’, but as a paragraph style that produces no output.
This means:
-
\rem continues until the next paragraph marker
-
\rem still has to process any markers it contains. (how else will it spot the next paragraph-marker?).
- Since
\toc1 and friends are also described as paragraph markers (although not used as such) they should cancel \rem
Tradução automática de English