Superscripted Honorifics

Honorifics should appear after the names of respected people. We would like them to appear as superscripted full calligraphy. The ones that we plan to use are visible in most word processing software but not in Paratext. Do you know how these can be added into the app?

See attached photo for a sample of how the calligraphy appears superscripted after names of important characters.

If the superscripted text is placed in some unique character markup then that character style can be styled to be Superscripted. I don’t know what you have used to know what to suggest.

If you use one unknown to USFM then you will need to create the style from scratch. You will probably need to figure out the CSS styling to insert the look you want.

Ian has the right idea, and I did a quick test to prove the concept. I looked for an SFM marker that could be co-opted for this purpose and chose \sig … \sig*, which is supposed to be used for a signature. (Maybe someone else will suggest a more appropriate SFM, but this seemed close enough, at least for proof of concept.) I found the character code of the honorific I wanted to use in the honorific font (I’m using Khorasan Honorifics, which I think is what you are also using), in my case I wanted character U+E002. So I put the cursor in Paratext where I wanted the honorific and I typed “\sig E002” then typed Alt+X to turn that into the character U+E002 (just a box at this point), then typed “\sig*”. I found that sometimes Paratext shifted the cursor to the end of the line before I typed Alt+X, so if it doesn’t work try again or try to put the cursor right after the “2” and try again. It’s a little fiddly to work with LTR text within RTL text, and what is on the screen looks like it is out of order. This is what I ended up with:

image

Then I loaded my text into SAB, and used the Fonts area, went to the Font Files tab and clicked on Add Font… I called the Family “honorific”, and loaded the “KhorasanHonorifics.ttf” file. Then I went to the Styles area and in the Text Styles tab went down to the Special Text section and found “span.sig”. I double-clicked on that and changed font-family to “honorific” and font-style to “normal”. I built the app and got this:

It looks from your example that you superscript the honorific. I don’t see a way in the Style Properties tab to get that directly, but I imagine that there is a CSS property that you can put in the CSS tab to accomplish that. A quick Internet search suggests that “vertical-align: super” might work, but it may not be as simple as that. Do your own search and try to figure out something that works, and please report it back here for others.

My curiosity got the best of me… so I tried out the CSS code mentioned above:
image
And it does indeed seem to superscript:

Note that the extra gymnastics described in the previous post assume that the honorific ligatures that you want are not in the same font as the font you are using for your text. If your text font has the honorifics you need in it, then you just need to use the Alt+X trick to insert the right code point.

Thanks for the help (I am working with David Miller on this project). This solution seems to work well.

One more question. We are using a Biblical Module file. When we add the \sig SFM markers in the text of a regular book, it can create problems in the Module file. If we replace a string of text in the module that has the \sig SFM marker, then the Replace command doesn’t work right in the Module file. Is there a way to make this work?

I’m not sure if I would be able to help you with this. But it would be helpful if you provided more detail, like step-by-step what you are doing (including text/SFMs) and what problem you are seeing.

@dvdp Is your last question related to Paratext or SAB?

The question is about Paratext, but of course it affects our SAB output.

Here is an example of what I am talking about:

In Luke 1:5 we have the following for Aaron’s name with an honorific. Previously before the solution you (Jeff) showed us, we had just been writing the honorific with a set of parentheses and the first letter of the honorific, as follows (I will do this in English because RTL Arabic script doesn’t seem to be working well in this box.)
Aaron (a)

Say for example, we wanted to change this in the Biblical Module file to a pronoun instead of his name. In the Module file, under the reference that includes this verse from Luke 1, I would put a Replace command as follows:

\rep Aaron (a) => He (a)

With this command, Aaron’s name in this verse would be replaced by “He” in the Module output.

Now, when in the Luke file, we replace the textual “(a)” honorific with the SFM markup Jeff showed, you now have in Luke, where the box is the special character from the Khorasan font:

Aaron /sig/sig*

When you try to replace this in the Module file and write:

/rep Aaron /sig/sig* => He /sig/sig*

it doesn’t work and you get an error. It seems the Replace command cannot deal with SFM markers within what it is replacing.

I have encountered this with other SFM markers as well, such as /q1 that came in the middle of a verse. In replacing text in that verse, it gave me an error.

So my question is: Is there a way to replace text in a Module file that will allow the SFM markers to remain?
In our text, we have many replacements because we are doing a Harmony product and we need to make adjustments here and there on which parts of verses to include.

This should start with a backslash. Sorry I typed it wrong in the first message.

I worked on this today, and I think the problem is solved.

Are the replacements happening in Paratext or SAB.