Il s'avère que l'ajout du \b après le \pc n'a pas fonctionné. (Il a également été absorbé par le \nobreak.) J'ai donc pensé ajouter un nouveau paragraphe avec une espace insécable comme ceci :
'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p \u00a0\2'
Mais cela semble également être absorbé. Si je remplace l'espace insécable par un vrai caractère "x", l'espacement est à peu près correct... mais cela met aussi un "x" dans la sortie !
'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p x\2'
Y a-t-il quelque chose que je peux mettre dans le paragraphe qui serait invisible, mais qui ne serait pas absorbé par le \nobreak ?
Jeff
MISE À JOUR : Eh bien, il s'avère qu'une espace insécable étroite est invisible et n'est pas absorbée :
'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p \u202f\2'
Jeff
It turns out the adding the \b after the \pc didn't work. (It also got absorbed by the \nobreak.) So I thought I would add a new paragraph with a no-break space like this:
'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p \u00a0\2'
But that also seems to get absorbed. If I make the no-break space into a real character "x", then the spacing works out about right... but it also puts an "x" in the output!
'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p x\2'
Is there something I can put in the paragraph that would be invisible, but would not get absorbed by the \nobreak?
Jeff
UPDATE: Well, it turns out that a narrow no-break space is invisible and doesn't get absorbed:
'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p \u202f\2'
Jeff
Traduit automatiquement depuis English