Cerrar y abrir estilos puede ser realmente molesto, pero no hay forma de evitarlo. El mismo problema se aplica a la marcaje de letras rojas \wj …\wj*. Creé la siguiente expresión regular de Regex Pal para insertar los marcadores de cierre y apertura \wj* …\wj donde sea necesario. Solo necesita marcar el inicio y el final de un tramo de texto con \wj y \wj*. Cuando se ejecuta la expresión regular, inserta los marcadores intermedios alrededor de notas al pie, referencias cruzadas, encabezados y números de versículo, pero no de números de capítulo. Debe cerrar y reiniciar manualmente alrededor de los capítulos.
Buscar:
(?<=\\wj\s)(?s)((?!\\wj\*).)*(?=\u200F*\\wj\*):::((\s*(\\(b|p\w*|mi?|q\w*)\s|(\\(m?r|m?s\w*)\s.*)+|\s+\\v\s\S+\s|\\(x|ef|f|add)\s.*?\\(x|ef|f|add)\*))+)(\s*)
Reemplazar (hay un espacio al final del reemplazo):
\\wj*\1\9\\wj\u0020
Puede modificarla para hacer lo mismo con \qt:
(?<=\\qt\s)(?s)((?!\\qt\*).)*(?=\u200F*\\qt\*):::((\s*(\\(b|p\w*|mi?|q(?!t)\w*)\s|(\\(m?r|m?s\w*)\s.*)+|\s+\\v\s\S+\s|\\(x|ef|f|add)\s.*?\\(x|ef|f|add)\*))+)(\s*)
Reemplazar:
\\qt*\1\9\\qt\u0020
El \u200F se incluye para hacerla compatible con escrituras RTL.
Closing and opening styles can be a real pain but there is really no way around it. The same issue applies to red-letter markup \wj …\wj*. I created the following Regex Pal regex to insert closing and opening \wj* …\wj markers where needed. You only need to mark the beginning and end of a text span with \wj and \wj* When you run the regex it puts in the intermediate markers around footnotes, cross-references, headings, and verse numbers, but not chapter numbers. You must manually close and restart around chapters.
Find:
(?<=\\wj\s)(?s)((?!\\wj\*).)*(?=\u200F*\\wj\*):::((\s*(\\(b|p\w*|mi?|q\w*)\s|(\\(m?r|m?s\w*)\s.*)+|\s+\\v\s\S+\s|\\(x|ef|f|add)\s.*?\\(x|ef|f|add)\*))+)(\s*)
Replace (there is a a space at the end of the replace):
\\wj*\1\9\\wj\u0020
You can modify it to do the same with \qt:
(?<=\\qt\s)(?s)((?!\\qt\*).)*(?=\u200F*\\qt\*):::((\s*(\\(b|p\w*|mi?|q(?!t)\w*)\s|(\\(m?r|m?s\w*)\s.*)+|\s+\\v\s\S+\s|\\(x|ef|f|add)\s.*?\\(x|ef|f|add)\*))+)(\s*)
Replace:
\\qt*\1\9\\qt\u0020
The \u200F is included to make it compatible with RTL scripts.
Traducción automática desde English