Text alignment for [heb] tag
- Jason Hare
- Posts: 1923
- Joined: Mon Sep 30, 2013 5:07 am
- Location: Tel Aviv, Israel
- Contact:
Text alignment for [heb] tag
Just wanted to suggest that you add dir="rtl" to the heb tag. This would help it with placement of geresh and punctuation at the end of lines or words.
Would it be possible with the phpBB software?
Thanks!
Would it be possible with the phpBB software?
Thanks!
Jason Hare
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
- Kirk Lowery
- Site Admin
- Posts: 363
- Joined: Fri Aug 09, 2013 12:03 pm
- Location: Philadelphia, Pennsylvania
- Contact:
Re: Text alignment for [heb] tag
Jason,
We can do any html. Is "dir-rtl" an attribute for the <span> tag?
We can do any html. Is "dir-rtl" an attribute for the <span> tag?
- Jason Hare
- Posts: 1923
- Joined: Mon Sep 30, 2013 5:07 am
- Location: Tel Aviv, Israel
- Contact:
Re: Text alignment for [heb] tag
Yes. "dir" is an attribute that can be added to any regular HTML tag.Kirk Lowery wrote:Jason,
We can do any html. Is "dir-rtl" an attribute for the <span> tag?
Code: Select all
<span style="font-family: SBL BibLit, SBL Hebrew, Times New Roman; font-size: 12pt;" dir="rtl">
Code: Select all
style="direction: rtl; unicode-bidi: embed;"
Thanks!
Jason Hare
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
- Kirk Lowery
- Site Admin
- Posts: 363
- Joined: Fri Aug 09, 2013 12:03 pm
- Location: Philadelphia, Pennsylvania
- Contact:
Re: Text alignment for [heb] tag
I've added the attribute to the tag. Jason, could you please check (or even post test cases here), to verify it's working as you'd expect?
Thanks!
Thanks!
- Jason Hare
- Posts: 1923
- Joined: Mon Sep 30, 2013 5:07 am
- Location: Tel Aviv, Israel
- Contact:
Re: Text alignment for [heb] tag
בודק את הקוד. תודה רבה!
It works perfectly. Thanks a lot.
It works perfectly. Thanks a lot.
Jason Hare
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
- Kirk Lowery
- Site Admin
- Posts: 363
- Joined: Fri Aug 09, 2013 12:03 pm
- Location: Philadelphia, Pennsylvania
- Contact:
Re: Text alignment for [heb] tag
Jason,Jason Hare wrote:This would help it with placement of geresh and punctuation at the end of lines or words.
Have you checked geresh and other punctuation with cantillated text? Does it meet your expectations?
- Jason Hare
- Posts: 1923
- Joined: Mon Sep 30, 2013 5:07 am
- Location: Tel Aviv, Israel
- Contact:
Re: Text alignment for [heb] tag
All cantillation works according to the settings of the font, not the layout of the code. Because it's coded to SBL Hebrew, it works according to the font specifications.Kirk Lowery wrote:Jason,Jason Hare wrote:This would help it with placement of geresh and punctuation at the end of lines or words.
Have you checked geresh and other punctuation with cantillated text? Does it meet your expectations?
Here's a check:
אַ֥שְֽׁרֵי הָאִ֗ישׁ אֲשֶׁ֤ר ׀ לֹ֥א הָלַךְ֮ בַּֽעֲצַ֪ת רְשָׁ֫עִ֥ים
וּבְדֶ֣רֶךְ חַ֭טָּאִים לֹ֥א עָמָ֑ד וּבְמוֹשַׁ֥ב לֵ֝צִ֗ים לֹ֣א יָשָֽׁב׃
Even alignment wouldn't be affected here, since the sof-pasuk is encoded automatically for right-to-left, unlike periods and commas, which are common to the English keyboard.
The issue in the example that I just posted is line-height, which isn't wide enough to allow for the points and cantillation. Can you see the issue on your side?
Jason Hare
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
- Kirk Lowery
- Site Admin
- Posts: 363
- Joined: Fri Aug 09, 2013 12:03 pm
- Location: Philadelphia, Pennsylvania
- Contact:
Re: Text alignment for [heb] tag
I see two problems here: the line spacing as you mentioned, and the text is not right-aligned.
Is there an html attribute for line spacing, ideally something we can increase by something more granular than "line and a half; double spaced", in picas or inches, mm or something?
As for the alignment problem, I thought I had tested this. There are two conditions to deal with: (1) inline Hebrew text surrounded by Latin text; (2) a paragraph of Hebrew only. I wonder if the dir attribute is confusing the UTF-8 bidi algorithm...
I'll do more research on this.
Is there an html attribute for line spacing, ideally something we can increase by something more granular than "line and a half; double spaced", in picas or inches, mm or something?
As for the alignment problem, I thought I had tested this. There are two conditions to deal with: (1) inline Hebrew text surrounded by Latin text; (2) a paragraph of Hebrew only. I wonder if the dir attribute is confusing the UTF-8 bidi algorithm...
I'll do more research on this.
- Kirk Lowery
- Site Admin
- Posts: 363
- Joined: Fri Aug 09, 2013 12:03 pm
- Location: Philadelphia, Pennsylvania
- Contact:
Re: Text alignment for [heb] tag
I've resolved (at least for my display) the line spacing issue. Jason, check it out: your text should now have sufficient space. The attribute is line-height and I've set it to 130%.
- Jason Hare
- Posts: 1923
- Joined: Mon Sep 30, 2013 5:07 am
- Location: Tel Aviv, Israel
- Contact:
Re: Text alignment for [heb] tag
The line-height is now fine. Thanks.Kirk Lowery wrote:I see two problems here: the line spacing as you mentioned, and the text is not right-aligned.
Is there an html attribute for line spacing, ideally something we can increase by something more granular than "line and a half; double spaced", in picas or inches, mm or something?
As for the alignment problem, I thought I had tested this. There are two conditions to deal with: (1) inline Hebrew text surrounded by Latin text; (2) a paragraph of Hebrew only. I wonder if the dir attribute is confusing the UTF-8 bidi algorithm...
I'll do more research on this.
If you want a paragraph aligned on the right, you need to add / dir="rtl" / to an entire <p> tag or <div> tag - not to a <span> tag, which doesn't govern an entire chunk of text in the same sense.
On my forum, I created the tags / he / for Hebrew text within English text and / hep / (that is, "Hebrew Paragraph") for text that needs to be aligned on the right.
The way your forum is currently set up, you could just use the right-alignment tag to align it on the right:
אַ֥שְֽׁרֵי הָאִ֗ישׁ אֲשֶׁ֤ר ׀ לֹ֥א הָלַךְ֮ בַּֽעֲצַ֪ת רְשָׁ֫עִ֥ים
וּבְדֶ֣רֶךְ חַ֭טָּאִים לֹ֥א עָמָ֑ד וּבְמוֹשַׁ֥ב לֵ֝צִ֗ים לֹ֣א יָשָֽׁב׃
That is:וּבְדֶ֣רֶךְ חַ֭טָּאִים לֹ֥א עָמָ֑ד וּבְמוֹשַׁ֥ב לֵ֝צִ֗ים לֹ֣א יָשָֽׁב׃
Code: Select all
[right][heb]אַ֥שְֽׁרֵי הָאִ֗ישׁ אֲשֶׁ֤ר ׀ לֹ֥א הָלַךְ֮ בַּֽעֲצַ֪ת רְשָׁ֫עִ֥ים
וּבְדֶ֣רֶךְ חַ֭טָּאִים לֹ֥א עָמָ֑ד וּבְמוֹשַׁ֥ב לֵ֝צִ֗ים לֹ֣א יָשָֽׁב׃[/heb][/right]
Jason
Jason Hare
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳
Tel Aviv, Israel
The Hebrew Café
יוֹדֵ֣עַ צַ֭דִּיק נֶ֣פֶשׁ בְּהֶמְתּ֑וֹ וְֽרַחֲמֵ֥י רְ֝שָׁעִ֗ים אַכְזָרִֽי׃
ספר משלי י״ב, י׳