Text alignment for [heb] tag

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Text alignment for [heb] tag

Re: Text alignment for [heb] tag

Post by Kirk Lowery » Tue Oct 01, 2013 7:06 pm

Outstanding. That resolves that issue, then.

Thanks, Jason!

Re: Text alignment for [heb] tag

Post by Jason Hare » Tue Oct 01, 2013 4:35 pm

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.


The line-height is now fine. Thanks.

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]


Hope this helps.

Jason

Re: Text alignment for [heb] tag

Post by Kirk Lowery » Tue Oct 01, 2013 8:48 am

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%.

Re: Text alignment for [heb] tag

Post by Kirk Lowery » Tue Oct 01, 2013 8:42 am

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.

Re: Text alignment for [heb] tag

Post by Jason Hare » Mon Sep 30, 2013 9:55 pm

Kirk Lowery wrote:
Jason Hare wrote:This would help it with placement of geresh and punctuation at the end of lines or words.

Jason,

Have you checked geresh and other punctuation with cantillated text? Does it meet your expectations?


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.

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?

Re: Text alignment for [heb] tag

Post by Kirk Lowery » Mon Sep 30, 2013 5:18 pm

Jason Hare wrote:This would help it with placement of geresh and punctuation at the end of lines or words.

Jason,

Have you checked geresh and other punctuation with cantillated text? Does it meet your expectations?

Re: Text alignment for [heb] tag

Post by Jason Hare » Mon Sep 30, 2013 11:31 am

בודק את הקוד. תודה רבה!

It works perfectly. Thanks a lot. :)

Re: Text alignment for [heb] tag

Post by Kirk Lowery » Mon Sep 30, 2013 10:40 am

I've added the attribute to the [heb] tag. Jason, could you please check (or even post test cases here), to verify it's working as you'd expect?

Thanks!

Re: Text alignment for [heb] tag

Post by Jason Hare » Mon Sep 30, 2013 9:08 am

Kirk Lowery wrote:Jason,

We can do any html. Is "dir-rtl" an attribute for the <span> tag?


Yes. "dir" is an attribute that can be added to any regular HTML tag.

Code: Select all

<span style="font-family: SBL BibLit, SBL Hebrew, Times New Roman; font-size: 12pt;" dir="rtl">


There is also a style (CSS) tag that can be added for bidirectionality.

Code: Select all

style="direction: rtl; unicode-bidi: embed;"


This can be added if you're using CSS.

Thanks!

Re: Text alignment for [heb] tag

Post by Kirk Lowery » Mon Sep 30, 2013 8:56 am

Jason,

We can do any html. Is "dir-rtl" an attribute for the <span> tag?

Top