public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Arabic Text direction after conversion to Word document
@ 2017-02-16 13:28 Aisha Alawi
       [not found] ` <c1badc4b-cba1-487a-b1f3-52d8d1d14ae3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Aisha Alawi @ 2017-02-16 13:28 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1093 bytes --]

Hello everyone,

I used Pandoc 1.18 command line to convert "org" to "docx", the document 
has Arabic text (which is right-to-left text) and I can display it well in 
LibreOffice 5.1.4.2 but when I used Microsoft office 13 the Arabic text 
displayed in opposite direction (left-to-right) which make it confused to 
read.
Also, when I changed the text direction in Word the text looks fine but it 
missed up the parentheses and other symbols direction. 
I would appreciate any suggestions or solutions.

Thank you.
Aisha 

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c1badc4b-cba1-487a-b1f3-52d8d1d14ae3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1545 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Arabic Text direction after conversion to Word document
       [not found] ` <c1badc4b-cba1-487a-b1f3-52d8d1d14ae3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-02-17 10:39   ` John MacFarlane
       [not found]     ` <20170217103926.GA62122-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
  2017-02-17 11:10   ` Joost Kremers
  1 sibling, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2017-02-17 10:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Pandoc needs some kind of explicit indication that the text
is RTL (usually putting it in a Div with a special
attribute).  I don't remember how this can be done in org,
if at all, but maybe Albert Krewinkel can help here.

If the whole document is rtl, then you might try adding

    --metadata rtl=true

to the command line.

Also try it with the latest version of pandoc.

+++ Aisha Alawi [Feb 16 17 05:28 ]:
>   Hello everyone,
>   I used Pandoc 1.18 command line to convert "org" to "docx", the
>   document has Arabic text (which is right-to-left text) and I can
>   display it well in LibreOffice 5.1.4.2 but when I used Microsoft office
>   13 the Arabic text displayed in opposite direction (left-to-right)
>   which make it confused to read.
>   Also, when I changed the text direction in Word the text looks fine but
>   it missed up the parentheses and other symbols direction.
>   I would appreciate any suggestions or solutions.
>   Thank you.
>   Aisha
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/c1badc4b-cba1-487a-
>   b1f3-52d8d1d14ae3%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/c1badc4b-cba1-487a-b1f3-52d8d1d14ae3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Arabic Text direction after conversion to Word document
       [not found] ` <c1badc4b-cba1-487a-b1f3-52d8d1d14ae3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-02-17 10:39   ` John MacFarlane
@ 2017-02-17 11:10   ` Joost Kremers
  1 sibling, 0 replies; 5+ messages in thread
From: Joost Kremers @ 2017-02-17 11:10 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Thu, Feb 16 2017, Aisha Alawi wrote:
> Hello everyone,
>
> I used Pandoc 1.18 command line to convert "org" to "docx", the 
> document 
> has Arabic text (which is right-to-left text) and I can display 
> it well in 
> LibreOffice 5.1.4.2 but when I used Microsoft office 13 the 
> Arabic text 
> displayed in opposite direction (left-to-right) which make it 
> confused to 
> read.
> Also, when I changed the text direction in Word the text looks 
> fine but it 
> missed up the parentheses and other symbols direction. 
> I would appreciate any suggestions or solutions.

The display of right-to-left text is completely the responsibility 
of the software doing the displaying. That includes the 
parentheses and similar symbols which are neutral as to text 
direction but need to be adjusted nonetheless.

So what you describe suggests that LibreOffice's RTL text display 
is simply better than MS Office's. In particular, LibreOffice 
seems to do some detection on its own, recognising that your text 
is in Arabic and displaying it RTL.

Anyway, John just wrote that it's possible to pass a text 
direction parameter to Pandoc. That should help with MS Word 
displaying the text in the correct direction, but I suspect it 
won't help with parentheses.



-- 
Joost Kremers
Life has its moments


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Arabic Text direction after conversion to Word document
       [not found]     ` <20170217103926.GA62122-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
@ 2017-02-17 21:11       ` Albert Krewinkel
       [not found]         ` <87wpcosete.fsf-NJ6QtbQ9hATDZamjJ9D3v6C1jgCzLlUE@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Albert Krewinkel @ 2017-02-17 21:11 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:

> Pandoc needs some kind of explicit indication that the text
> is RTL (usually putting it in a Div with a special
> attribute).  I don't remember how this can be done in org,
> if at all, but maybe Albert Krewinkel can help here.

This is a bit cumbersome in org, as one has to define a special block
and assign attributes via `#+ATTR_HTML`. E.g.:

    #+ATTR_HTML: :dir rtl
    #+BEGIN_arabic
    السّلام عليكم
    #+END_arabic

The block name (here: "arabic") can be chosen freely, it just needs to
be present. I haven't tested it for docx, but HTML output seems to be
correct:

    <div class="arabic" dir="rtl">
    <p>السّلام عليكم</p>
    </div>


> If the whole document is rtl, then you might try adding
>
>    --metadata rtl=true
>
> to the command line.
>
> Also try it with the latest version of pandoc.
>
> +++ Aisha Alawi [Feb 16 17 05:28 ]:
>>   Hello everyone,
>>   I used Pandoc 1.18 command line to convert "org" to "docx", the
>>   document has Arabic text (which is right-to-left text) and I can
>>   display it well in LibreOffice 5.1.4.2 but when I used Microsoft office
>>   13 the Arabic text displayed in opposite direction (left-to-right)
>>   which make it confused to read.
>>   Also, when I changed the text direction in Word the text looks fine but
>>   it missed up the parentheses and other symbols direction.
>>   I would appreciate any suggestions or solutions.
>>   Thank you.
>>   Aisha

-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87wpcosete.fsf%40espresso.zeitkraut.de.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Arabic Text direction after conversion to Word document
       [not found]         ` <87wpcosete.fsf-NJ6QtbQ9hATDZamjJ9D3v6C1jgCzLlUE@public.gmane.org>
@ 2017-02-27 17:02           ` Aisha Alawi
  0 siblings, 0 replies; 5+ messages in thread
From: Aisha Alawi @ 2017-02-27 17:02 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: albert+pandoc-9EawChwDxG8hFhg+JK9F0w


[-- Attachment #1.1: Type: text/plain, Size: 2896 bytes --]

Thank you John, Joost and Albert for your answers.

I tried the suggested `#+ATTR_HTML` below. Surprisingly, it did not display 
the Arabic as expected! it displays it in LTR order, (in MS Word not 
LibreOffice). Also, my challenge is that I have a mixture of english and 
arabic text in same brackets which made the use of  `#+ATTR_HTML` block 
diffucult.
I might try to play with org format or another in-between format.
Regards,
Aisha

On Friday, 17 February 2017 21:11:34 UTC, Albert Krewinkel wrote:
>
> John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org <javascript:>> writes: 
>
> > Pandoc needs some kind of explicit indication that the text 
> > is RTL (usually putting it in a Div with a special 
> > attribute).  I don't remember how this can be done in org, 
> > if at all, but maybe Albert Krewinkel can help here. 
>
> This is a bit cumbersome in org, as one has to define a special block 
> and assign attributes via `#+ATTR_HTML`. E.g.: 
>
>     #+ATTR_HTML: :dir rtl 
>     #+BEGIN_arabic 
>     السّلام عليكم 
>     #+END_arabic 
>
> The block name (here: "arabic") can be chosen freely, it just needs to 
> be present. I haven't tested it for docx, but HTML output seems to be 
> correct: 
>
>     <div class="arabic" dir="rtl"> 
>     <p>السّلام عليكم</p> 
>     </div> 
>
>
> > If the whole document is rtl, then you might try adding 
> > 
> >    --metadata rtl=true 
> > 
> > to the command line. 
> > 
> > Also try it with the latest version of pandoc. 
> > 
> > +++ Aisha Alawi [Feb 16 17 05:28 ]: 
> >>   Hello everyone, 
> >>   I used Pandoc 1.18 command line to convert "org" to "docx", the 
> >>   document has Arabic text (which is right-to-left text) and I can 
> >>   display it well in LibreOffice 5.1.4.2 but when I used Microsoft 
> office 
> >>   13 the Arabic text displayed in opposite direction (left-to-right) 
> >>   which make it confused to read. 
> >>   Also, when I changed the text direction in Word the text looks fine 
> but 
> >>   it missed up the parentheses and other symbols direction. 
> >>   I would appreciate any suggestions or solutions. 
> >>   Thank you. 
> >>   Aisha 
>
> -- 
> Albert Krewinkel 
> GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/dc2c5a25-ecc5-4fc4-95f3-fc57a1bb22f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3903 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-27 17:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 13:28 Arabic Text direction after conversion to Word document Aisha Alawi
     [not found] ` <c1badc4b-cba1-487a-b1f3-52d8d1d14ae3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-02-17 10:39   ` John MacFarlane
     [not found]     ` <20170217103926.GA62122-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
2017-02-17 21:11       ` Albert Krewinkel
     [not found]         ` <87wpcosete.fsf-NJ6QtbQ9hATDZamjJ9D3v6C1jgCzLlUE@public.gmane.org>
2017-02-27 17:02           ` Aisha Alawi
2017-02-17 11:10   ` Joost Kremers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).