4

Problem

When trying to set up drop-cap for the first word of a paragraph, the characters do not maintain the right-to-left alignment.

Questions

  1. How do you align Right-to-Left in the setupintial command?
  2. How do you setupinitial for words that include other characters, like Hebrew words that include vowels?
  3. How do you setupinitial by using spaces to delimit the words?

Code examples and images of output

\setupdirections[bidi=on] \setupinitial[n=2, text={וְעַל}, method=auto ] \placeinitial וְעַל הַכֹּל יְהֹוָה אֱלֺהֵֽינוּ אֲנַֽחְנוּ מוֹדִים לָךְ וּמְבָרְ֒כִים אוֹתָךְ יִתְבָּרַךְ שִׁמְךָ בְּפִי כָּל־חַי תָּמִיד לְעוֹלָם וָעֶד כַּכָּתוּב וְאָכַלְתָּ וְשָׂבָֽעְתָּ וּבֵרַכְתָּ אֶת־יְהֹוָה אֱלֺהֶֽיךָ עַל־הָאָֽרֶץ הַטּוֹבָה אֲשֶׁר נָתַן־לָךְ בָּרוּךְ אַתָּה יְהֹוָה עַל־הָאָֽרֶץ וְעַל־הַמָּזוֹן: 

Aligned Left-to-Right

The above illustrates that with the default of Left-to-Right alignment, the empty space is created on the left side of the page, but the words are printed on the right.

When adding setup align, the space is created for the initial on the right side of the paragraph, but the initial is placed over the words in the paragraph:

\setupalign[r2l] 

Aligned Right-to-Left

The above illustrates that the empty space is created in the correct place, but the drop-cap word is overlayed on the paragraph text itself and the characters are in reverse order still.

With the addition of a non-Hebrew character, such as ,, the Hebrew characters are arranged in the proper Right-to-Left order with the corresponding vowels in the correct place. However, the empty space is not created correctly, the comma (,) is placed over the other characters, and the inclusion of the non-Hebrew character is problematic.

\setupinitial[n=2, text={,וְעַל}, method=auto ] 

Additional comma to align correctly right-to-left

Version

ConTeXt ver: 2025.08.21 23:32 LMTX fmt: 2025.9.2 int: english/english

Background

Trying to make a bencher page with drop-caps similar to the following image.

Bencher Example with Drop-Cap words

Other notes

I assume something needs to change in tex/texmf-context/tex/context/base/mkiv/typo-drp.mkiv or tex/texmf-context/tex/context/base/mkiv/typo-drp.lua, but I'm not sure where or what. Or maybe the approach should be more aligned with custom lua code like this answer, https://tex.stackexchange.com/a/531391/417053.

Hebrew Font: https://fonts.google.com/noto/specimen/Noto+Sans+Hebrew?selection.family=Alef:wght@400;700|Frank+Ruhl+Libre:[email protected]|Heebo:[email protected]|Noto+Sans+Hebrew:[email protected]|Noto+Serif+Hebrew:[email protected]

Minimal file:

\definefontfeature[minimal][default][ script=hebr ] \definefontfamily[hebrew] [rm] [notosanshebrew] [features=minimal] \setupbodyfont[hebrew, 20pt] \setupalign[r2l] \starttext \setupinitial[n=2, text={וְעַל}, method=auto, ] \placeinitial וְעַל הַכֹּל יְהֹוָה אֱלֺהֵֽינוּ אֲנַֽחְנוּ מוֹדִים לָךְ וּמְבָרְ֒כִים אוֹתָךְ יִתְבָּרַךְ שִׁמְךָ בְּפִי כָּל־חַי תָּמִיד לְעוֹלָם וָעֶד כַּכָּתוּב וְאָכַלְתָּ וְשָׂבָֽעְתָּ וּבֵרַכְתָּ אֶת־יְהֹוָה אֱלֺהֶֽיךָ עַל־הָאָֽרֶץ הַטּוֹבָה אֲשֶׁר נָתַן־לָךְ בָּרוּךְ אַתָּה יְהֹוָה עַל־הָאָֽרֶץ וְעַל־הַמָּזוֹן: \stoptext 

Thanks in advance for any suggestions and help!

4
  • Not by computer, buy does it help to add a comma directly after auto in the setup? (Can you add a complete example, best with a fonts that comes with the minimal installation) Commented Nov 2 at 15:41
  • After a small patch from Hans I get this (I tried with dejavu sans, maybe I messed up some Hebrew, sorry in that case). So, I think you have to have patience and wait for the next upload. (And please test it then!) Commented Nov 2 at 20:38
  • Oh cool and thank you! Can you please share where the patch is? Then, I could try it out on my version of Context, right? Commented Nov 2 at 20:50
  • Sorry, I overwrote the file and do not remember the details. But there will probably be a release soon enough... Commented Nov 2 at 20:55

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.