J’ai récemment identifié la cause d’un plantage sur le projet de quelqu’un à une ligne. Malheureusement, il y a eu une erreur de la part de la personne qui rédigeait le modèle pour les livres FRT, et cette ligne a été incluse :
\rem sorta will sort by \toc1, sortb by \toc2, sortc by \toc3
Cela est pratiquement garanti de provoquer un plantage / un comportement indéfini.
Si votre Front matter contient cette ligne, modifiez-la pour qu’elle lise :
\rem sorta will sort by toc1, sortb by toc2 , sortc by toc3
C’est-à-dire supprimez les barres obliques. Sinon, vous rencontrerez des plantages.
Les versions antérieures de la norme USFM étaient un peu vagues, mais Paratext et la norme USFM-3 ne décrivent PAS \rem comme « ignorer le reste de cette ligne », mais comme un style de paragraphe qui ne produit aucune sortie.
Cela signifie :
-
\rem continue jusqu’au marqueur de paragraphe suivant
-
\rem doit toujours traiter les marqueurs qu’il contient. (Comment sinon repérerait-il le prochain marqueur de paragraphe ?).
- Étant donné que
\toc1 et ses homologues sont également décrits comme des marqueurs de paragraphe (bien qu’ils ne soient pas utilisés comme tels), ils devraient annuler \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
Traduit automatiquement depuis English