You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jason Harrop <jh...@gmail.com> on 2014/03/19 07:12:17 UTC

right align arabic in table-cell

Hi, What's the correct way to write align a block of arabic in an
individual table-cell?

I found that with writing-mode="rl-tb", it was also necessary to add
text-align="end"

           <fo:table-cell >
              <fo:block  text-align="end" writing-mode="rl-tb">
                  <inline font-family="Arial">المدينة</inline>
              </fo:block>
            </fo:table-cell>

thanks .. Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: right align arabic in table-cell

Posted by Jason Harrop <jh...@gmail.com>.
I can't make it right align using a nested table as a hack (using
fop-20140319.jar)

I tried various things, but essentially:

      <fo:table width="4.12in">
        <fo:table-column column-number="1" column-width="2.19in"/>
        <fo:table-column column-number="2" column-width="1.94in"/>
        <fo:table-body start-indent="0in">
          <fo:table-row>
            <fo:table-cell >

              <table xmlns="http://www.w3.org/1999/XSL/Format"
width="2in" writing-mode="rl-tb">
                <table-column column-number="1" column-width="2in"/>
                <table-body>
                  <table-row>
                    <table-cell>
                      <block>
                        <inline font-size="11.0pt">ONEالمدينة</inline>
                      </block>
                    </table-cell>
                  </table-row>
                </table-body>
              </table>

            </fo:table-cell>

            <fo:table-cell >
              <block xmlns="http://www.w3.org/1999/XSL/Format" >
                <inline font-size="11.0pt">blah</inline>
              </block>
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>

It does work when @writing-mode is on a table which isn't nested; is
there some logic by which nested tables work differently?


On Thu, Mar 20, 2014 at 3:22 PM, Jason Harrop <jh...@gmail.com> wrote:
> Bummer.  I guess I could nest a table in the table-cell.  Any reason
> that wouldn't work?
>
> On Thu, Mar 20, 2014 at 2:33 PM, Glenn Adams <gl...@skynav.com> wrote:
>>
>>
>> On Wed, Mar 19, 2014 at 5:44 PM, Jason Harrop <jh...@gmail.com> wrote:
>>>
>>> Hi Glenn
>>>
>>> Thanks very much for that.
>>>
>>> So the following should right align in the table cell?
>>>
>>>             <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">
>>>
>>>               <block-container writing-mode="rl-tb">
>>>                 <block>
>>>                   <inline>المدينة</inline>
>>>                 </block>
>>>               </block-container>
>>>             <table-cell>
>>>
>>> But  that didn't work in FOP 1.1 nor with
>>> http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar
>>
>>
>> No. I guess I wasn't plain enough. You need to put writing mode on table to
>> affect the table cells. What you've done above doesn't change the start/end
>> edges of the cell, just the start/end edges of the content in the cell. The
>> cell still maps start to left and end to right. Note that you have to make
>> the choice on the table as a whole.
>>
>>>
>>>
>>>
>>> (Refer May 2011 thread "Complex Script, BIDI text supported?")
>>>
>>> cheers .. Jason
>>>
>>>
>>>
>>> On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com> wrote:
>>> > Per XSL-FO 1.1 [1]:
>>> >
>>> > "Property writing-mode applies to: fo:page-sequence,
>>> > fo:simple-page-master,
>>> > fo:region-body, fo:region-before, fo:region-after, fo:region-start,
>>> > fo:region-end, fo:block-container, fo:inline-container, and fo:table."
>>> >
>>> > As you can, none of these is fo:block. You need to specify it on
>>> > fo:table or
>>> > something higher up the tree. Note that specifying a RTL WM on fo:table
>>> > causes columns to be numbered from right to left, i.e., the first column
>>> > will be right-most.
>>> >
>>> > [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
>>> >
>>> >
>>> >
>>> >
>>> > On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Hi, What's the correct way to write align a block of arabic in an
>>> >> individual table-cell?
>>> >>
>>> >> I found that with writing-mode="rl-tb", it was also necessary to add
>>> >> text-align="end"
>>> >>
>>> >>            <fo:table-cell >
>>> >>               <fo:block  text-align="end" writing-mode="rl-tb">
>>> >>                   <inline font-family="Arial">المدينة</inline>
>>> >>               </fo:block>
>>> >>             </fo:table-cell>
>>> >>
>>> >> thanks .. Jason
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>> >>
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: right align arabic in table-cell

Posted by Jason Harrop <jh...@gmail.com>.
Hi Glenn

Thanks for this; it works nicely.

In the mixed LTR and RTL content in the same table case:-

Word's pPr/bidi maps to block/@text-align="right"

Word's rPr/rtl maps to bidi-override (with the attributes you provided).

cheers .. Jason


On Fri, Mar 21, 2014 at 8:41 AM, Glenn Adams <gl...@skynav.com> wrote:
>
> On Thu, Mar 20, 2014 at 2:03 PM, Jason Harrop <jh...@gmail.com> wrote:
>>
>> Its a  Word document I'm converting to FO, and in it, bidi is a
>> paragraph level property:
>>
>>      http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/bidi_1.html
>>
>> The table in question contains some cells with English content (left
>> aligned), and others with Arabic content (in Word, these ones are
>> right aligned by the bidi property).
>
>
> I'm not familiar with WordML, but basically, you need to decide whether the
> table is a LTR or RTL table, which will determine (ignoring vertical modes):
>
> whether columns proceed from LTR or RTL
> the mapping of WM relative properties *-start and *-end to absolute
> directions -*left and *-right.
> the default paragraph bidi level for content in the scope of the table (that
> doesn't have an overriding WM, e.g., that might be specified in a descendant
> block-container);
>
> If you want to mix LTR and RTL content in the same table, you will need to
> specify appropriate overrides to produce the desired result:
>
> enclose the content of a block in a table-cell with bidi-override
> specify text-align="right" on RTL blocks in a LTR table cell
>
> For example, in a LTR table containing RTL cell content:
>
> <table writing-mode="ltr">
> ...
> <table-cell text-align="right">
> <block><bidi-override unicode-bidi="embed" direction="rtl">RTL content in a
> LTR table cell</bidi-override></block>
> </table-cell>
> ...
> </table>
>
> Note that text-align doesn't actually apply to table-cell, but rather,
> applies to block. However, we can write the text-align property on
> table-cell since it is inherited by its children. This might be useful if
> the cell contains multiple blocks and you don't want to specify text-align
> on them individually.
>
>>
>>
>> On Fri, Mar 21, 2014 at 1:26 AM, Glenn Adams <gl...@skynav.com> wrote:
>> >
>> >
>> >
>> > On Wed, Mar 19, 2014 at 10:22 PM, Jason Harrop <jh...@gmail.com>
>> > wrote:
>> >>
>> >> Bummer.  I guess I could nest a table in the table-cell.  Any reason
>> >> that wouldn't work?
>> >
>> >
>> > Why aren't you putting writing-mode on the original table? i.e., why use
>> > an
>> > inner table?
>> >
>> >>
>> >>
>> >> On Thu, Mar 20, 2014 at 2:33 PM, Glenn Adams <gl...@skynav.com> wrote:
>> >> >
>> >> >
>> >> > On Wed, Mar 19, 2014 at 5:44 PM, Jason Harrop <jh...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> Hi Glenn
>> >> >>
>> >> >> Thanks very much for that.
>> >> >>
>> >> >> So the following should right align in the table cell?
>> >> >>
>> >> >>             <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">
>> >> >>
>> >> >>               <block-container writing-mode="rl-tb">
>> >> >>                 <block>
>> >> >>                   <inline>المدينة</inline>
>> >> >>                 </block>
>> >> >>               </block-container>
>> >> >>             <table-cell>
>> >> >>
>> >> >> But  that didn't work in FOP 1.1 nor with
>> >> >>
>> >> >>
>> >> >> http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar
>> >> >
>> >> >
>> >> > No. I guess I wasn't plain enough. You need to put writing mode on
>> >> > table
>> >> > to
>> >> > affect the table cells. What you've done above doesn't change the
>> >> > start/end
>> >> > edges of the cell, just the start/end edges of the content in the
>> >> > cell.
>> >> > The
>> >> > cell still maps start to left and end to right. Note that you have to
>> >> > make
>> >> > the choice on the table as a whole.
>> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> (Refer May 2011 thread "Complex Script, BIDI text supported?")
>> >> >>
>> >> >> cheers .. Jason
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com>
>> >> >> wrote:
>> >> >> > Per XSL-FO 1.1 [1]:
>> >> >> >
>> >> >> > "Property writing-mode applies to: fo:page-sequence,
>> >> >> > fo:simple-page-master,
>> >> >> > fo:region-body, fo:region-before, fo:region-after,
>> >> >> > fo:region-start,
>> >> >> > fo:region-end, fo:block-container, fo:inline-container, and
>> >> >> > fo:table."
>> >> >> >
>> >> >> > As you can, none of these is fo:block. You need to specify it on
>> >> >> > fo:table or
>> >> >> > something higher up the tree. Note that specifying a RTL WM on
>> >> >> > fo:table
>> >> >> > causes columns to be numbered from right to left, i.e., the first
>> >> >> > column
>> >> >> > will be right-most.
>> >> >> >
>> >> >> > [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> Hi, What's the correct way to write align a block of arabic in an
>> >> >> >> individual table-cell?
>> >> >> >>
>> >> >> >> I found that with writing-mode="rl-tb", it was also necessary to
>> >> >> >> add
>> >> >> >> text-align="end"
>> >> >> >>
>> >> >> >>            <fo:table-cell >
>> >> >> >>               <fo:block  text-align="end" writing-mode="rl-tb">
>> >> >> >>                   <inline font-family="Arial">المدينة</inline>
>> >> >> >>               </fo:block>
>> >> >> >>             </fo:table-cell>
>> >> >> >>
>> >> >> >> thanks .. Jason
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail:
>> >> >> >> fop-users-unsubscribe@xmlgraphics.apache.org
>> >> >> >> For additional commands, e-mail:
>> >> >> >> fop-users-help@xmlgraphics.apache.org
>> >> >> >>
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> >> >> For additional commands, e-mail:
>> >> >> fop-users-help@xmlgraphics.apache.org
>> >> >>
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: right align arabic in table-cell

Posted by Glenn Adams <gl...@skynav.com>.
On Thu, Mar 20, 2014 at 2:03 PM, Jason Harrop <jh...@gmail.com> wrote:

> Its a  Word document I'm converting to FO, and in it, bidi is a
> paragraph level property:
>
>      http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/bidi_1.html
>
> The table in question contains some cells with English content (left
> aligned), and others with Arabic content (in Word, these ones are
> right aligned by the bidi property).
>

I'm not familiar with WordML, but basically, you need to decide whether the
table is a LTR or RTL table, which will determine (ignoring vertical modes):

   - whether columns proceed from LTR or RTL
   - the mapping of WM relative properties *-start and *-end to absolute
   directions -*left and *-right.
   - the default paragraph bidi level for content in the scope of the table
   (that doesn't have an overriding WM, e.g., that might be specified in a
   descendant block-container);

If you want to mix LTR and RTL content in the same table, you will need to
specify appropriate overrides to produce the desired result:

   - enclose the content of a block in a table-cell with bidi-override
   - specify text-align="right" on RTL blocks in a LTR table cell

For example, in a LTR table containing RTL cell content:

<table writing-mode="ltr">
...
<table-cell text-align="right">
<block><bidi-override unicode-bidi="embed" direction="rtl">RTL content in a
LTR table cell</bidi-override></block>
</table-cell>
...
</table>

Note that text-align doesn't actually apply to table-cell, but rather,
applies to block. However, we can write the text-align property on
table-cell since it is inherited by its children. This might be useful if
the cell contains multiple blocks and you don't want to specify text-align
on them individually.


>
> On Fri, Mar 21, 2014 at 1:26 AM, Glenn Adams <gl...@skynav.com> wrote:
> >
> >
> >
> > On Wed, Mar 19, 2014 at 10:22 PM, Jason Harrop <jh...@gmail.com>
> wrote:
> >>
> >> Bummer.  I guess I could nest a table in the table-cell.  Any reason
> >> that wouldn't work?
> >
> >
> > Why aren't you putting writing-mode on the original table? i.e., why use
> an
> > inner table?
> >
> >>
> >>
> >> On Thu, Mar 20, 2014 at 2:33 PM, Glenn Adams <gl...@skynav.com> wrote:
> >> >
> >> >
> >> > On Wed, Mar 19, 2014 at 5:44 PM, Jason Harrop <jh...@gmail.com>
> wrote:
> >> >>
> >> >> Hi Glenn
> >> >>
> >> >> Thanks very much for that.
> >> >>
> >> >> So the following should right align in the table cell?
> >> >>
> >> >>             <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">
> >> >>
> >> >>               <block-container writing-mode="rl-tb">
> >> >>                 <block>
> >> >>                   <inline>المدينة</inline>
> >> >>                 </block>
> >> >>               </block-container>
> >> >>             <table-cell>
> >> >>
> >> >> But  that didn't work in FOP 1.1 nor with
> >> >>
> >> >>
> http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar
> >> >
> >> >
> >> > No. I guess I wasn't plain enough. You need to put writing mode on
> table
> >> > to
> >> > affect the table cells. What you've done above doesn't change the
> >> > start/end
> >> > edges of the cell, just the start/end edges of the content in the
> cell.
> >> > The
> >> > cell still maps start to left and end to right. Note that you have to
> >> > make
> >> > the choice on the table as a whole.
> >> >
> >> >>
> >> >>
> >> >>
> >> >> (Refer May 2011 thread "Complex Script, BIDI text supported?")
> >> >>
> >> >> cheers .. Jason
> >> >>
> >> >>
> >> >>
> >> >> On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com>
> wrote:
> >> >> > Per XSL-FO 1.1 [1]:
> >> >> >
> >> >> > "Property writing-mode applies to: fo:page-sequence,
> >> >> > fo:simple-page-master,
> >> >> > fo:region-body, fo:region-before, fo:region-after, fo:region-start,
> >> >> > fo:region-end, fo:block-container, fo:inline-container, and
> >> >> > fo:table."
> >> >> >
> >> >> > As you can, none of these is fo:block. You need to specify it on
> >> >> > fo:table or
> >> >> > something higher up the tree. Note that specifying a RTL WM on
> >> >> > fo:table
> >> >> > causes columns to be numbered from right to left, i.e., the first
> >> >> > column
> >> >> > will be right-most.
> >> >> >
> >> >> > [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> Hi, What's the correct way to write align a block of arabic in an
> >> >> >> individual table-cell?
> >> >> >>
> >> >> >> I found that with writing-mode="rl-tb", it was also necessary to
> add
> >> >> >> text-align="end"
> >> >> >>
> >> >> >>            <fo:table-cell >
> >> >> >>               <fo:block  text-align="end" writing-mode="rl-tb">
> >> >> >>                   <inline font-family="Arial">المدينة</inline>
> >> >> >>               </fo:block>
> >> >> >>             </fo:table-cell>
> >> >> >>
> >> >> >> thanks .. Jason
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> >> >> >> For additional commands, e-mail:
> >> >> >> fop-users-help@xmlgraphics.apache.org
> >> >> >>
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> >> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> >> >>
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: right align arabic in table-cell

Posted by Jason Harrop <jh...@gmail.com>.
Its a  Word document I'm converting to FO, and in it, bidi is a
paragraph level property:

     http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/bidi_1.html

The table in question contains some cells with English content (left
aligned), and others with Arabic content (in Word, these ones are
right aligned by the bidi property).


On Fri, Mar 21, 2014 at 1:26 AM, Glenn Adams <gl...@skynav.com> wrote:
>
>
>
> On Wed, Mar 19, 2014 at 10:22 PM, Jason Harrop <jh...@gmail.com> wrote:
>>
>> Bummer.  I guess I could nest a table in the table-cell.  Any reason
>> that wouldn't work?
>
>
> Why aren't you putting writing-mode on the original table? i.e., why use an
> inner table?
>
>>
>>
>> On Thu, Mar 20, 2014 at 2:33 PM, Glenn Adams <gl...@skynav.com> wrote:
>> >
>> >
>> > On Wed, Mar 19, 2014 at 5:44 PM, Jason Harrop <jh...@gmail.com> wrote:
>> >>
>> >> Hi Glenn
>> >>
>> >> Thanks very much for that.
>> >>
>> >> So the following should right align in the table cell?
>> >>
>> >>             <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">
>> >>
>> >>               <block-container writing-mode="rl-tb">
>> >>                 <block>
>> >>                   <inline>المدينة</inline>
>> >>                 </block>
>> >>               </block-container>
>> >>             <table-cell>
>> >>
>> >> But  that didn't work in FOP 1.1 nor with
>> >>
>> >> http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar
>> >
>> >
>> > No. I guess I wasn't plain enough. You need to put writing mode on table
>> > to
>> > affect the table cells. What you've done above doesn't change the
>> > start/end
>> > edges of the cell, just the start/end edges of the content in the cell.
>> > The
>> > cell still maps start to left and end to right. Note that you have to
>> > make
>> > the choice on the table as a whole.
>> >
>> >>
>> >>
>> >>
>> >> (Refer May 2011 thread "Complex Script, BIDI text supported?")
>> >>
>> >> cheers .. Jason
>> >>
>> >>
>> >>
>> >> On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com> wrote:
>> >> > Per XSL-FO 1.1 [1]:
>> >> >
>> >> > "Property writing-mode applies to: fo:page-sequence,
>> >> > fo:simple-page-master,
>> >> > fo:region-body, fo:region-before, fo:region-after, fo:region-start,
>> >> > fo:region-end, fo:block-container, fo:inline-container, and
>> >> > fo:table."
>> >> >
>> >> > As you can, none of these is fo:block. You need to specify it on
>> >> > fo:table or
>> >> > something higher up the tree. Note that specifying a RTL WM on
>> >> > fo:table
>> >> > causes columns to be numbered from right to left, i.e., the first
>> >> > column
>> >> > will be right-most.
>> >> >
>> >> > [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> Hi, What's the correct way to write align a block of arabic in an
>> >> >> individual table-cell?
>> >> >>
>> >> >> I found that with writing-mode="rl-tb", it was also necessary to add
>> >> >> text-align="end"
>> >> >>
>> >> >>            <fo:table-cell >
>> >> >>               <fo:block  text-align="end" writing-mode="rl-tb">
>> >> >>                   <inline font-family="Arial">المدينة</inline>
>> >> >>               </fo:block>
>> >> >>             </fo:table-cell>
>> >> >>
>> >> >> thanks .. Jason
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> >> >> For additional commands, e-mail:
>> >> >> fop-users-help@xmlgraphics.apache.org
>> >> >>
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: right align arabic in table-cell

Posted by Glenn Adams <gl...@skynav.com>.
On Wed, Mar 19, 2014 at 10:22 PM, Jason Harrop <jh...@gmail.com> wrote:

> Bummer.  I guess I could nest a table in the table-cell.  Any reason
> that wouldn't work?
>

Why aren't you putting writing-mode on the original table? i.e., why use an
inner table?


>
> On Thu, Mar 20, 2014 at 2:33 PM, Glenn Adams <gl...@skynav.com> wrote:
> >
> >
> > On Wed, Mar 19, 2014 at 5:44 PM, Jason Harrop <jh...@gmail.com> wrote:
> >>
> >> Hi Glenn
> >>
> >> Thanks very much for that.
> >>
> >> So the following should right align in the table cell?
> >>
> >>             <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">
> >>
> >>               <block-container writing-mode="rl-tb">
> >>                 <block>
> >>                   <inline>المدينة</inline>
> >>                 </block>
> >>               </block-container>
> >>             <table-cell>
> >>
> >> But  that didn't work in FOP 1.1 nor with
> >>
> http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar
> >
> >
> > No. I guess I wasn't plain enough. You need to put writing mode on table
> to
> > affect the table cells. What you've done above doesn't change the
> start/end
> > edges of the cell, just the start/end edges of the content in the cell.
> The
> > cell still maps start to left and end to right. Note that you have to
> make
> > the choice on the table as a whole.
> >
> >>
> >>
> >>
> >> (Refer May 2011 thread "Complex Script, BIDI text supported?")
> >>
> >> cheers .. Jason
> >>
> >>
> >>
> >> On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com> wrote:
> >> > Per XSL-FO 1.1 [1]:
> >> >
> >> > "Property writing-mode applies to: fo:page-sequence,
> >> > fo:simple-page-master,
> >> > fo:region-body, fo:region-before, fo:region-after, fo:region-start,
> >> > fo:region-end, fo:block-container, fo:inline-container, and fo:table."
> >> >
> >> > As you can, none of these is fo:block. You need to specify it on
> >> > fo:table or
> >> > something higher up the tree. Note that specifying a RTL WM on
> fo:table
> >> > causes columns to be numbered from right to left, i.e., the first
> column
> >> > will be right-most.
> >> >
> >> > [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
> >> >
> >> >
> >> >
> >> >
> >> > On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com>
> >> > wrote:
> >> >>
> >> >> Hi, What's the correct way to write align a block of arabic in an
> >> >> individual table-cell?
> >> >>
> >> >> I found that with writing-mode="rl-tb", it was also necessary to add
> >> >> text-align="end"
> >> >>
> >> >>            <fo:table-cell >
> >> >>               <fo:block  text-align="end" writing-mode="rl-tb">
> >> >>                   <inline font-family="Arial">المدينة</inline>
> >> >>               </fo:block>
> >> >>             </fo:table-cell>
> >> >>
> >> >> thanks .. Jason
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> >> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> >> >>
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: right align arabic in table-cell

Posted by Jason Harrop <jh...@gmail.com>.
Bummer.  I guess I could nest a table in the table-cell.  Any reason
that wouldn't work?

On Thu, Mar 20, 2014 at 2:33 PM, Glenn Adams <gl...@skynav.com> wrote:
>
>
> On Wed, Mar 19, 2014 at 5:44 PM, Jason Harrop <jh...@gmail.com> wrote:
>>
>> Hi Glenn
>>
>> Thanks very much for that.
>>
>> So the following should right align in the table cell?
>>
>>             <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">
>>
>>               <block-container writing-mode="rl-tb">
>>                 <block>
>>                   <inline>المدينة</inline>
>>                 </block>
>>               </block-container>
>>             <table-cell>
>>
>> But  that didn't work in FOP 1.1 nor with
>> http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar
>
>
> No. I guess I wasn't plain enough. You need to put writing mode on table to
> affect the table cells. What you've done above doesn't change the start/end
> edges of the cell, just the start/end edges of the content in the cell. The
> cell still maps start to left and end to right. Note that you have to make
> the choice on the table as a whole.
>
>>
>>
>>
>> (Refer May 2011 thread "Complex Script, BIDI text supported?")
>>
>> cheers .. Jason
>>
>>
>>
>> On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com> wrote:
>> > Per XSL-FO 1.1 [1]:
>> >
>> > "Property writing-mode applies to: fo:page-sequence,
>> > fo:simple-page-master,
>> > fo:region-body, fo:region-before, fo:region-after, fo:region-start,
>> > fo:region-end, fo:block-container, fo:inline-container, and fo:table."
>> >
>> > As you can, none of these is fo:block. You need to specify it on
>> > fo:table or
>> > something higher up the tree. Note that specifying a RTL WM on fo:table
>> > causes columns to be numbered from right to left, i.e., the first column
>> > will be right-most.
>> >
>> > [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
>> >
>> >
>> >
>> >
>> > On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com>
>> > wrote:
>> >>
>> >> Hi, What's the correct way to write align a block of arabic in an
>> >> individual table-cell?
>> >>
>> >> I found that with writing-mode="rl-tb", it was also necessary to add
>> >> text-align="end"
>> >>
>> >>            <fo:table-cell >
>> >>               <fo:block  text-align="end" writing-mode="rl-tb">
>> >>                   <inline font-family="Arial">المدينة</inline>
>> >>               </fo:block>
>> >>             </fo:table-cell>
>> >>
>> >> thanks .. Jason
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: right align arabic in table-cell

Posted by Glenn Adams <gl...@skynav.com>.
On Wed, Mar 19, 2014 at 5:44 PM, Jason Harrop <jh...@gmail.com> wrote:

> Hi Glenn
>
> Thanks very much for that.
>
> So the following should right align in the table cell?
>
>             <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">
>
>               <block-container writing-mode="rl-tb">
>                 <block>
>                   <inline>المدينة</inline>
>                 </block>
>               </block-container>
>             <table-cell>
>
> But  that didn't work in FOP 1.1 nor with
> http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar


No. I guess I wasn't plain enough. You need to put writing mode on table to
affect the table cells. What you've done above doesn't change the start/end
edges of the cell, just the start/end edges of the content in the cell. The
cell still maps start to left and end to right. Note that you have to make
the choice on the table as a whole.


>
>
> (Refer May 2011 thread "Complex Script, BIDI text supported?")
>
> cheers .. Jason
>
>
>
> On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com> wrote:
> > Per XSL-FO 1.1 [1]:
> >
> > "Property writing-mode applies to: fo:page-sequence,
> fo:simple-page-master,
> > fo:region-body, fo:region-before, fo:region-after, fo:region-start,
> > fo:region-end, fo:block-container, fo:inline-container, and fo:table."
> >
> > As you can, none of these is fo:block. You need to specify it on
> fo:table or
> > something higher up the tree. Note that specifying a RTL WM on fo:table
> > causes columns to be numbered from right to left, i.e., the first column
> > will be right-most.
> >
> > [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
> >
> >
> >
> >
> > On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com>
> wrote:
> >>
> >> Hi, What's the correct way to write align a block of arabic in an
> >> individual table-cell?
> >>
> >> I found that with writing-mode="rl-tb", it was also necessary to add
> >> text-align="end"
> >>
> >>            <fo:table-cell >
> >>               <fo:block  text-align="end" writing-mode="rl-tb">
> >>                   <inline font-family="Arial">المدينة</inline>
> >>               </fo:block>
> >>             </fo:table-cell>
> >>
> >> thanks .. Jason
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: right align arabic in table-cell

Posted by "Terence M. Bandoian" <te...@tmbsw.com>.
Hi, Jason-

This might help:

     http://www.w3.org/TR/xsl/#d0e9451

-Terence Bandoian


On 3/19/2014 6:44 PM, Jason Harrop wrote:
> Hi Glenn
>
> Thanks very much for that.
>
> So the following should right align in the table cell?
>
>              <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">
>
>                <block-container writing-mode="rl-tb">
>                  <block>
>                    <inline>المدينة</inline>
>                  </block>
>                </block-container>
>              <table-cell>
>
> But  that didn't work in FOP 1.1 nor with
> http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar
>
> (Refer May 2011 thread "Complex Script, BIDI text supported?")
>
> cheers .. Jason
>
>
>
> On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com> wrote:
>> Per XSL-FO 1.1 [1]:
>>
>> "Property writing-mode applies to: fo:page-sequence, fo:simple-page-master,
>> fo:region-body, fo:region-before, fo:region-after, fo:region-start,
>> fo:region-end, fo:block-container, fo:inline-container, and fo:table."
>>
>> As you can, none of these is fo:block. You need to specify it on fo:table or
>> something higher up the tree. Note that specifying a RTL WM on fo:table
>> causes columns to be numbered from right to left, i.e., the first column
>> will be right-most.
>>
>> [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
>>
>>
>>
>>
>> On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com> wrote:
>>> Hi, What's the correct way to write align a block of arabic in an
>>> individual table-cell?
>>>
>>> I found that with writing-mode="rl-tb", it was also necessary to add
>>> text-align="end"
>>>
>>>             <fo:table-cell >
>>>                <fo:block  text-align="end" writing-mode="rl-tb">
>>>                    <inline font-family="Arial">المدينة</inline>
>>>                </fo:block>
>>>              </fo:table-cell>
>>>
>>> thanks .. Jason
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: right align arabic in table-cell

Posted by Jason Harrop <jh...@gmail.com>.
Hi Glenn

Thanks very much for that.

So the following should right align in the table cell?

            <table-cell  xmlns="http://www.w3.org/1999/XSL/Format">

              <block-container writing-mode="rl-tb">
                <block>
                  <inline>المدينة</inline>
                </block>
              </block-container>
            <table-cell>

But  that didn't work in FOP 1.1 nor with
http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20140319.jar

(Refer May 2011 thread "Complex Script, BIDI text supported?")

cheers .. Jason



On Wed, Mar 19, 2014 at 6:18 PM, Glenn Adams <gl...@skynav.com> wrote:
> Per XSL-FO 1.1 [1]:
>
> "Property writing-mode applies to: fo:page-sequence, fo:simple-page-master,
> fo:region-body, fo:region-before, fo:region-after, fo:region-start,
> fo:region-end, fo:block-container, fo:inline-container, and fo:table."
>
> As you can, none of these is fo:block. You need to specify it on fo:table or
> something higher up the tree. Note that specifying a RTL WM on fo:table
> causes columns to be numbered from right to left, i.e., the first column
> will be right-most.
>
> [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply
>
>
>
>
> On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com> wrote:
>>
>> Hi, What's the correct way to write align a block of arabic in an
>> individual table-cell?
>>
>> I found that with writing-mode="rl-tb", it was also necessary to add
>> text-align="end"
>>
>>            <fo:table-cell >
>>               <fo:block  text-align="end" writing-mode="rl-tb">
>>                   <inline font-family="Arial">المدينة</inline>
>>               </fo:block>
>>             </fo:table-cell>
>>
>> thanks .. Jason
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: right align arabic in table-cell

Posted by Glenn Adams <gl...@skynav.com>.
Per XSL-FO 1.1 [1]:

"Property writing-mode applies to: fo:page-sequence, fo:simple-page-master,
fo:region-body, fo:region-before, fo:region-after, fo:region-start,
fo:region-end, fo:block-container, fo:inline-container, and fo:table."

As you can, none of these is fo:block. You need to specify it on fo:table
or something higher up the tree. Note that specifying a RTL WM on fo:table
causes columns to be numbered from right to left, i.e., the first column
will be right-most.

[1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#prapply




On Wed, Mar 19, 2014 at 12:12 AM, Jason Harrop <jh...@gmail.com> wrote:

> Hi, What's the correct way to write align a block of arabic in an
> individual table-cell?
>
> I found that with writing-mode="rl-tb", it was also necessary to add
> text-align="end"
>
>            <fo:table-cell >
>               <fo:block  text-align="end" writing-mode="rl-tb">
>                   <inline font-family="Arial">المدينة</inline>
>               </fo:block>
>             </fo:table-cell>
>
> thanks .. Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>