Rubies: Is it possible to selectively add small caps?

Hi,

this is a follow up question to How to type glosses.

In the answer to the question above, it was recommended to (ab)use the Rubies feature for Asian Phonetic Guide in order to write linguistic glosses. The issue is that in linguistics, we want to align the words in a sentence with a literal gloss, as in

Temo que esto parece mal 
fear.1SG.PRES.IND COMPL this.MASC seem.3SG.PRES.IND bad

The alignment with rubies works very well. However, it is generally required that the grammatical markers (that is, everything that appears in upper case in the gloss line) be in small caps, and not in upper case.

A professionally typeset example looks as follows (example taken from the standard guide at https://www.eva.mpg.de/lingua/pdf/Glossing-Rules.pdf; note the small caps for OBL-GEN and FUT-NEG):

I do not see any possibilty to do this in rubies, as I only seem to be able to attribute one style to the rubies text. Is there a way of typesetting the example above with rubies – with its mixture of normal text and small caps, or would I have to use a table in order to get this? I would much prefer to use rubies, since I would not have to worry about what happens with longer examples.

There is one possibility I’d call a very ugly hack.

Since you can only globally style a rubi, you must attach several rubies to a word. each rubi can then be assigned its own character style.

The attached sample file shows two attempts on words “lorem ipsum”.

  • “Lorem”: I attached a rubi on letter “L” with “lorem” in Rubies style and “acc-sg” (accusative singular) on letter “o” with styke Source Text modified for red and small caps.

  • “ipsum”: to avoid the expansion between the letters of the previous example, I attached “ipsum” to “ipsu” and “adj-acc” to “m”

This proves that your design can be done albeit to the cost of a heavy manual tuning to choose the range to which the rubi will be applied. You’ll have to experiment.

In case your word is too short, you should extend it with a duly chosen character. I tried with various space characters but it does not work. Apparently a printable character is needed.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

This is a nice try, but this method will make it difficult to link the roman and the small caps (which should be attached, either by a hyphen or a point).

I was wondering if there would be a possibility of creating a character style which would leave lower case caracters as is, but transform any upper case letter into small-caps?

No, a character style cannot be made character context-sensitive.

OK, thanks. I think I will go for tables, then.