Acontece que adicionar o \b após o \pc não funcionou. (Também foi absorvido pelo \nobreak.) Então pensei em adicionar um novo parágrafo com um espaço sem quebra como este:
'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p \u00a0\2' Mas isso também parece ser absorvido. Se eu transformar o espaço sem quebra em um caractere real "x", então o espaçamento fica mais ou menos certo... mas também coloca um "x" na saída!
'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p x\2' Existe algo que eu possa colocar no parágrafo que seja invisível, mas que não seja absorvido pelo \nobreak? Jeff
ATUALIZAÇÃO: Bem, acontece que um espaço estreito sem quebra é invisível e não é absorvido:
'(\\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
Tradução automática de English Mostrar original