0 votes

This question has essentially been asked but not answered here also.

Can milestone markers be used to style text?
If so, what’s the syntax in the custom.sty file? So far I haven’t gotten anything to work.

If the answer is “no”, then I’m curious to know what the actual use case of milestones is.


For example, we mark quotations by using a different font, so our custom.sty sheet includes

\Marker qt
\Fontname Scheherazade

The reason we don’t love this system is because character styles are supposed to be opened and closed whenever you get to non-character styles, which means a quote that spans verses or has a footnote in the middle of it requires lots of extra markers.
\v 2 \qt here's a long quotation\qt*\f + \ft footnote\f* \qt and then the continuation of it.\qt*
\v 3 \qt but then it goes to a new verse.\qt*
\v 4 \qt And another one.\qt*

This would be a whole lot nicer
\v 2 \qt-s\* here's a long quotation\f + \ft footnote\f* and then the continuation of it.
\v 3 but then it goes to a new verse.
\v 4 And another one.\qt-e\*

Paratext by (1.8k points)
reshown

1 Answer

0 votes
Best answer

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.

by (1.8k points)
reshown

Thank you. The regexes are certainly amazing, and I’ll test them out.

However, I still have my original questions regarding milestones.

  1. Can they be styled?
  2. If they can’t fix this sort of proliferation-of-markers problem, what are they actually used for?

Short answer, you cannot style milestones in Paratext since they are self closing. They have no content (though they might have attributes.
Of course there is nothing would prevents you from setting up a typesetting or display system that applies a different style sheet between milestones.

Related questions

0 votes
3 answers
Paratext Mar 30, 2023 asked by Paul (615 points)
+1 vote
1 answer
Paratext Dec 8, 2020 asked by Matthew_Lee (231 points)
0 votes
1 answer
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
And over all these virtues put on love, which binds them all together in perfect unity.
Colossians 3:14
2,618 questions
5,350 answers
5,037 comments
1,421 users